[ALSA] hda-codec - Fix channel mode helper

Modules: HDA Codec driver

Fix the channel mode helper (for put callback).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2005-11-24 16:05:04 +01:00 committed by Jaroslav Kysela
parent 606ad75fb5
commit b2ec642362
1 changed files with 1 additions and 1 deletions

View File

@ -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;