Skip to content
Commit 792cf2fa authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda/realtek - Reduce vol/mute ctl lookups at parsing codec



So far, Realtek codec driver evaluates the NIDs for volume and mute
controls twice, once while parsing the DACs and evaluating the
assignment, and another while creating the mixer elements.  This is
utterly redundant and even fragile, as it's assuming that the ctl
element evaluation is identical between both parsing DACs and creating
mixer elements.

This patch simplifies the code flow by doing the volume / mute
controls evaluation only once while parsing the DACs.  The patch ended
up in larger changes than expected because of some cleanups became
mandatory.

As a gratis bonus, this patch also fixes some cases where the stereo
channels are used wrongly for mono amps.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 2f179721
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment