[alsa-devel] max channels of 3 jacks 6 channels motherboard using model=auto realtek codec
Takashi Iwai
tiwai at suse.de
Thu Jul 14 16:45:47 CEST 2011
At Sun, 10 Jul 2011 08:47:46 +0200,
Takashi Iwai wrote:
>
> At Sun, 10 Jul 2011 11:31:44 +0800,
> Raymond Yau wrote:
> >
> > 2011/7/6 Takashi Iwai <tiwai at suse.de>:
> > > At Wed, 6 Jul 2011 11:53:47 +0800,
> > > Raymond Yau wrote:
> > >>
> > >> Refer to commit ce764ab22e40a046065c9417ee5f04ad2a816ac1
> > >>
> > >> ALSA: hda - Add channel-mode support to Realtek auto-parser
> > >>
> > >> It seem that max channel is six instead of two when the channel mode
> > >> is 2ch for those 3 jacks motherboard
> > >>
> > >> using hda-emu and alsa-info from
> > >> http://thread.gmane.org/gmane.linux.alsa.devel/86816
> > >>
> > >> > PCM 0 p 44100 2 16
> > >> Open PCM ALC887 Analog for play
> > >> Available PCM parameters:
> > >> channels: 2/6
> > >> formats: S16_LE S32_LE
> > >> rates: 44100 48000 96000 192000
> > >> Prepare PCM, rate=44100, channels=2, format=16 bits
> > >>
> > >>
> > >> because
> > >>
> > >> spec->multiout.max_channels = spec->multiout.num_dacs * 2;
> > >>
> > >> is assigned after alc_auto_add_multi_channel_mode() increase
> > >> spec->multiout.num_dacs from 1 to 3
> > >>
> > >> spec->multiout.num_dacs = num_pins + 1;
> > >
> > > Right, and this is intentional. Since there should be enough amount
> > > of DACs, the driver keeps using the surround DACs statically.
> > > In that way, apps can keep opening the device in the surround mode
> > > while user can switch the outputs on the fly via channel-mode mixer
> > > enum.
> > >
> > >
> >
> > How can the driver support 6 channels when the input jacks have not
> > been retasked as output ?
>
> Even if the pins aren't retasked, DACs can receive data. And then
> you can change the pins and routing on the fly.
>
> You can open a two-channel PCM stream even if the master or (any
> other) volume is muted. A similar reason.
>
> > This behaviour seem different from model=3stack-6ch or
> > model=3stack-6ch-dig or those via codec with smart51 "OFF"
The smart51 case is a bit different (we prefer DAC unused because of
independent HP control), but the 3stack-6ch case is a regression,
indeed. This was just because of dropped code snippet.
Now I fixed with the patch below.
thanks,
Takashi
---
From: Takashi Iwai <tiwai at suse.de>
Subject: [PATCH] ALSA: hda - Re-add need_dac_fix check for multi-io jacks of
Realtek codecs
During the rewrite, the check of spec->need_dac_fix and the corresponding
num_dacs change was dropped from the channel-mode control.
This patch re-adds it, and also enables need_dac_fix for ALC880 as default,
as this feature was originally introduced to fix h/w bugs of this chip.
Signed-off-by: Takashi Iwai <tiwai at suse.de>
---
sound/pci/hda/patch_realtek.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 124c63f..52ce075 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3196,6 +3196,8 @@ static int alc_auto_ch_mode_put(struct snd_kcontrol *kcontrol,
for (i = 0; i < spec->multi_ios; i++)
alc_set_multi_io(codec, i, i < ch);
spec->multiout.max_channels = spec->ext_channel_count;
+ if (spec->need_dac_fix && !spec->const_channel_count)
+ spec->multiout.num_dacs = spec->multiout.max_channels / 2;
return 1;
}
@@ -3642,6 +3644,7 @@ static int patch_alc880(struct hda_codec *codec)
codec->spec = spec;
spec->mixer_nid = 0x0b;
+ spec->need_dac_fix = 1;
board_config = alc_board_config(codec, ALC880_MODEL_LAST,
alc880_models, alc880_cfg_tbl);
--
1.7.6
More information about the Alsa-devel
mailing list