From 792cf2fa2ea926c0c07277c0b67ab60745e8f898 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 10 Dec 2012 16:04:30 +0100 Subject: [PATCH] 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: Takashi Iwai --- Reading git-format-patch failed