[alsa-devel] [PATCH] ALSA: hda - Fix wrong detection of "Headphone+LO" or "Speaker+LO"
Raymond Yau
superquad.vortex2 at gmail.com
Tue Mar 3 16:18:09 CET 2015
>
> Add the constraint mentioned in the comment.
>
> It does not apply to a scenario with three DACs and multi-IO where we
> would normally get a "Master Playback Volume" and a "Front Playback
> Volume" (prevented without checking for num_dacs).
>
> Signed-off-by: Ingo Brückl <ib at wupperonline.de>
>
> diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
> index ecee349..4c8910c 100644
> --- a/sound/pci/hda/hda_generic.c
> +++ b/sound/pci/hda/hda_generic.c
> @@ -1097,7 +1097,7 @@ static const char *get_line_out_pfx(struct
hda_codec *codec, int ch,
> case AUTO_PIN_LINE_OUT:
> /* This deals with the case where we have two DACs and
> * one LO, one HP and one Speaker */
> - if (!ch && cfg->speaker_outs && cfg->hp_outs) {
> + if (!ch && spec->multiout.num_dacs == 2 &&
cfg->speaker_outs && cfg->hp_outs) {
spec->multiout.num_dacs == 2 mean support 4 channels
You need to find out the number of analog dacs from spec->all_dacs[]
exclude the digital output
> bool hp_lo_shared = !path_has_mixer(codec,
spec->hp_paths[0], ctl_type);
> bool spk_lo_shared = !path_has_mixer(codec,
spec->speaker_paths[0], ctl_type);
> if (hp_lo_shared && spk_lo_shared)
> --
> 1.7.10
More information about the Alsa-devel
mailing list