On the Thinkpad W520 - and probably several other machines with
Conexant 506x chips - the Dock Mic and Mic are connected to the
same two selector nodes. This patch will make Dock Mic take one
selector node and Mic take the other, when possible.
Without the patch, both paths would take the first selector,
leading to the normal Mic's volume being controlled by
"Dock Mic Boost".
(On other machines, this could instead fixup similar problems between
Mic and Line In, for example.)
On the Thinkpad W520 - and probably several other machines with
Conexant 506x chips - the Dock Mic and Mic are connected to the
same two selector nodes. This patch will make Dock Mic take one
selector node and Mic take the other, when possible.
Without the patch, both paths would take the first selector,
leading to the normal Mic's volume being controlled by
"Dock Mic Boost".
(On other machines, this could instead fixup similar problems between
Mic and Line In, for example.)
BugLink: https:/ /bugs.launchpad .net/bugs/ 1037642
Signed-off-by: David Henningsson <email address hidden>
---
I asked for alsa-info on this one but got Ubuntu apport info instead, /bugs.launchpad .net/ubuntu/ +source/ pulseaudio/ +bug/1037642/ +attachment/ 3323954/ +files/ Card0.Codecs. codec.0. txt
see e g
https:/
In general I guess this could be sent to stable but it always feels scary
when it's generic code :-) what do you think?
sound/ pci/hda/ patch_conexant. c | 20 +++++++ +++++++ ++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/sound/ pci/hda/ patch_conexant. c b/sound/ pci/hda/ patch_conexant. c pci/hda/ patch_conexant. c pci/hda/ patch_conexant. c input_connectio n(struct hda_codec *codec, hda_nid_t mux, MAX_NUM_ INPUTS] ;
index b871b013..c03d3b8 100644
--- a/sound/
+++ b/sound/
@@ -3540,8 +3540,9 @@ static int __select_
hda_nid_t pin, hda_nid_t *srcp,
bool do_select, int depth)
{
+ struct conexant_spec *spec = codec->spec;
hda_nid_t conn[HDA_
- int i, nums;
+ int startidx, i, nums;
switch (get_wcaps_ type(get_ wcaps(codec, mux))) { input_connectio n(struct hda_codec *codec, hda_nid_t mux, imux.num_ items; i++) imux_info[ i].pin == pin) { input_connectio n(codec, conn[i], pin, srcp, input_connectio n(codec, conn[j], pin, srcp,
do_ select, depth); hda_codec_ write(codec, mux, 0, SET_CONNECT_ SEL, i); SET_CONNECT_ SEL, j);
case AC_WID_AUD_IN:
@@ -3565,14 +3566,25 @@ static int __select_
depth++;
if (depth == 2)
return -1;
+
+ /* Try to rotate around connections to avoid one boost controlling
+ another input path as well */
+ startidx = 0;
+ for (i = 0; i < spec->private_
+ if (spec->
+ startidx = i;
+ break;
+ }
+
for (i = 0; i < nums; i++) {
- int ret = __select_
+ int j = (i + startidx) % nums;
+ int ret = __select_
if (ret >= 0) {
if (do_select)
snd_
- AC_VERB_
- return i;
+ AC_VERB_
+ return j;
}
}
return -1;
--
1.7.9.5