Skip to content

Commit

Permalink
ALSA: hda - Fix the detection of "Loopback Mixing" control for VIA co…
Browse files Browse the repository at this point in the history
…decs

Currently the driver checks only the out_mix_path[] for the primary
output route for judging whether to create the loopback-mixing control
or not.  But, there are cases where aamix-routing is available only on
headphone or speaker paths but not on the primary output path.  So, the
driver ignores such cases inappropriately.

This patch fixes the check of the loopback-mixing control by testing
all mix-routing paths.

Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Jan 10, 2012
1 parent 3a90274 commit 4808d12
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sound/pci/hda/patch_via.c
Original file line number Diff line number Diff line change
Expand Up @@ -2208,7 +2208,10 @@ static int via_auto_create_loopback_switch(struct hda_codec *codec)
{
struct via_spec *spec = codec->spec;

if (!spec->aa_mix_nid || !spec->out_mix_path.depth)
if (!spec->aa_mix_nid)
return 0; /* no loopback switching available */
if (!(spec->out_mix_path.depth || spec->hp_mix_path.depth ||
spec->speaker_path.depth))
return 0; /* no loopback switching available */
if (!via_clone_control(spec, &via_aamix_ctl_enum))
return -ENOMEM;
Expand Down

0 comments on commit 4808d12

Please sign in to comment.