Bug 88251
Description
Lukas ThyWalls
2014-11-15 15:37:25 UTC
Created attachment 157691 [details]
alsa-info from KUbuntu 14.10 by default using only hdaAnalyzer
Created attachment 157701 [details]
alsa-info from KUbuntu 14.10 using laptop-eapd model
Created attachment 157711 [details]
alsa-info from KUbuntu 14.10 - default model after use hdajackretask
Created attachment 157721 [details]
alsa-info from KUbuntu 14.10 - default model+hdajackretask+hda_analyzer and speakers working (1)
Created attachment 157731 [details]
alsa-info from KUbuntu 14.10 - default model+hdajackretask+hda_analyzer spk working and plugged microphone jack (2)
Created attachment 157741 [details]
alsa-info from KUbuntu 14.10 - default model+hdajackretask+hda_analyzer spk NOT working after unplugged microphone jack (3)
Created attachment 157751 [details]
alsa-info from KUbuntu 12.04.5 LiveCD
Created attachment 157761 [details]
alsa-info from KUbuntu 13.04 LiveCD
Created attachment 157771 [details]
alsa-info from KUbuntu 13.10 LiveCD (Problems begins from here)
>>but the default one (without any config in /etc/modprobe.d/alsa-base.conf or
>>"6stack" according to
>>https://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt ) and
>>"laptop-eapd" made significant improvements:
6stack is properly not an correct model for a 6 channel hda codec as 6stack(four line out, mic and line in) require at least a 8 channel hda codec
this is just a clarification: Raymond, i don't put "6stack" model, i put nothing. I only said that in https://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt the default for AD1986A is 6stack, and it is supposed to be the one selected when you don't put nothing in /etc/modprobe.d/alsa-base.conf, or not? If i'm wrong, it's just i don't put any model in the file. If it's in accordance for my configuration... i related what is happening in every stage. Node 0x1a [Pin Complex] wcaps 0x400185: Stereo Amp-Out Control: name="Headphone Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Headphone Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Headphone Jack", index=0, device=0 Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1 Amp-Out vals: [0x19 0x19] Pincap 0x0000001f: OUT HP Detect Trigger ImpSense Pin Default 0x4221401f: [N/A] HP Out at Ext Front Conn = 1/8, Color = Green DefAssociation = 0x1, Sequence = 0xf Pin-ctls: 0xc0: OUT HP Unsolicited: tag=01, enabled=1 Connection: 1 0x0a Node 0x1b [Pin Complex] wcaps 0x400185: Stereo Amp-Out Control: name="PCM Playback Volume", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="PCM Playback Switch", index=0, device=0 ControlAmp: chs=3, dir=Out, idx=0, ofs=0 Control: name="Line Out Jack", index=0, device=0 Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1 Amp-Out vals: [0x19 0x19] Pincap 0x0001001f: OUT HP EAPD Detect Trigger ImpSense EAPD 0x2: EAPD Pin Default 0x01014010: [Jack] Line Out at Ext Rear Conn = 1/8, Color = Green DefAssociation = 0x1, Sequence = 0x0 Pin-ctls: 0x40: OUT Unsolicited: tag=05, enabled=1 Connection: 1 0x0b if 0x1b is the internal speakers, you to to change pin default to [Fixed] Speaker at Int and set bit 8 of pin default to 1 to indicate there is no jack detection circuit and driver create speaker phantom jack and not enable unsolicited event, int mic is similar to speaker only hp and mic jacks enabled unsolicited event Created attachment 158011 [details]
hdajackretask config 1 with no jack detection in speakers
Created attachment 158021 [details]
alsa-info of hdajackretask config 1 without jack headphones connected (1)
Created attachment 158031 [details]
alsa-info of hdajackretask config 1 with jack headphones connected (2)
I attached a screenshot with my actual hdajackretask configuration (0x1a, 0x1b, 0x1d, 0x1f. Headphones, speakers, internal mic, and mic, respectively) and config 0x1b (Speakers) similar to 0x1d (Internal mic). Also i attached alsa-info of this configuration, without the headphones jack inserted (first) and with the headphones jack inserted (second). All is working exactly the same: with hda_analyzer i have to activate eapd option in 0x1b, without jack headphones inserted, to bring the sound to the speakers but dissapears when i plug in/out the jack. If i enter hda_analyzer with the headphone jack inserted, the eapd option is activated (and output amplifier bars are muted). Am i doing something or not? Where i can change that bit? https://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio.txt you can use verb to setup eapd of the speaker node by early patching as you can modify the hda-jack-retask.fw the required verb can be found in the diff output of hda-analyzer when you change eapd in hda-analyzer Created attachment 158321 [details]
hda_analyzer diff file when EAPD is activated
Created attachment 158331 [details]
hda_analyzer diff file when EAPD is activated (hda_analyzer generated python script)
Well, despite i don't having found much information about hda-verb and its functionality and use, at least i have made it working. I activated the EAPD in hda_analyzer and i use the diff file (i attached it and its python script version too) to guide me, and i use this command: $ sudo hda-verb /dev/snd/hwC0D0 0x1b SET_EAPD_BTLENABLE 0x2 ^ sound device ^ PIN ^ Command? ^Parameter? But this do the same of hda_analyzer, outside hda_analyzer (of course). I execute it, i have sound in the speakers, then i plug the headphone jack (sound through headphones), and unplug it later, the sound doesn't come again through the speakers and i need to execute again this command. The solution i really need is a permanent command/parameters/configuration to avoid the jack sense and the automatic muting, or something to reverse it. Any advice or guideline? https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/log/sound/pci/hda/patch_analog.c?qt=grep&q=eapd try hda-emu to find out those eapd quirk can fix the problem or not before you really recompile the driver using hda-emu and your codec info seem both model laptop-eapd or laptop-imic have the pin fixup except CD is not disabled it set eapd of 0x1b to 2 when jack is plugged ( jack 0x1a 1) and 0 when unplugged. ( jack 0x1a 0) if the jack detect of 0x1ais correct, you need to ask the author how to fix this case Created attachment 158811 [details]
hda-emu log 1 ¿AD198x?
I learned a bit how works hda-emu, but something, maybe, don't work like it should be. In the log attached of hda-emu, it said AD198x and not AD1986A. I tried with proc file, alsa-info logs and it is always the same AD198x analog. I put "jack" and it doesn't give me a list of jack status (like said in hda-emu README) and i don't have any difference if i use laptop-eapd model or not (i don't know have a "2" status in jack, i have always 0 or 1 if i set it, and if i put 2 it set to 0). Like i see AD198x, i think it could be an old version of hda-emu. I have installed this version https://launchpad.net/~diwic/+archive/ubuntu/hda/+build/6136048, and i try to compile the last version here http://git.kernel.org/cgit/linux/kernel/git/tiwai/hda-emu.git but i can't compile it (it gives me a lot of warnings/errors just with autoconf and automake). Meanwhile, i will try to compile the last version, but maybe this isn't the problem... hda-emu --help you need to provide a pin fixup file to add the missing pin for -P option or use -M option to specify model which add pin fixup may need disable CD pin jack command show four jacks mic phantom mic headohone speaker phantom https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_analog.c?id=632408adfe70be6706cb89522b0d5b3dce188d84 AD1986A_FIXUP_LAPTOP] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { + { 0x1a, 0x02214021 }, /* headphone */ + { 0x1b, 0x90170110 }, /* speaker */ + { 0x1c, 0x411111f0 }, /* N/A */ + { 0x1d, 0x411111f0 }, /* N/A */ + { 0x1e, 0x411111f0 }, /* N/A */ + { 0x1f, 0x02a191f0 }, /* mic */ + { 0x20, 0x411111f0 }, /* N/A */ + {} + }, + }, + [AD1986A_FIXUP_LAPTOP_IMIC] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl[]) { + { 0x1d, 0x90a7013e }, /* int mic */ + {} + }, + .chained_before = 1, + .chain_id = AD1986A_FIXUP_LAPTOP, + }, }; https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/log/sound/pci/hda/hda_generic.c?qt=grep&q=eapd seem need to set flag to invert eapd I'm contacting with one of the hda-emu maintainers for a version question, because of that i waiting a bit for more testing. In other hand, should i use the alsa daily builds https://launchpad.net/~ubuntu-audio-dev/+archive/ubuntu/alsa-daily? The commits you posted aren't new, but for example, i don't have any information about the "laptop-imic" model in my hda-README and that could be because my hda installed drivers are older than that commits. the last fix of eapd related to ad1986a was https://bugzilla.kernel.org/show_bug.cgi?id=75041 Try the patch below. It should be applicable to 3.16, too. It it's really working, I'll brush it up and queue to the git tree. About hda-emu: it's supposed to be built manually with the latest kernel source code. The tarball itself contains the fairly old driver code, so it's useless alone. Created attachment 158901 [details]
Test patch
Hi, i don't write anything because i haven't yet managed to compile ALSA with the patch. I contacted David Henningsson for talking about hda-emu (Well, he said me the same as Mr. Iwai (#c30) about i have to compile it, because his PPA release version have 2 years old and although in the README file says it have the recent drivers, it have at least 2 years old, of course) and i explain as well my problems compiling this alsa drivers, and i haven't a reply yet. If you can help me in this, i think i forgot some requeriment, or i have a mistake on something. I followed this guide http://www.alsa-project.org/main/index.php/Matrix:Module-hda-intel#modules.conf because i don't found anything better. I cloned the git alsa-driver (branch build, i used release branch too with the same results) and in that directory i have the "alsa" directory between "alsa-kernel", what is the "sound" directory of my Kernel 3.16 source with the patch applied without problems. When in try to "configure" it, i have this output: http://pastebin.com/DM5qGDWv "--with-cards" is unrecognized, i have some permission deniedand, the missing commands ALSA_TOPLEVEL_SELECT, ALSA_PARSE_KCONFIG, ALSA_TOPLEVEL_DEFINES, ALSA_TOPLEVEL_OUTPUT, ALSA_TOPLEVEL_INIT. What do i need? the alsa-driver seem can not be built as modules any more configure.ac of hda-emu use AM_INIT_AUTOMAKE which is replaced by http://www.gnu.org/software/automake/manual/html_node/Public-Macros.html At this stage, using hda-emu on the *real* machine doesn't give any benefit. Such a problem has to be confirmed on the real hardware instead of emulation. Lukas, just learn how to build the kernel and how to patch it, and try to install the kernel by yourself. Or, find anyone else who is capable of doing that for you instead. The alsa-driver tree in git.alsa-project.org is broken. You might try other one (e.g. my daily snapshot tarball), but it's not guaranteed to work at all, either. The best is to compile the kernel. (In reply to Lukas ThyWalls from comment #28) > > > In other hand, should i use the alsa daily builds > https://launchpad.net/~ubuntu-audio-dev/+archive/ubuntu/alsa-daily? The > commits you posted aren't new, but for example, i don't have any information > about the "laptop-imic" model in my hda-README and that could be because my > hda installed drivers are older than that commits. https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/log/Documentation/sound/alsa/HD-Audio-Models.txt the documentation have not updated for a long time too https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1316156 seem easynote 45 with ad1986a has jack detection problem Well, i think i get compiled and tested the module with the patch, after a lot of madness, wrong kernel versions (thanks ubuntu) and my proper ignorance... First of all, in the patch, in the second last line there is an error: { .id = AD1986A_FIXUP_EAPD_SEPAKER, .name = "eapd-speaker" }, ^ SPEAKER Second, and only just in case, i create the modules compiling my whole kernel and making al .ko including the snd-hda ones, and copying ONLY snd-hda-codec-analog.ko to my modules folder (is it more than this needed? It seems to work, but maybe needs other .ko copied). Third, I added in the /etc/modprobe.d/alsa-base.conf "options snd-hda-intel model=easynote". I don't use hdajackretask because with the model i have all configured already. With that i have: - Outputs detected in KDE system sound preferences: Speakers (with that name, no "Line out" or "Analog output"), Analog Headphones. Inputs: Microphone, Internal Mic, Analog Line In (I really don't have any "Line In" in my computer, this should be not needed and in the past it doesn't appear, in hdajackretask actually doesn't appear in any pin too) - Sound through speakers, and not through headphones. I have the same behavior that before but backwards: I have sound through speakers, i plug headphones and the sound disappears in both places (I can hear how it disappears in the headphones when i plug in the jack). If i use hda_analyzer, i need to activate eapd in 0x1b everytime i plugin the jack to hear the sound through headphones, because when i plug out, the sound go through speakers, but i doesn't come again when i plug in the jack through the headphones. With the same command that before with the speakers, i can bring back the sound through headphones: $ sudo hda-verb /dev/snd/hwC0D0 0x1b SET_EAPD_BTLENABLE 0x2 One detail i don't have before: when i have plugged the headphones and there is some music playing, i can hear continuously a lot of "pops" that seems to be the music (they have the same rythym and when i pause the music, they disappear) but the sound never reaches after those pops. I said that because when i use the command above, the music appears from behind those pops until it mixed with the pops and they disappear. - The mic and the internal mic works without any hdajackretask configuration, but if i don't have the pink mic jack plugged, and i selected in the KDE sound preferences to use the microphone (not the internal mic), it records a lot of noise. This doesn't happen before, always have a little bit of noise (the computer is old, in Windows i have the same noise too) but now maybe something is not muted when the jack is unplugged. - One detail: The volume of the speakers/headphones are lower than before. This is not only with this patch, i detected that testing between AD198x and AD1986A in these days. I see in pins 0x1a and 0x1b (headphones and speakers respectively) in hda_analyzer, right and left output amplifier are not always in 31 (max value), with this patch are in 29, without the patch are in 26, in some case/configurations are in headphones, and others in speakers... the results is always one of them, headphones and speakers, with the mixer in max volume is lower than before and it could be better. - Other detail: Testing between Windows and Linux these days, i remembered i have in windows "Stereo Mix". I don't have any Stereo Mix now and before, only i remembered testing models with this problem, in one of them (i don't remember what one) "Stereo Mix" appears as option in Audacity, but it only records noise (the same noise as i related above). In Windows it works, but i don't see here where to config this in hdajackretask, and i don't know if it could be related with some of the problems, maybe the noise, or other things. -------- I will upload two alsa-info: one without the jack headphones plugged and other with it. To remember: I have "easynote" model in alsa-base.conf. hdajackretask, this time is not used, as the model automaticly put all the pins like it should be as default. Other info as exactly the same as before, like hda-jack-sense-test (with mic and headphones jacks plugged): $ sudo hda-jack-sense-test -a Pin 0x1a (Not connected): present = Yes <--- Headphones Pin 0x1b (Green Line Out): present = No <--- Speakers Pin 0x1c (Not connected): present = No Pin 0x1d (Not connected): present = No <--- Internal Mic Pin 0x1e (Not connected): present = No Pin 0x1f (Pink Mic): present = Yes <--- Microphone Pin 0x20 (Not connected): present = No Pin 0x21 (Not connected): present = No Pin 0x22 (Internal CD): present = No Pin 0x23 (Not connected): present = No Pin 0x24 (Internal Other): present = No Pin 0x25 (Other SPDIF Out): present = No Buff!! xD Created attachment 159831 [details]
alsa-info - model easynote patch 1 - green jack out
Created attachment 159841 [details]
alsa-info - model easynote patch 1 - green jack in
Right, it was a typo(In reply to Lukas ThyWalls from comment #36) > First of all, in the patch, in the second last line there is an error: > { .id = AD1986A_FIXUP_EAPD_SEPAKER, .name = "eapd-speaker" }, > ^ SPEAKER Yes, that's a typo. > Third, I added in the /etc/modprobe.d/alsa-base.conf "options snd-hda-intel > model=easynote". This is unnecessary. It should work without model option. > - Outputs detected in KDE system sound preferences: Speakers (with that > name, no "Line out" or "Analog output"), Analog Headphones. Inputs: > Microphone, Internal Mic, Analog Line In (I really don't have any "Line In" > in my computer, this should be not needed and in the past it doesn't appear, > in hdajackretask actually doesn't appear in any pin too) This is an issue of KDE. Possibly something is wrongly recorded or configured, no problem of the driver (as it doesn't provide any line-in related controls at all). > - Sound through speakers, and not through headphones. I have the same > behavior that before but backwards: I have sound through speakers, i plug > headphones and the sound disappears in both places (I can hear how it > disappears in the headphones when i plug in the jack). If i use > hda_analyzer, i need to activate eapd in 0x1b everytime i plugin the jack to > hear the sound through headphones, because when i plug out, the sound go > through speakers, but i doesn't come again when i plug in the jack through > the headphones. > With the same command that before with the speakers, i can bring back the > sound through headphones: > > $ sudo hda-verb /dev/snd/hwC0D0 0x1b SET_EAPD_BTLENABLE 0x2 > > One detail i don't have before: when i have plugged the headphones and there > is some music playing, i can hear continuously a lot of "pops" that seems to > be the music (they have the same rythym and when i pause the music, they > disappear) but the sound never reaches after those pops. I said that because > when i use the command above, the music appears from behind those pops until > it mixed with the pops and they disappear. So, EAPD = 0x02 is needed also for the headphone? This was never clear to me. > - The mic and the internal mic works without any hdajackretask > configuration, but if i don't have the pink mic jack plugged, and i selected > in the KDE sound preferences to use the microphone (not the internal mic), > it records a lot of noise. This doesn't happen before, always have a little > bit of noise (the computer is old, in Windows i have the same noise too) but > now maybe something is not muted when the jack is unplugged. With the new configuration, there is no software capture source selection *at all*. If you can choose anything, it's a bug in KDE side (or PulseAudio if it's used). Maybe a stale information remains? Or does it choose the modem line instead...? In anyway, something is wrong there. > - One detail: The volume of the speakers/headphones are lower than before. > This is not only with this patch, i detected that testing between AD198x and > AD1986A in these days. I see in pins 0x1a and 0x1b (headphones and speakers > respectively) in hda_analyzer, right and left output amplifier are not > always in 31 (max value), with this patch are in 29, without the patch are > in 26, in some case/configurations are in headphones, and others in > speakers... the results is always one of them, headphones and speakers, with > the mixer in max volume is lower than before and it could be better. It's user-space issue (either kmix or PulseAudio). The driver just takes up to 31. > - Other detail: Testing between Windows and Linux these days, i remembered i > have in windows "Stereo Mix". I don't have any Stereo Mix now and before, > only i remembered testing models with this problem, in one of them (i don't > remember what one) "Stereo Mix" appears as option in Audacity, but it only > records noise (the same noise as i related above). In Windows it works, but > i don't see here where to config this in hdajackretask, and i don't know if > it could be related with some of the problems, maybe the noise, or other > things. This is still possible but currently disabled as default. When this feature is enabled, the automatic mic-selection is disabled instead, and majority of users prefer the mic selection than stereo-mix input. You can enable it by giving a hint string "add_stereo_mix_input = true". At best, passed via "patch" firmware. See Documentation/sound/alsa/HD-Audio.txt for a brief instruction. The revised patch is below. Created attachment 159851 [details]
Revised patch
Node 0x03 [Audio Output] wcaps 0x44d: Stereo Amp-Out Device: name="AD1986A Analog", type="Audio", device=0 Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1 Amp-Out vals: [0x17 0x17] Converter: stream=0, channel=0 Power states: D0 D3 Power: setting=D0, actual=D0 Processing caps: benign=1, ncoeff=70 there are some undocumented vendor coefficient init verbs used by windows driver try coef_dump https://bugzilla.kernel.org/show_bug.cgi?id=87771#c10 you got lower volume because the linux driver restrict the max vol to 0dB 0x17 instead of 0x1f +12dB Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1 Amp-Out vals: [0x17 0x17] (
>
> > - Other detail: Testing between Windows and Linux these days, i remembered
> i
> > have in windows "Stereo Mix". I don't have any Stereo Mix now and before,
> > only i remembered testing models with this problem, in one of them (i don't
> > remember what one) "Stereo Mix" appears as option in Audacity, but it only
> > records noise (the same noise as i related above). In Windows it works, but
> > i don't see here where to config this in hdajackretask, and i don't know if
> > it could be related with some of the problems, maybe the noise, or other
> > things.
>
> This is still possible but currently disabled as default. When this feature
> is enabled, the automatic mic-selection is disabled instead, and majority of
> users prefer the mic selection than stereo-mix input.
>
> You can enable it by giving a hint string "add_stereo_mix_input = true". At
> best, passed via "patch" firmware. See
you just need to disable auto mic selection by hint since add_stereo_mix_input has been enabled by default for all adi codecs but just surppressed by auto mic
auto_mic=0
pactl list sources it is pulseaudio if the above command show line in port when your notebook don't have line in jack othwise it is bug of kde Created attachment 159871 [details]
patch to add stereo/mono mix to pulseaudio
The patch is designed for add back stereo mix/mono mix to pulseaudio for the desktop with HDA codecs and AC97 codec , you may need to disable mic jack detection when using notebook
(In reply to Takashi Iwai from comment #39) > > Third, I added in the /etc/modprobe.d/alsa-base.conf "options snd-hda-intel > > model=easynote". > > This is unnecessary. It should work without model option. Ok. Without "easynote" model i have the same inputs/outputs. I read about the model config is deprecated, but without the patch and using different models there are different behaviors. In this case with the patch 1 all seems to be the same with and without "easynote" model. (In reply to Takashi Iwai from comment #39) > > - Outputs detected in KDE system sound preferences: Speakers (with that > > name, no "Line out" or "Analog output"), Analog Headphones. Inputs: > > Microphone, Internal Mic, Analog Line In (I really don't have any "Line In" > > in my computer, this should be not needed and in the past it doesn't > appear, > > in hdajackretask actually doesn't appear in any pin too) > > This is an issue of KDE. Possibly something is wrongly recorded or > configured, no problem of the driver (as it doesn't provide any line-in > related controls at all). Well, i don't think it's an issue with KDE. Now with the patch1 i have always the same input/outputs, but without it, every model i config, or doing a hdajackretask, the input/outputs are different. For example, with model 3stack, i had a "line in" (named "analog input") with the same behavior of the actual "line in" and i think with 6stack it have too, but others doesn't have any "line in". Maybe with the patch 1, one of the other pins are detected like a "line in" and that's all. It could be a KDE bug, but then it was the first time with this problem, in the past i don't have it. (In reply to Raymond from comment #44) > pactl list sources > > it is pulseaudio if the above command show line in port when your notebook > don't have line in jack > > othwise it is bug of kde I will attach "pactl list sources" output for expanding the info. There is an "Analog Input" between the both microphones. (In reply to Takashi Iwai from comment #39) > > - Sound through speakers, and not through headphones. I have the same > > behavior that before but backwards: I have sound through speakers, i plug > > headphones and the sound disappears in both places (I can hear how it > > disappears in the headphones when i plug in the jack). If i use > > hda_analyzer, i need to activate eapd in 0x1b everytime i plugin the jack > to > > hear the sound through headphones, because when i plug out, the sound go > > through speakers, but i doesn't come again when i plug in the jack through > > the headphones. > > With the same command that before with the speakers, i can bring back the > > sound through headphones: > > > > $ sudo hda-verb /dev/snd/hwC0D0 0x1b SET_EAPD_BTLENABLE 0x2 > > > > One detail i don't have before: when i have plugged the headphones and > there > > is some music playing, i can hear continuously a lot of "pops" that seems > to > > be the music (they have the same rythym and when i pause the music, they > > disappear) but the sound never reaches after those pops. I said that > because > > when i use the command above, the music appears from behind those pops > until > > it mixed with the pops and they disappear. > > So, EAPD = 0x02 is needed also for the headphone? This was never clear to > me. I'v used it several times and always works, exactly the same in the past with the speakers. I don't understand too, i always thinking something is confused there, with the pins 0x1a-0x1b, the jack detections, what is connected and what is every pin, the EAPD, what is muting in every case (because is obvious when i plug the jack, the driver is muting the sound in that jack, i hear how is doing that) (In reply to Takashi Iwai from comment #39) > > - The mic and the internal mic works without any hdajackretask > > configuration, but if i don't have the pink mic jack plugged, and i > selected > > in the KDE sound preferences to use the microphone (not the internal mic), > > it records a lot of noise. This doesn't happen before, always have a little > > bit of noise (the computer is old, in Windows i have the same noise too) > but > > now maybe something is not muted when the jack is unplugged. > > With the new configuration, there is no software capture source selection > *at all*. If you can choose anything, it's a bug in KDE side (or PulseAudio > if it's used). Maybe a stale information remains? Or does it choose the > modem line instead...? > In anyway, something is wrong there. I don't think it's kde, because without the patch the microphones are working like they should be, and now don't. I mean, without the patch, when i had plugged the mic jack, the default is the mic, when i unplug it, the internal mic is selected, and when i plug the jack again, the jack mic is selected again. But in KDE sound preferences i can pick between mic and internal mic forcing that, and if i have the jack plugged and i select internal mic, it is in silence, and otherwise, if the jack is unplugged and i select the mic, it is in silence (Obviously, if i pick the mic with the jack, or if i pick the internal mic and the jack is unplugged, the sound comes with the correct source). I know this isn't the normal use, but it's consistent. With the patch this is not happening, the autoselection is working without problems, but if i pick the mic without the jack mic plugged, it records a lot of noise (80-90%). If i pick the internal mic with the jack plugged it is in silence like always, but the opposite is making this noise. Like i said above, it's like now the driver is not muting the input. (In reply to Takashi Iwai from comment #39) > > - One detail: The volume of the speakers/headphones are lower than before. > > This is not only with this patch, i detected that testing between AD198x > and > > AD1986A in these days. I see in pins 0x1a and 0x1b (headphones and speakers > > respectively) in hda_analyzer, right and left output amplifier are not > > always in 31 (max value), with this patch are in 29, without the patch are > > in 26, in some case/configurations are in headphones, and others in > > speakers... the results is always one of them, headphones and speakers, > with > > the mixer in max volume is lower than before and it could be better. > > It's user-space issue (either kmix or PulseAudio). The driver just takes up > to 31. (In reply to Raymond from comment #42) > you got lower volume because the linux driver restrict the max vol to 0dB > 0x17 instead of 0x1f +12dB > > Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1 > Amp-Out vals: [0x17 0x17] And how to put it in the max 0x1f by default? i can do it with hda_analyzer, but when i use the master volume it returns to the reference of the max volume of the beginning (29, 26...), and it is losing volume power what i have with AD198x driver. ----- I will test the patch 2 tomorrow. About the stereo mix, i'm only talking about it, because there is any relation with the problems. First, i want to bring back the normal behavior, and later, if it's possible test a bit the stereo/mono mix. I will test Raymond's patch after that or maybe in one of the compiling cycles. Created attachment 159911 [details]
pactl list sources output - with patch 1
Puertos: analog-input-microphone-internal: Micrófono interno (priority: 8900, not available) analog-input: Entrada analógica (priority: 10000) analog-input-microphone: Micrófono (priority: 8700, available) Puerto Activo: analog-input-microphone Formatos: pcm as pulseaudio have three ports intead of two mic(internal and external mic) this look like pulseaudio bug since it intend to hide those stereo mix and mono mix in the capture source,cd line in seem to be use as fallback for analog-input: Entrada analógica (priority: 10000) ( > > you got lower volume because the linux driver restrict the max vol to 0dB > > 0x17 instead of 0x1f +12dB > > > > Amp-Out caps: ofs=0x17, nsteps=0x1f, stepsize=0x05, mute=1 > > Amp-Out vals: [0x17 0x17] > > And how to put it in the max 0x1f by default? i can do it with hda_analyzer, > but when i use the master volume it returns to the reference of the max > volume of the beginning (29, 26...), and it is losing volume power what i > have with AD198x driver. > refer to your 12.04 alsa_info, the controls was lost after changed to use hda_generic.c it is not easy to add it back but seem via codecs still have the control which can change the volume of dac signal when using stereo mix to record Pcm loopback playback volume control.1 { iface MIXER name 'PCM Playback Volume' value.0 23 value.1 23 comment { access 'read write' type INTEGER count 2 range '0 - 31' dbmin -3450 dbmax 1200 dbvalue.0 0 dbvalue.1 0 } } https://launchpadlibrarian.net/184055912/AlsaInfo.txt Well tested Patch 2... we have bingo. The sound doesn't disappear when i change between speakers and headphones, when i plug in and plug out the green headphone jack. It works like should be. I will attach both alsa-info with the jack plugged and unplugged. However, the problem created with the patch of the "extra analog input" and "noise in mic input when mic jack is unplugged" remains. In the two alsa-info attached, i plug and unplug both jacks, green headphone jack and pink mic jack, for info. At least if the behavior comes again like it was with the original AD1986A should be ok, as i related above: (In reply to Lukas ThyWalls from comment #46) > (In reply to Takashi Iwai from comment #39) > > > - The mic and the internal mic works without any hdajackretask > > > configuration, but if i don't have the pink mic jack plugged, and i > selected > > > in the KDE sound preferences to use the microphone (not the internal > mic), > > > it records a lot of noise. This doesn't happen before, always have a > little > > > bit of noise (the computer is old, in Windows i have the same noise too) > but > > > now maybe something is not muted when the jack is unplugged. > > > > With the new configuration, there is no software capture source selection > > *at all*. If you can choose anything, it's a bug in KDE side (or > PulseAudio > > if it's used). Maybe a stale information remains? Or does it choose the > > modem line instead...? > > In anyway, something is wrong there. > > I don't think it's kde, because without the patch the microphones are > working like they should be, and now don't. I mean, without the patch, when > i had plugged the mic jack, the default is the mic, when i unplug it, the > internal mic is selected, and when i plug the jack again, the jack mic is > selected again. But in KDE sound preferences i can pick between mic and > internal mic forcing that, and if i have the jack plugged and i select > internal mic, it is in silence, and otherwise, if the jack is unplugged and > i select the mic, it is in silence (Obviously, if i pick the mic with the > jack, or if i pick the internal mic and the jack is unplugged, the sound > comes with the correct source). I know this isn't the normal use, but it's > consistent. > With the patch this is not happening, the autoselection is working without > problems, but if i pick the mic without the jack mic plugged, it records a > lot of noise (80-90%). If i pick the internal mic with the jack plugged it > is in silence like always, but the opposite is making this noise. Like i > said above, it's like now the driver is not muting the input. About the max volume, i don't think it should be a priority, but if there is a solution in the driver side, at least with every driver (original AD1986A, every model, patch 1 and patch 2) there was a difference in the volume. Talking about now with speakers and headphones working with the patch 2, i notice the speakers sounds a great max volume, and the headphones are little bit more quiet at the same master volume, but it's slightly noticiable and enough for a normal working. Created attachment 159971 [details]
alsa-info - patch 2 - both (green and pink) jacks out
Created attachment 159981 [details]
alsa-info - patch 2 - both (green and pink) jacks in
you have to check pulseaudio verbose log , since pulseaudio don't expect int mic and mic jack share the same 'mic boost' control , do pulseaudio change mic boost when you use internal mic since it expect to find int mic boost ? the current driver seem using MIC_1 + MIC_2 (mixed) instead of MIC_1, MIC_2 in Table 85. Microphone Selector in ad1986a datasheet the control in vt2020 has same dB range and same +12dB gain, the difference are the corresponding (xxx playback volume )amp in of ad1986a are the nodes of the connection list instead of inside audio mixer control.9 { iface MIXER name 'PCM Loopback Playback Volume' value.0 23 value.1 23 comment { access 'read write' type INTEGER count 2 range '0 - 31' dbmin -3450 dbmax 1200 dbvalue.0 0 dbvalue.1 0 } Node 0x11 [Audio Selector] wcaps 0x300941: Stereo R/L Connection: 2 0x0f* 0x2b Processing caps: benign=1, ncoeff=0 Table 46. ADI Specific Verb Support Controls the up-mix function of the MIC_1/2 swap widget. Up-Mix will spread the selected left channel (see the left/right swap feature of the enable EAPD/BTL verb description) to both the left and right channel outputs of this stereo widget. (In reply to Lukas ThyWalls from comment #50) > However, the problem created with the patch of the "extra analog input" and > "noise in mic input when mic jack is unplugged" remains. In the two > alsa-info attached, i plug and unplug both jacks, green headphone jack and > pink mic jack, for info. At least if the behavior comes again like it was > with the original AD1986A should be ok, as i related above: What do you mean as "extra analog input"? If it's the stereo mix, it's just a matter of your configuration, as already mentioned. About the mic input: the unplugged alsa-info shows that "Capture Switch" is off and "Capture Volume" is 1 while the plugged state shows that "Capture Switch" on and "Capture Volume" 2. Why this is changed? Did you touch it manually? If not, it's a bug of PulseAudio. For avoiding the influence of PulseAudio, try to login on Linux console without PA running. Adjust the mixer via "alsamixer -c0", turn on and raise "Capture" in the capture view (switched via Tab key). Then record the sound like arecord -Dplughw:1 -fdat foo.wav and try to plug the mic in/out during the recording the stream. how do your hda modem work in windows ? is this a voice modem ? since both easynote mx45 and easynote mx65 have same pci ssid Subsystem: 1631:c022 this patch affect both notebook do alsa driver support processing state, it seem that some of adi and idt codecs support processing state but not processing coefficent Processing caps: benign=1, ncoeff=0 refer to ad1986a datasheet node 0x03 is a proc widget which use proc coefficient to control parametric EQ Processing caps: benign=1, ncoeff=70 node 0x11 support processing state but not processing coef can ncoeff=0 used to determine proc coef is not supported ? Node 0x11 [Audio Selector] wcaps 0x300941: Stereo R/L Connection: 2 0x0f* 0x2b Processing caps: benign=1, ncoeff=0 hda specification 7.3.3.4 Processing State For widgets that implement processing capabilities in the widget, the Processing State command provides a way to control the behavior of the widget. All widgets that implement processing must support the value 00 (Processing Off) and 01 (Processing On). The Processing Parameters can be queried to determine whether the Processing Benign state is supported. 7.3.3.5 Coefficient Index For widgets that have loadable processing coefficients, the Coefficient Index is a zero-based index into the processing coefficient list which will be either read or written using the Processing Coefficient control. When the coefficient has been loaded, the Coefficient Index will automatically increment by one so that the next Load Coefficient verb will load the coefficient into the next slot. If Coefficient Index is set to be greater than the number of “slots” in the processing coefficient list, unpredictable behavior will result if an attempt is made to Get or Set the processing coefficient. Sorry for my absence, i have been a busy week. I will test your suggestions in these days and replying with the responses. (In reply to Takashi Iwai from comment #56) > What do you mean as "extra analog input"? If it's the stereo mix, it's just > a matter of your configuration, as already mentioned. Sorry i explained it very badly. Forget stereo mix. I'm saying i have an "analog input" when i don't have it really. It can't be a KDE bug because if i put the original module (without patches) it disappears. It's very annoying because by default it's selected for recording and i have to select the mics every time. It is in silence, doesn't record anything. Today or tomorrow i will post more information. There is no mixer control to allow you choosing the input source after patching. So, this can't be the driver's fault. The driver removes all such elements and provides nothing. You can't change anything at all for the onboard audio. (Of course, I don't mean that the mic capture must work with the patch yet; this has to be tested properly. Here I'm arguing about the weird KDE behavior showing "analog input".) That is, KDE gets screwed up by the fact that there is nothing to choose, so it apparently tries to choose the built-in modem capture stream; it's what I'm afraid of. In anyway, we need more information. do you hear the dialing tone when you use the modem in windows or previous version of alsa driver ? if the notebook does not have another mono speaker for the modem analog speaker out do it use the mono input to play the dialing tone through the internal speaker ? Node 0x23 [Pin Complex] wcaps 0x400000: Mono Pincap 0x00000020: IN Pin Default 0x59b771f0: [N/A] Telephony at Int ATAPI Conn = Analog, Color = Yellow DefAssociation = 0xf, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x20: IN Node 0x24 [Pin Complex] wcaps 0x400000: Mono Pincap 0x00000020: IN Pin Default 0x91f711f0: [Fixed] Other at Int Rear Conn = Analog, Color = Black DefAssociation = 0xf, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x20: IN Ok ok, if you put a lot of information and questions and i can't understand most of them because i'm not an expert of linux audio system, i search and complete with all i know, the details you give me and other sources via internet. I go slowly but i want to do well, and some things only confused me. First, i will attach the requested pulseaudio verbose log. During there is creating that log, I used pavucontrol to change between the input sources. I see the "analog input" was silenced, and when it have sound, it have the same input that the last input selected, for example, if i selected mic and after the analog input, it have the same signal of mic. The same with internal mic. I detected the same problem of the noise when i selected the mic with the jack mic unplugged. Second, i disabled pulseaudio at all, and know i'm using kubuntu without it (at least, it seems to be, pavucontrol don't found pulseaudio, and all the kde sound control have changed). Now, the KDE Mixer is a "copy" of alxamixer, with the same controls (Master, PCM, Headphone, Mic, Mic Boost... Mic Boost, Capture, Digital...). I do the test of recording without pulse (i had to change Dplughw:1 to Dplughw:0) and all record without problems. I change between mic and internal mic and both works flawlessly. Without pulse i don't have any control of "Internal-Mic / Mic", only have one mic, one Mic Boost, etc. In the mixer capture tab, it is labeled "Digital", together the "Capture" and "Mic Boost" controls. About the Speakers-Headphones, i have a separated "Master" and "Headphones" control, Master can control both Speakers and Headphones volume, and Headphones control only affects to the Headphones (obviously). Maybe here is the problem with the lower max volume of the headphones compared to the max volume of the speakers, what is very noticiable. With only the detail of the headphones' volume, the alsa sound system SEEMS to work perfectly. Third, answers: - The modem, it appears in all alsa-info: Motorola Si3054, i don't know if sounds or not because i never used it, in Windows or Linux, never. It was detected and configured in Windows, and i see in device manager, and in Linux i don't care, directly. If its needed some testing with it, i can do some things, but i haven't use it never. ----- Can we talk about the alsa problem is fixed and there is a problem with pulseaudio? Created attachment 160561 [details]
Pulseaudio verbose log
try arecord -D hw:0,0 -f CD -v --vumeter=stereo test.wav do both left and right vumeters have signal when you use mic jack/internal mic So, it's something in user-space side that went wrong without the explicit capture source control. Then, instead of the previous patch, try the following three patches. The first two are basically fixes I'll take soon, and the last one is EasyNote-specific fix. With these patches, you'll see "Capture Source" mixer element when running without PA, and you should be able to choose among Mic, Internal Mic and Stereo Mix. Hopefully this will make KDE behavior a bit saner. Created attachment 160671 [details]
Fix patch #1
Created attachment 160681 [details]
Fix patch #2
Created attachment 160691 [details]
Fix patch #3
max_dB are diffrent 52.5 and 22.5 because mic jack path include mic boost +30dB but pulseaudio don't include mic boost in int mic path 47.043| 8.598) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Activating path analog-input-microphone ( 47.043| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Path analog-input-microphone (Microphone), direction=2, priority=87, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=3, min_dB=0, max_dB=52.5 ( 47.043| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Element Mic Boost, direction=2, switch=0, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=4, required_absent=0, mask=0x3600000000f66, n_channels=2, override_map=yes ( 47.043| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Element Capture, direction=2, switch=1, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x3600000000f66, n_channels=2, override_map=yes ( 47.043| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Jack Mic, alsa_name='Mic Jack', detection possible ( 47.043| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Jack Mic Phantom, alsa_name='Mic Phantom Jack', detection unavailable ( 47.043| 0.000) I: [alsa-source-AD1986A Analog] alsa-source.c: Successfully enabled deferred volume. ( 47.043| 0.000) I: [alsa-source-AD1986A Analog] alsa-source.c: Hardware volume ranges from 0.00 dB to 52.50 dB. ( 47.043| 0.000) I: [alsa-source-AD1986A Analog] alsa-source.c: Fixing base volume to -52.50 dB ( 47.043| 0.000) I: [alsa-source-AD1986A Analog] alsa-source.c: Using hardware volume control. Hardware dB scale supported. ( 47.043| 0.000) I: [alsa-source-AD1986A Analog] alsa-source.c: Using hardware mute control. ( 47.043| 0.000) I: [pulseaudio] source.c: Changed port of source 1 "alsa_input.pci-0000_00_1b.0.analog-stereo" to analog-input-microphone ( 47.043| 0.000) I: [pulseaudio] module-device-restore.c: Restoring volume for source alsa_input.pci-0000_00_1b.0.analog-stereo. ( 47.043| 0.000) D: [pulseaudio] core-subscribe.c: Dropped redundant event due to change event. ( 47.043| 0.000) D: [alsa-source-AD1986A Analog] alsa-source.c: Requested volume: 0: 47% 1: 47% ( 47.043| 0.000) D: [alsa-source-AD1986A Analog] alsa-source.c: in dB: 0: -19.50 dB 1: -19.50 dB ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] alsa-source.c: Got hardware volume: 0: 45% 1: 45% ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] alsa-source.c: in dB: 0: -21.00 dB 1: -21.00 dB ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] alsa-source.c: Calculated software volume: 0: 106% 1: 106% (accurate-enough=no) ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] alsa-source.c: in dB: 0: 1.50 dB 1: 1.50 dB ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] source.c: Volume going down to 29273 at 1816441178 ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] ratelimit.c: 35 events suppressed ( 47.044| 0.000) I: [pulseaudio] module-device-restore.c: Restored volume: 0: 47% 1: 47% ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] source.c: Next volume change in 1020 usec ( 47.044| 0.000) I: [pulseaudio] module-device-restore.c: Restoring mute state for source alsa_input.pci-0000_00_1b.0.analog-stereo. ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] source.c: Next volume change in 931 usec ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] source.c: Next volume change in 884 usec ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] source.c: Next volume change in 849 usec ( 47.044| 0.000) I: [pulseaudio] module-device-restore.c: Storing port for device source:alsa_input.pci-0000_00_1b.0.analog-stereo. ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] source.c: Next volume change in 670 usec ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] source.c: Next volume change in 624 usec ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] alsa-source.c: Read hardware volume: 0: 47% 1: 47% ( 47.044| 0.000) D: [alsa-source-AD1986A Analog] alsa-source.c: in dB: 0: -19.50 dB 1: -19.50 dB ( 53.160| 6.116) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Activating path analog-input-microphone-internal ( 53.160| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Path analog-input-microphone-internal (Internal Microphone), direction=2, priority=89, probed=yes, supported=yes, has_mute=yes, has_volume=yes, has_dB=yes, min_volume=0, max_volume=15, min_dB=0, max_dB=22.5 ( 53.160| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Element Capture, direction=2, switch=1, volume=1, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x3600000000f66, n_channels=2, override_map=yes ( 53.160| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Element Mic Boost, direction=2, switch=0, volume=2, volume_limit=-1, enumeration=0, required=0, required_any=0, required_absent=0, mask=0x6, n_channels=2, override_map=no ( 53.160| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Jack Mic, alsa_name='Mic Jack', detection possible ( 53.160| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Jack Dock Mic, alsa_name='Dock Mic Jack', detection unavailable ( 53.160| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Jack Front Mic, alsa_name='Front Mic Jack', detection unavailable ( 53.160| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Jack Rear Mic, alsa_name='Rear Mic Jack', detection unavailable ( 53.160| 0.000) D: [alsa-source-AD1986A Analog] alsa-mixer.c: Jack Internal Mic Phantom, alsa_name='Internal Mic Phantom Jack', detection possible ( 53.160| 0.000) I: [alsa-source-AD1986A Analog] alsa-source.c: Successfully enabled deferred volume. ( 53.160| 0.000) I: [alsa-source-AD1986A Analog] alsa-source.c: Hardware volume ranges from 0.00 dB to 22.50 dB. ( 53.160| 0.000) I: [alsa-source-AD1986A Analog] alsa-source.c: Fixing base volume to -22.50 dB ( 53.160| 0.000) I: [alsa-source-AD1986A Analog] alsa-source.c: Using hardware volume control. Hardware dB scale suppor (In reply to Raymond from comment #65) > try > > > arecord -D hw:0,0 -f CD -v --vumeter=stereo test.wav > > do both left and right vumeters have signal when you use mic jack/internal > mic I tested this, with plug in and plug out the jack and using mic and Internal Mic, and all works fine. I use different levels of volume in capture, digital (mic) and mic boost (and using left and right channels too) and all works like should be. I have a lot of noise, i do a "test" using mic boost, i have always the capture at 100% and digital (mic) at 50%, and using the different mic boost leveles i have (0, 1, 2, 3): http://i.imgur.com/O3X4H8E.png But it's because my old machine, in Windows i have the same levels (0 and 3, because only have a tic for mic amplification, or 0% or 100%). I can't use mic boost for that, and the internal mic is usable but with a some background noise. Thinking about that, i will test if the high noise i see in the KDE sound preferences when i change between mic and internal mic, is something recording at full volume, but first i have to activate pulseaudio, because i said above i'm not using it for now. First i will use the last Iwai's patchs and see if all works ok, and after that i will do other things. the objective of using vumeter and stereo is to find out whether the mic/int mic is stereo or mono if you look at adihdaud.inf, the model "T12F" only mention that Mic 1 and CLFE are used by the windows driver http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-input-internal-mic.conf the workaround is add mic boost to internal mic path or define a new name for the boost control when it is shared by mic and int mic front mic and rear mic for ad1986a desktop similar to those playback volume control https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda?id=03ad6a8c93b6df2d65c305b5b5f9474068b45bfb (In reply to Raymond from comment #72) > the objective of using vumeter and stereo is to find out whether the mic/int > mic is stereo or mono Well, i test this too, but the mics, i don't know how to said this, are "physically" mono, but with the driver i can record both right and left channels (i changed separately both channels with the mixer) muting one of them and the other is working. are they really stereo? I don't have a proper stereo mic, and because that i don't know... but with the driver, the mics seem to be stereo... (In reply to Takashi Iwai from comment #66) > So, it's something in user-space side that went wrong without the explicit > capture source control. Then, instead of the previous patch, try the > following three patches. The first two are basically fixes I'll take soon, > and the last one is EasyNote-specific fix. > > With these patches, you'll see "Capture Source" mixer element when running > without PA, and you should be able to choose among Mic, Internal Mic and > Stereo Mix. Hopefully this will make KDE behavior a bit saner. I have the patches working. First, all is working, second, i have now stereo mix and Internal mic separated from mic in capture and other things. All seems working, but it has details. I will attach the alsa-info file as usual, and these are the elements in alsamixer playback tab http://i.imgur.com/QGMlgS6.jpg (Master, Headphone, Speaker, PCM, Mic, Mic Boost, Beep, Auto-Mute, Caller ID, Off-hook) and in capture tab http://i.imgur.com/D9oUbYg.jpg (Mic, Mic Boost, Capture, Digital, Internal Mic, Stereo Mix). Details: - Have you done something with the max volume with headphones? I don't know, but maybe it feels slightly better or like should be. I think all the volume should be accesible for that videos and music recorded with a low level, and because that i'm a little bit "a pain in the neck" with that... - Master, Headphone and Speaker go from -46,5 db to 0, and PCM from -51 db to 0. I said that because with Master, Headphone and Speaker (each one affects only what said in the name, obviously) reached to 0% volume (-46,5 db) i can hear a little bit the sound yet. Only lowering PCM volume, the sound disappears at all. - I haven't controls for Mic, Internal Mic and Stereo Mix in capture tab, only have "digital" with which i can control Mic and Internal Mic (with a range of -30db to 30db, i normally set it to 0). The Capture element control when i record from the mics should be always in 100%, because the difference of the volume record between having capture volume in 0% and 100% it's only between 0,05 and 0,25 of 1 in Audacity, and all the control volume is with digital. - With the Stereo Mix, it works, but i have to put the capture element in 1,50 db (the lowest level without to be 0, a 7%, what make no record at all). With that i have a proper volume of the sound of speakers/headphones, and if i turn up the capture element, the sound goes quickly to distorsions for high volume. - Using the Mic between Stereo Mix, i have to put Mic and Mic boost of playback tab to 100% to have a proper volume to mix both. The Mic playback volume is low compared to mic record volume. And i think that's all for now. If i remember or find something, i will post it. Created attachment 161061 [details]
alsa-info - patch(s) 3
OK, then I'm going to merge this fix patch to sound git tree for 3.19-rc1. Regarding "PCM" volume. This is a dummy volume that is used only for softvol plugin, and ignored when you run with PA. Ditto for "Digital" volume. This is a softvol volume for the capture, again ignored by PA. There are no individual capture volume control for inputs, indeed, and it's the standard chip design. There are individual loopback volume controls, but they are different from the capture volume itself. it depend on the notebook use mic_1 , or both mic_1 and mic_2 for the mic jack for those idt codecs, the driver allow user to retask the mic jack to (stereo) line in jack with mic jack mode control by using hint add_jack_modes=1 Figure 3. Microphone Selection/Mixing Block Diagram Azalia MSWP[2:0]0x7AD02:00 MMIX 2CMIC MS MSWP 2MSWP 1MSWP0 Right Left 000 MIC1 MIC1 001 MIC2 MIC2 010 MIC2 MIC1 011 MIC1 MIC2 1xxMIC1+2 MIC1+2 when you select stereo mix, which select audio mixer node 0x07 as input source those mic, cd, beep playback volume control and mic boost affect the capture signal the stereo mix of hda is slightly different from ac97 codec or windows and since all these hda codecs audio mixer have the signal from audio output (e.g. ad1988,...) (In reply to Takashi Iwai from comment #76) > OK, then I'm going to merge this fix patch to sound git tree for 3.19-rc1. > > Regarding "PCM" volume. This is a dummy volume that is used only for > softvol plugin, and ignored when you run with PA. Ditto for "Digital" > volume. This is a softvol volume for the capture, again ignored by PA. > > There are no individual capture volume control for inputs, indeed, and it's > the standard chip design. There are individual loopback volume controls, > but they are different from the capture volume itself. And there is no chance to adjust the levels of the elements to be more consistent when you use them together or one after the other? I'm saying about using Stereo Mix, the capture for the sound loopback has to be in the lowest level to have a normal volume, but you can't make the sound loopback lower for recording the mic above it, you only can make it higher (and it makes noisy and distorted too). You can't use Master, Speaker, Headphone for this, they don't change anything in the recording of stereo mix. And if i need to change the source input from stereo mix and mic, i need to change too the capture level from lowest to highest every time when changing between, and vice versa. do you mean you want to add back the missing "PCM loopback volume control" since the driver want the max dB of output path at 0dB , this kind of control cannot be enabled by default ? https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_via.c?id=3214b9665c06f684011f169428963b20f8ac554b (In reply to Raymond from comment #79) > do you mean you want to add back the missing "PCM loopback volume control" > since the driver want the max dB of output path at 0dB , this kind of > control cannot be enabled by default ? A proper loopback volume control should be the best, but having a proper capture base volume should be nice too, because i can only put the same output volume in loopback or more, and i can't record less volume because the lowest volume after silence is a normal volume. Maybe it isn't related, but it's the same thing than the headphones volume: All the volume aren't really consistent, if you put all the controls at the same level you should expect the same volume, and this is not happening now. http://digitalbreed.com/2007/enabling-stereomix-with-soundmax-drivers it is not easy for alsamixer, kmix , gnome sound preference provide the same user friendliness user interface of those codec specifc feature as the SoundMax control panel, realtek HD audio manager , ... https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/?id=67e9f4b68c9d1820132c559c0f9b296dafdf631e it seem some feature supported by ac97 interface may not supported by Azaila interface add back "PCM Loopback" playback volume/switch for those via codecs and ad1986a static int create_input_ctls(struct hda_codec *codec) { struct hda_gen_spec *spec = codec->spec; const struct auto_pin_cfg *cfg = &spec->autocfg; hda_nid_t mixer = spec->mixer_nid; + struct nid_path *path; + hda_nid_t dac, adc; + const hda_nid_t *conn; + nums; int num_adcs; int i, err; unsigned int val; ... /* add stereo mix when explicitly enabled via hint */ if (mixer && spec->add_stereo_mix_input == HDA_HINT_STEREO_MIX_ENABLE) { err = parse_capture_source(codec, mixer, CFG_IDX_MIX, num_adcs, "Stereo Mix", 0); if (err < 0) return err; else spec->suppress_auto_mic = 1; } + dac = spec->multiout.dac_nids[0]; + adc = spec->adc_nids[0]; + if (mixer && spec->add_stereo_mix_input && + is_reachable_path(codec, dac, adc)) { + + if (nid_has_volume(codec, mixer, HDA_INPUT) && + nid_has_mute(codec, mixer, HDA_INPUT)) { + nums = snd_hda_get_conn_list(codec, mixer, &conn); + for (i = 0; i < nums; i++) + if (dac == conn[i]) + err = new_analog_input(codec, i, dac, + "PCM Loopback", 0, mixer); + } + else { + path = snd_hda_add_new_path(codec, dac, mixer, 0); + print_nid_path(codec, "pcm loopback", path); + if (nid_has_volume(codec, dac, HDA_OUTPUT)) { + path->ctls[NID_PATH_VOL_CTL] = + HDA_COMPOSE_AMP_VAL(dac, 3, 0, HDA_OUTPUT); + err = add_stereo_vol(codec, "PCM Loopback", 0, path); + if (err < 0) + return err; + } + if (nid_has_mute(codec, dac, HDA_OUTPUT)) { + path->ctls[NID_PATH_MUTE_CTL] = + HDA_COMPOSE_AMP_VAL(dac, 3, 0, HDA_OUTPUT); + err = add_stereo_sw(codec, "PCM Loopback", 0, path); + if (err < 0) + return err; + } + } + } return 0; } you will also need to add [Element] pcm loopback simial to [Element] pcm into switch should be on instead of mute http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output.conf.common seem affect conexant codecs too it is better add more restriction to + if (mixer && spec->add_stereo_mix_input && (!spec->auto_mic) && + is_reachable_path(codec, dac, adc)) { With KUbuntu 15.04 (Kernel 3.19), the sound problem seems to be resolved and now the sound is working directly. I have another problems, but i don't think they aren't related. |