From: Takashi Iwai Date: Thu, 24 Nov 2005 15:05:04 +0000 (+0100) Subject: [ALSA] hda-codec - Fix channel mode helper X-Git-Tag: v2.6.16-rc1~169^2~16^2~28^2~63 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b2ec642362eef10f660e2b857dda12e2d61e0198;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git [ALSA] hda-codec - Fix channel mode helper Modules: HDA Codec driver Fix the channel mode helper (for put callback). Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 402ce00..5ead2a3 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -1771,7 +1771,7 @@ int snd_hda_ch_mode_put(struct hda_codec *codec, struct snd_ctl_elem_value *ucon mode = ucontrol->value.enumerated.item[0]; snd_assert(mode < num_chmodes, return -EINVAL); - if (*max_channelsp && ! codec->in_resume) + if (*max_channelsp == chmode[mode].channels && ! codec->in_resume) return 0; /* change the current channel setting */ *max_channelsp = chmode[mode].channels;