diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-07-28 14:47:34 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 10:39:32 +0200 |
commit | 4e195a7b78618c89b06547f3140e67a69ec23272 (patch) | |
tree | c371937f6d62e7b6c316ba9507906258b0454d10 /sound/pci/hda/patch_analog.c | |
parent | 35aec4e2affb99d52b4b744ddb09767eb6e05580 (diff) | |
download | kernel_samsung_espresso10-4e195a7b78618c89b06547f3140e67a69ec23272.zip kernel_samsung_espresso10-4e195a7b78618c89b06547f3140e67a69ec23272.tar.gz kernel_samsung_espresso10-4e195a7b78618c89b06547f3140e67a69ec23272.tar.bz2 |
[ALSA] Fix noisy output with shared channel mode with hd-audio
- Fix the wrong initialization of num_dacs when changing the channel
mode between 2 and multi-channel modes. It must be evaluated
after calling snd_hda_ch_mode_put()
- Added the similar check of num_dacs fix in Realtek code.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci/hda/patch_analog.c')
-rw-r--r-- | sound/pci/hda/patch_analog.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 8955397..077f1ce 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c @@ -1647,10 +1647,12 @@ static int ad198x_ch_mode_put(struct snd_kcontrol *kcontrol, { struct hda_codec *codec = snd_kcontrol_chip(kcontrol); struct ad198x_spec *spec = codec->spec; - if (spec->need_dac_fix) + int err = snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode, + spec->num_channel_mode, + &spec->multiout.max_channels); + if (! err && spec->need_dac_fix) spec->multiout.num_dacs = spec->multiout.max_channels / 2; - return snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode, - spec->num_channel_mode, &spec->multiout.max_channels); + return err; } /* 6-stack mode */ |