diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-07-28 08:47:34 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-09-23 04:39:32 -0400 |
commit | 4e195a7b78618c89b06547f3140e67a69ec23272 (patch) | |
tree | c371937f6d62e7b6c316ba9507906258b0454d10 /sound/pci/hda/patch_analog.c | |
parent | 35aec4e2affb99d52b4b744ddb09767eb6e05580 (diff) |
[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 8955397cca6f..077f1ce01ee1 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, | |||
1647 | { | 1647 | { |
1648 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | 1648 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); |
1649 | struct ad198x_spec *spec = codec->spec; | 1649 | struct ad198x_spec *spec = codec->spec; |
1650 | if (spec->need_dac_fix) | 1650 | int err = snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode, |
1651 | spec->num_channel_mode, | ||
1652 | &spec->multiout.max_channels); | ||
1653 | if (! err && spec->need_dac_fix) | ||
1651 | spec->multiout.num_dacs = spec->multiout.max_channels / 2; | 1654 | spec->multiout.num_dacs = spec->multiout.max_channels / 2; |
1652 | return snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode, | 1655 | return err; |
1653 | spec->num_channel_mode, &spec->multiout.max_channels); | ||
1654 | } | 1656 | } |
1655 | 1657 | ||
1656 | /* 6-stack mode */ | 1658 | /* 6-stack mode */ |