diff mbox

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

Message ID 1421290165-20724-1-git-send-email-bardliao@realtek.com (mailing list archive)
State Accepted
Commit 45437fa58587dd31523cb2d78183088fb69cdeec
Headers show

Commit Message

Bard Liao Jan. 15, 2015, 2:49 a.m. UTC
There is only one I2S I/F, AD/DA path must operate to the same
format.

Signed-off-by: Bard Liao <bardliao@realtek.com>
---
 sound/soc/codecs/rt286.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Mark Brown Jan. 15, 2015, 11:16 a.m. UTC | #1
On Thu, Jan 15, 2015 at 10:49:25AM +0800, Bard Liao wrote:
> There is only one I2S I/F, AD/DA path must operate to the same
> format.

Applied, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/rt286.c b/sound/soc/codecs/rt286.c
index 2cd4fe4..1d1c7f8 100644
--- a/sound/soc/codecs/rt286.c
+++ b/sound/soc/codecs/rt286.c
@@ -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;
 }