Skip to contentSkip to conversation

ASoC: rt286: set the same format for dac and adc

PATCH Applied Bard Liao 2 participants 2 messages Jan 15, 2015

Subsystems (3)
lore
Share & tools
lore

Bard Liao

author
#0 lore raw

PATCH 1/1 ASoC: rt286: set the same format for dac and adc

There is only one I2S I/F, AD/DA path must operate to the same format.

---
 sound/soc/codecs/rt286.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
sound/soc/codecs/rt286.c +2 -4
index 2cd4fe4..1d1c7f8 100644
@@ -861,10 +861,8 @@ static int rt286_hw_params(struct snd_pcm_substream *substream,
 		RT286_I2S_CTRL1, 0x0018, d_len_code << 3);
 	dev_dbg(codec->dev, "format val = 0x%x\n", val);
 
-	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
-		snd_soc_update_bits(codec, RT286_DAC_FORMAT, 0x407f, val);
-	else
-		snd_soc_update_bits(codec, RT286_ADC_FORMAT, 0x407f, val);
+	snd_soc_update_bits(codec, RT286_DAC_FORMAT, 0x407f, val);
+	snd_soc_update_bits(codec, RT286_ADC_FORMAT, 0x407f, val);
 
 	return 0;
 }
Signature · 1 line
1.8.1.1.439.g50a6b54
maintainer Applied
#1 lore raw
Quoted 2 lines · Bard Liao

There is only one I2S I/F, AD/DA path must operate to the same format.

Applied, thanks.