Created attachment 173181 [details] two runs of alsa-info (prefixed descriptions with "!!!!") The Acer Aspire V5-122P-0408 has an internal microphone and a combo headset jack. The internal microphone works fine, and the headset output works too (sound plays and it detects the presence correctly). The headset microphone input does not work, however. I've attached two runs of alsa-info, one with a combo headset plugged in and one without anything plugged in. Let me know if there's any additional information I can provide.
Created attachment 173191 [details] alsa-info with combo headset plugged in
Created attachment 173201 [details] alsa-info without anything plugged in
I also have the same bug with my Acer V5-571G. Here's [some info](https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1351916). It seems that it affects multiple users and in different distros.
(In reply to Maccer from comment #3) > I also have the same bug with my Acer V5-571G. Here's [some > info](https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1351916). > It seems that it affects multiple users and in different distros.
Yaay! i found a workaround! It seems that the mic isn't correctly detected. What i did was: sudo echo "options snd-hda-intel model=dell-headset-multi" > /etc/modprobe.d/snd-hda-intel.conf and the mic started to work after a reboot. if it didn't work for you, you may try replacing " dell-headset-multi " with " headset-mic " , " alc271-dmic " or any other mic model from https://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt that is assigned to your audio card.
Could you try to apply the patch below and use model=headset-mode-no-hp-mic or model=headset-mode instead? These don't override the pin configurations that were designed for Dell machines.
Created attachment 177301 [details] Patch to add headset-mode and headset-mode-no-hp-mic models
It doesn't work with those models.
Please give alsa-info.sh outputs, just for confirming whether you tested properly.
Created attachment 178481 [details] alsa-info with dell-headset-multi Altrough this model is what works on my laptop, it shows 2 headset mics (different names but is the same mic).
Created attachment 178491 [details] alsa-info with headset mode
Created attachment 178501 [details] alsa-info with headset-mode-no-hp-mic Here you have the last one.
Thanks. So, you'd need to set up an additional mic pin explicitly. It's either 0x19 or 0x1a, and my wild shot points to the former. Could you check the patch below without model option? (You'd need to apply the previous model option patch. Or you can ignore the last chunk, as it just adds a new model option.)
Created attachment 178511 [details] Test fix patch for Aspire V5
How should i do it?
Apply the patch and test :)
I mean, how do I apply a patch? I have no experience with this.
Grrr, so your results in comment 11 and 12 are also invalid. It was the request with these models after applying the patch in comment 7. Without the patch, it doesn't work, of course. For applying the patch, run on the top of kernel tree like: patch -p1 < /somewhere/your-patch where "/somewhere/your-patch" is a path of the patch you downloaded. Then build and install the kernel as usual.
Original reporter here. I just tested the patch on Linux 4.1.0 and confirmed that I can switch from internal mic to the headset mic on the Acer Aspire V5 122P. I'm curious, are we sure that the jack does not support presence detection? Is there anything I should do to check?
Created attachment 180911 [details] alsa-info with patch applied
driver usually create input soure controls only on desktop , auto mic select don't need any capture source control/input source control Simple mixer control 'Input Source',0 Capabilities: cenum Items: 'Internal Mic' 'Headset Mic' Item0: 'Headset Mic' Simple mixer control 'Input Source',1 Capabilities: cenum Items: 'Internal Mic' 'Headset Mic' Item0: 'Headset Mic'
(In reply to Nicholas Bishop from comment #19) > Original reporter here. I just tested the patch on Linux 4.1.0 and confirmed > that I can switch from internal mic to the headset mic on the Acer Aspire V5 > 122P. > > I'm curious, are we sure that the jack does not support presence detection? > Is there anything I should do to check? OK, how about the revised patch below?
Created attachment 180981 [details] Revised patch for Aspre V5
With the new patch I couldn't get it to switch the headset mic anymore, internal mic was always chosen. Attaching updated alsa-info
Created attachment 181011 [details] alsa-info with aspire-v5-headset-2.diff applied
It implies that the headset detection didn't work as expected. (It was originally for Dell machines, after all.) Maybe we should go back to basic: could you check whether NID 0x19 give the jack detection? For example, run hda-verb like hda-verb /dev/snd/hwC1D0 0x19 GET_PIN_SENSE 0 at both headset plugged and unplugged states. Does either of them return the value with the bit 31 set? Also, check the same for the headphone without a mic, not the headset.
Mic headset plugged in: 0x80000000 Headphones (no mic) plugged in: 0x0 Nothing plugged in: 0x80000000 Note: I got that output on the kernel with aspire-v5-headset-2.diff applied, not sure if that was the desired environment or not.
Please retest without any patch applied.
With no patches applied: Mic headset plugged in: 0x0 Headphones (no mic) plugged in: 0x0 Nothing plugged in: 0x0 I will attach a new alsa-info to confirm that this kernel was built without the previous patches.
Created attachment 181021 [details] alsa-info on v4.1 without any patches applied
Thanks. So the jack detection isn't straightforward as expected. Then I'm going to queue the first version of the fix to 4.2-rc1. This makes the mic working at least. The auto switch feature will be implemented later. After merging to 4.2-rc1, the fix will be backported to stable kernels eventually.
Hi, I'd like to report that Acer V5-573G is also affected. Still it seems to pull up different pin numbers in the code. Overriding the 0x19 PIN with 0x01a1913c also works here. Could you please account for this model in the code, too? Thanks in advance, Mateusz
(In reply to matisec7 from comment #32) > Hi, > > I'd like to report that Acer V5-573G is also affected. Still it seems to > pull up different pin numbers in the code. > > Overriding the 0x19 PIN with 0x01a1913c also works here. > > Could you please account for this model in the code, too? Please give alsa-info.sh output. It should contain more detailed information.
Created attachment 182841 [details] alsa-info output for Acer V5-573G
Could you try the patch below?
Created attachment 182871 [details] Additional patch for Aspire V5-573G Apply this one on the top of the patch of comment 14.
Thanks a million. Do you plan on merging it into the kernel trees? As a workaround, I use hda-jack-retask.
I'll try the patch, though, but over the weekend. I'll provide feedback here. Thanks again.
(In reply to Mateusz Sylwestrzak from comment #37) > Thanks a million. Do you plan on merging it into the kernel trees? Yes, but only when it's confirmed to actually work :)
Hi, I've applied the two patches and compiled a kernel. It seems that the 0x19 pin is assigned the correct value for /sys/class/sound/hwC1D0/driver_pin_configs but not for /sys/class/sound/hwC1D0/init_pin_configs. In practice, the headset microphone is the internal microphone so it's not working the way it should. Best, MS
Created attachment 183051 [details] Acer V5-573G after applying the two patches. It doesn't seem to work properly.
OK, then the first thing to test is to remap the pins like: 0x18 0x0321101f 0x21 0x03a11020 This will point 0x18 as the headphone and 0x21 as the mic. You can pass these via patch firmware file over patch module option. See Documentation/sound/alsa/HD-Audio.txt for instruction.
(In reply to Takashi Iwai from comment #42) > OK, then the first thing to test is to remap the pins like: Oops, sorry, pasted to a wrong bug.
(In reply to Mateusz Sylwestrzak from comment #40) > Hi, > > I've applied the two patches and compiled a kernel. It seems that the 0x19 > pin is assigned the correct value for > /sys/class/sound/hwC1D0/driver_pin_configs but not for > /sys/class/sound/hwC1D0/init_pin_configs. This is the correct behavior. The init_pin_configs contains the values set by BIOS while the driver_pin_configs are the values overridden by the driver. Thus, the patch behaves as expected. > In practice, the headset microphone is the internal microphone so it's not > working the way it should. Are you sure that just changing the NID 0x19 makes it working? I supposed that it's a headset mic similar like other Aspire models that needs the special handling of headset detection. If just changing NID 0x19 pincfg is enough, you'd need to just replace the value of NID 0x19 in ALC282_FIXUP_ASPIRE_V5_PINS without any further fixup chain.
I'm sure. Patching it like this made it work: /etc/modprobe.d/hda-jack-retask.conf: # This file was added by the program 'hda-jack-retask'. # If you want to revert the changes made by this program, you can simply erase this file and reboot your computer. options snd-hda-intel patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw /lib/firmware/hda-jack-retask.fw: [codec] 0x80862807 0x80860101 0 [pincfg] 0x19 0x01a1913c When working properly, the labels for input devices in kmix were "microphone" vs "internal microphone". After the two patches, it was "headset microphone" vs "internal microphone" but the two sources were the internal microphone in fact. I've just started compiling a new kernel with the 0x01a1913c NID value in 0x19 in ALC282_FIXUP_ASPIRE_V5_PINS. I'm going to post feedback any time soon. I hope that it works and that you'll be able to incorporate the fix into the code. Best, MS
Created attachment 183071 [details] Acer V5-573G - 0x19 mod in ALC282_FIXUP_ASPIRE_V5_PINS Hi, now I'm confused as neither the "internal microphone" nor the "microphone" seem to work. When I'm trying to record with either, all I'm getting is repetitive clicks.
Created attachment 183081 [details] Acer V5-573G - no patches, hdajackretask for 0x19 Hi, this one is a workaround that actually works with the standard 4.1.2-2 kernel shipped by Arch Linux. /etc/modprobe.d/hda-jack-retask.conf: # This file was added by the program 'hda-jack-retask'. # If you want to revert the changes made by this program, you can simply erase this file and reboot your computer. options snd-hda-intel patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw /lib/firmware/hda-jack-retask.fw: [codec] 0x80862807 0x80860101 0 [pincfg] 0x19 0x01a1913c
Created attachment 183091 [details] Acer V5-573G / 0x19 mod in ALC282_FIXUP_ASPIRE_V5_PINS / working fine Sorry for the confusion. Once again, I installed the kernel with the 0x19 in the ALC282_FIXUP_ASPIRE_V5_PINS array and it works as desired. I'm attaching an alsa-info log. Below I'll attach a patch that made the mic work properly.
Created attachment 183101 [details] patch to make the external microphone work in Acer V5-573G
OK, then could you format your patch in a formal way to merge to the upstream, i.e. give a proper subject and the patch description, and last but not least, your signed-off-by tag?
Created attachment 183121 [details] Acer Aspire V5-573G add headset mic support Please let me know if anything's missing.
Created attachment 183131 [details] Acer Aspire V5-573G add headset mic support Please ignore the patch above. It was attached by mistake. Please let me know if anything's missing.
The patch looks good, I'm going to queue it. It'll be included in 4.2-rc4 and backported later to stable kernels. Thanks!
Great! Thank you, too. Take care.
(In reply to Mateusz Sylwestrzak from comment #52) > Created attachment 183131 [details] > Acer Aspire V5-573G add headset mic support > > Please ignore the patch above. It was attached by mistake. > > Please let me know if anything's missing. Hi Mateusz, is it possible to mute the internal mic when a headset with mic attached? Thanks!