diff options
author | Daniel Mack <zonque@gmail.com> | 2013-03-21 15:43:54 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-22 06:13:09 -0400 |
commit | c24a34dbcd93ef3172ecd4e5ce533fe365d4554e (patch) | |
tree | aa753851bf212c31cf06e12e456043d03474fc10 | |
parent | 1b1861ead4f9fd7314acb2a8950a2b75ad2c8af5 (diff) |
ASoC: cs4271: switch to mute_stream
Use the newly introduced mute_stream DAI operation, and don't mute the
codec if it's called for the _CAPTURE stream.
Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/codecs/cs4271.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index ac0d3b4844a8..03036b326732 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c | |||
@@ -388,7 +388,7 @@ static int cs4271_hw_params(struct snd_pcm_substream *substream, | |||
388 | return cs4271_set_deemph(codec); | 388 | return cs4271_set_deemph(codec); |
389 | } | 389 | } |
390 | 390 | ||
391 | static int cs4271_digital_mute(struct snd_soc_dai *dai, int mute) | 391 | static int cs4271_mute_stream(struct snd_soc_dai *dai, int mute, int stream) |
392 | { | 392 | { |
393 | struct snd_soc_codec *codec = dai->codec; | 393 | struct snd_soc_codec *codec = dai->codec; |
394 | struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); | 394 | struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); |
@@ -396,6 +396,9 @@ static int cs4271_digital_mute(struct snd_soc_dai *dai, int mute) | |||
396 | int val_a = 0; | 396 | int val_a = 0; |
397 | int val_b = 0; | 397 | int val_b = 0; |
398 | 398 | ||
399 | if (stream != SNDRV_PCM_STREAM_PLAYBACK) | ||
400 | return 0; | ||
401 | |||
399 | if (mute) { | 402 | if (mute) { |
400 | val_a = CS4271_VOLA_MUTE; | 403 | val_a = CS4271_VOLA_MUTE; |
401 | val_b = CS4271_VOLB_MUTE; | 404 | val_b = CS4271_VOLB_MUTE; |
@@ -442,7 +445,7 @@ static const struct snd_soc_dai_ops cs4271_dai_ops = { | |||
442 | .hw_params = cs4271_hw_params, | 445 | .hw_params = cs4271_hw_params, |
443 | .set_sysclk = cs4271_set_dai_sysclk, | 446 | .set_sysclk = cs4271_set_dai_sysclk, |
444 | .set_fmt = cs4271_set_dai_fmt, | 447 | .set_fmt = cs4271_set_dai_fmt, |
445 | .digital_mute = cs4271_digital_mute, | 448 | .mute_stream = cs4271_mute_stream, |
446 | }; | 449 | }; |
447 | 450 | ||
448 | static struct snd_soc_dai_driver cs4271_dai = { | 451 | static struct snd_soc_dai_driver cs4271_dai = { |