Page 3 of 5

Re: Cant Use External mic, using hw mic jack

Posted: Sun Jan 13, 2019 1:13 pm
by MrEen
eMINT wrote: Sun Jan 13, 2019 3:28 am
MrEen wrote: Sun Jan 13, 2019 12:04 am Just found a weird site ( :wink: ) that has a potential fix for you: https://community.linuxmint.com/hardware/view/21276

First see if the alsamixer stuff applies at all. If not, change the sudo nano /etc/rc.local to gksudo xed /etc/modprobe.d/alsa-base.conf

Hope that helps!

EDIT: The change to alsa-base.conf is probably not going to help based on other things I have found. I was a temp solution a few years ago, and I suspect it will not help you now. I still have some hope for alsamixer.
adding that to rc.local breaks everything no sound no record no nothing

adding to gksudo xed /etc/modprobe.d/alsa-base.conf

there is sound but everything is like before...
My apologies for not being more clear. I never wanted you to try the rc.local change as that's an old/outdated file location.

Anyway, the part about alsamixer looks like it applies in your case: The microphone input never worked for me first try until I went into "aslamixer" and turn on "AMic1/DMic" and "Mic1-Boost".

Looking back, I see those things not checked in your qasmixer screenshot. Try checking them there if you're having issues with alsamixer.

Re: Cant Use External mic, using hw mic jack

Posted: Sun Jan 13, 2019 9:05 pm
by eMINT
MrEen wrote: Sun Jan 13, 2019 1:13 pm
eMINT wrote: Sun Jan 13, 2019 3:28 am
MrEen wrote: Sun Jan 13, 2019 12:04 am Just found a weird site ( :wink: ) that has a potential fix for you: https://community.linuxmint.com/hardware/view/21276

First see if the alsamixer stuff applies at all. If not, change the sudo nano /etc/rc.local to gksudo xed /etc/modprobe.d/alsa-base.conf

Hope that helps!

EDIT: The change to alsa-base.conf is probably not going to help based on other things I have found. I was a temp solution a few years ago, and I suspect it will not help you now. I still have some hope for alsamixer.
adding that to rc.local breaks everything no sound no record no nothing

adding to gksudo xed /etc/modprobe.d/alsa-base.conf

there is sound but everything is like before...
My apologies for not being more clear. I never wanted you to try the rc.local change as that's an old/outdated file location.

Anyway, the part about alsamixer looks like it applies in your case: The microphone input never worked for me first try until I went into "aslamixer" and turn on "AMic1/DMic" and "Mic1-Boost".

Looking back, I see those things not checked in your qasmixer screenshot. Try checking them there if you're having issues with alsamixer.
i forgot to mention that i read that and also tried. anyway i've just tried again.and it doesnt work
Selection_060.png

Re: Cant Use External mic, using hw mic jack

Posted: Sun Jan 13, 2019 10:28 pm
by MrEen
Can I see the output of cat /etc/modprobe.d/alsa-base.conf | tail please?

Add the output of pacmd list-cards as well. I am almost out of ideas. Has the computer been fully shut down for at least several minutes at any time since we started trying to fix this? If not, give that a shot. And I know this will sound weird, but when booting back up, if it's still not working, do a reboot right away then test again.

Re: Cant Use External mic, using hw mic jack

Posted: Mon Jan 14, 2019 12:14 am
by eMINT
MrEen wrote: Sun Jan 13, 2019 10:28 pm Can I see the output of cat /etc/modprobe.d/alsa-base.conf | tail please?

Add the output of pacmd list-cards as well. I am almost out of ideas. Has the computer been fully shut down for at least several minutes at any time since we started trying to fix this? If not, give that a shot. And I know this will sound weird, but when booting back up, if it's still not working, do a reboot right away then test again.
cat /etc/modprobe.d/alsa-base.conf

Code: Select all

# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7

# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-ioctl32 ; /sbin/modprobe --quiet --use-blacklist snd-seq ; }
#
# Workaround at bug #499695 (reverted in Ubuntu see LP #319505)
install snd-pcm /sbin/modprobe --ignore-install snd-pcm $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-pcm-oss ; : ; }
install snd-mixer /sbin/modprobe --ignore-install snd-mixer $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-mixer-oss ; : ; }
install snd-seq /sbin/modprobe --ignore-install snd-seq $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; /sbin/modprobe --quiet --use-blacklist snd-seq-oss ; : ; }
#
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq-midi ; : ; }
# Cause optional modules to be loaded above sound card driver modules
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-emu10k1-synth ; }
install snd-via82xx /sbin/modprobe --ignore-install snd-via82xx $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist snd-seq ; }

# Load saa7134-alsa instead of saa7134 (which gets dragged in by it anyway)
install saa7134 /sbin/modprobe --ignore-install saa7134 $CMDLINE_OPTS && { /sbin/modprobe --quiet --use-blacklist saa7134-alsa ; : ; }
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-caiaq index=-2
options snd-usb-ua101 index=-2
options snd-usb-us122l index=-2
options snd-usb-usx2y index=-2
# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2

# emi test
#alias snd-card-0 snd-hda-intel
#options snd-hda-intel model=dell-m4-1 enable_msi=1

# emi fix audio recording test 2
#rmmod snd_hda_intel
#modprobe snd_hda_intel model=generic
pacmd list-cards

Code: Select all

1 card(s) available.
    index: 0
	name: <alsa_card.pci-0000_00_1f.3>
	driver: <module-alsa-card.c>
	owner module: 6
	properties:
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xdd628000 irq 145"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "a170"
		device.product.name = "Sunrise Point-H HD Audio"
		device.form_factor = "internal"
		device.string = "0"
		device.description = "Built-in Audio"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	profiles:
		input:analog-stereo: Analog Stereo Input (priority 60, available: unknown)
		output:analog-stereo: Analog Stereo Output (priority 6000, available: unknown)
		output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060, available: unknown)
		output:hdmi-stereo: Digital Stereo (HDMI) Output (priority 5400, available: unknown)
		output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (priority 5460, available: unknown)
		output:hdmi-surround: Digital Surround 5.1 (HDMI) Output (priority 300, available: unknown)
		output:hdmi-surround+input:analog-stereo: Digital Surround 5.1 (HDMI) Output + Analog Stereo Input (priority 360, available: unknown)
		output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (priority 300, available: unknown)
		output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (priority 360, available: unknown)
		output:hdmi-stereo-extra1: Digital Stereo (HDMI 2) Output (priority 5200, available: unknown)
		output:hdmi-stereo-extra1+input:analog-stereo: Digital Stereo (HDMI 2) Output + Analog Stereo Input (priority 5260, available: unknown)
		output:hdmi-surround-extra1: Digital Surround 5.1 (HDMI 2) Output (priority 100, available: unknown)
		output:hdmi-surround-extra1+input:analog-stereo: Digital Surround 5.1 (HDMI 2) Output + Analog Stereo Input (priority 160, available: unknown)
		output:hdmi-surround71-extra1: Digital Surround 7.1 (HDMI 2) Output (priority 100, available: unknown)
		output:hdmi-surround71-extra1+input:analog-stereo: Digital Surround 7.1 (HDMI 2) Output + Analog Stereo Input (priority 160, available: unknown)
		output:hdmi-stereo-extra2: Digital Stereo (HDMI 3) Output (priority 5200, available: unknown)
		output:hdmi-stereo-extra2+input:analog-stereo: Digital Stereo (HDMI 3) Output + Analog Stereo Input (priority 5260, available: unknown)
		output:hdmi-surround-extra2: Digital Surround 5.1 (HDMI 3) Output (priority 100, available: unknown)
		output:hdmi-surround-extra2+input:analog-stereo: Digital Surround 5.1 (HDMI 3) Output + Analog Stereo Input (priority 160, available: unknown)
		output:hdmi-surround71-extra2: Digital Surround 7.1 (HDMI 3) Output (priority 100, available: unknown)
		output:hdmi-surround71-extra2+input:analog-stereo: Digital Surround 7.1 (HDMI 3) Output + Analog Stereo Input (priority 160, available: unknown)
		off: Off (priority 0, available: unknown)
	active profile: <output:analog-stereo+input:analog-stereo>
	sinks:
		alsa_output.pci-0000_00_1f.3.analog-stereo/#0: Built-in Audio Analog Stereo
	sources:
		alsa_output.pci-0000_00_1f.3.analog-stereo.monitor/#0: Monitor of Built-in Audio Analog Stereo
		alsa_input.pci-0000_00_1f.3.analog-stereo/#1: Built-in Audio Analog Stereo
	ports:
		analog-input-internal-mic: Internal Microphone (priority 8900, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "audio-input-microphone"
		analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "audio-speakers"
		analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: yes)
			properties:
				device.icon_name = "audio-headphones"
		hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"
		hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: no)
			properties:
				device.icon_name = "video-display"

i have been doing reboots all the time, after every change

Re: Cant Use External mic, using hw mic jack

Posted: Mon Jan 14, 2019 8:23 am
by MrEen
This is just crazy!! You've correctly commented out your changes to alsa-base.conf after the changes didn't help, and the output of pacmd list-cards shows Microphone as available and Internal Mic as not available.

I use alsamixer instead of qasmixer so it would really help if you get a screenshot of alsamixer for me. Just type alsamixer in the terminal and make the window as wide as your screen as there should be a lot of controls for your card. What I'm looking for is to see that it shows everything is unmuted (no MM at the bottom of columns), that things all appear enabled, and any auto mutes are disabled.

I have read that your card in the past had misreported pin configs, and that fixes were implemented, which could require a newer kernel. It seemed the kernel fixes were implemented before the 4.4 series, but one person I helped recently with the same CA0132 codec was fixed with the 4.18 kernel.

The only step that hasn't been tried is echo "options snd-hda-intel position_fix=1" | sudo tee -a /etc/modprobe.d/alsa-base.conf which is just a quicker way of adding a new change to alsa-base.conf that will require a reboot or sudo alsa force-reload afterwards.

Re: Cant Use External mic, using hw mic jack

Posted: Mon Jan 14, 2019 11:41 pm
by eMINT
sll options selected
Selection_060.png
Selection_061.png
Selection_062.png

Re: Cant Use External mic, using hw mic jack

Posted: Mon Jan 14, 2019 11:41 pm
by eMINT
Selection_063.png

Re: Cant Use External mic, using hw mic jack

Posted: Mon Jan 14, 2019 11:46 pm
by eMINT
MrEen wrote: Mon Jan 14, 2019 8:23 am
The only step that hasn't been tried is echo "options snd-hda-intel position_fix=1" | sudo tee -a /etc/modprobe.d/alsa-base.conf which is just a quicker way of adding a new change to alsa-base.conf that will require a reboot or sudo alsa force-reload afterwards.
done that, its still recording from builtin mic, but external mic is selected and marked as pulgged in, in pulse audio input devices
Selection_064.png

Re: Cant Use External mic, using hw mic jack

Posted: Tue Jan 15, 2019 8:19 am
by MrEen
Heh. I doubt it's going to help anyway, but alsamixer looks like this:
Image

You'll probably want to comment out the new line at the bottom of alsa-base.conf.

I'm pretty sure this is a pin config issue and CA0132 is very well known for that. Pretty much everything I can find is for getting sound output to work, with no mention of sound input. Even if I knew how to use hda-verb, I still can't be sure what pin your system is using for the plugged in mic.

The only step I can offer at this point is to get a USB sound card like this: https://www.amazon.com/Sabrent-External ... 3PXKYYH4TH

This will bypass the internal sound card when you set it up in pavucontrol.

If you still want to try fixing this, I see three options:
1. Upgrading the kernel to 4.18 may work. It has worked for some users of your card, but again, for getting sound output. No idea about input.
2. Ubuntu forums have a member named Temüjin who can solve pretty much any sound issue that is solvable. You could try joining there and your output of alsa-info.sh will probably be enough to point to the fix/workaround.
3. Wait and see if any member here has any other ideas.

I'm really sorry I couldn't help get this fixed, but if you get it solved, please come back and mention how you did it.

Re: Cant Use External mic, using hw mic jack

Posted: Tue Jan 15, 2019 9:49 am
by eMINT
Selection_062.png
Selection_061.png
Selection_060.png

Re: Cant Use External mic, using hw mic jack

Posted: Tue Jan 15, 2019 10:00 am
by eMINT
MrEen wrote: Tue Jan 15, 2019 8:19 am The only step I can offer at this point is to get a USB sound card like this: https://www.amazon.com/Sabrent-External ... 3PXKYYH4TH
im in argentina, itrs complicated to buy off-shore, sth like this might work? https://articulo.mercadolibre.com.ar/ML ... 8676221048

MrEen wrote: Tue Jan 15, 2019 8:19 am If you still want to try fixing this, I see three options:
1. Upgrading the kernel to 4.18 may work. It has worked for some users of your card, but again, for getting sound output. No idea about input.
2. Ubuntu forums have a member named Temüjin who can solve pretty much any sound issue that is solvable. You could try joining there and your output of alsa-info.sh will probably be enough to point to the fix/workaround.
3. Wait and see if any member here has any other ideas.
I'm really sorry I couldn't help get this fixed, but if you get it solved, please come back and mention how you did it.
1. could brake other important system things... not an option
2. lets try. will the read here if i post a link?

Re: Cant Use External mic, using hw mic jack

Posted: Tue Jan 15, 2019 10:55 am
by eMINT

Re: Cant Use External mic, using hw mic jack

Posted: Tue Jan 15, 2019 4:15 pm
by MrEen
eMINT wrote: Tue Jan 15, 2019 10:00 am
MrEen wrote: Tue Jan 15, 2019 8:19 am The only step I can offer at this point is to get a USB sound card like this: https://www.amazon.com/Sabrent-External ... 3PXKYYH4TH
im in argentina, itrs complicated to buy off-shore, sth like this might work? https://articulo.mercadolibre.com.ar/ML ... 8676221048
Yes. That should work fine.
As I said, if Temüjin gets involved you'll get fixed if it's fixable. Well done giving them all that info, too.

Re: Cant Use External mic, using hw mic jack

Posted: Wed Jan 16, 2019 10:21 pm
by MrEen
I've been watching the progress over there. Not looking hopeful yet.

I'd like you try something. Suspend the computer then wake it up and test the mic. This worked for audio out for one user here: https://www.linuxquestions.org/question ... 175541473/

As usual, no mention of audio in.

Good luck.

Re: Cant Use External mic, using hw mic jack

Posted: Thu Jan 17, 2019 10:26 pm
by eMINT
MrEen wrote: Wed Jan 16, 2019 10:21 pm I've been watching the progress over there. Not looking hopeful yet.

I'd like you try something. Suspend the computer then wake it up and test the mic. This worked for audio out for one user here: https://www.linuxquestions.org/question ... 175541473/

As usual, no mention of audio in.

Good luck.
didnt work, any ideas to involve Temüjin?

Re: Cant Use External mic, using hw mic jack

Posted: Thu Jan 17, 2019 10:37 pm
by MrEen
I'm afraid not. Just give it some time and (s)he might join in as long as the thread stays active.

Re: Cant Use External mic, using hw mic jack

Posted: Thu Jan 17, 2019 11:08 pm
by eMINT
i think the node is 0x07 as running python run.py --monitor from HDA analyzer produces this output when unplugging and plugging the mic

Code: Select all

 ======================================
Diff for codec 0/0 (0x11020011):
--- 
+++ 
@@ -60,17 +60,17 @@
   PCM:
     rates [0x5e0]: 44100 48000 88200 96000 192000
     bits [0x1e]: 16 20 24 32
     formats [0x5]: PCM AC3
   Unsolicited: tag=0x00, enabled=0
   Power: setting=D0, actual=D0
 Node 0x07 [Audio Input] wcaps 0x100599: Stereo
   Device: name="CA0132 Analog", type="Audio", device=0
-  Converter: stream=1, channel=0
+  Converter: stream=0, channel=0
   SDI-Select: 0
   PCM:
     rates [0x1e4]: 16000 44100 48000 88200 96000
     bits [0x1f]: 8 16 20 24 32
     formats [0x1]: PCM
   Unsolicited: tag=0x00, enabled=0
   Power: setting=D0, actual=D0
   Connection: 1
======================================
Diff for codec 0/0 (0x11020011):
--- 
+++ 
@@ -60,17 +60,17 @@
   PCM:
     rates [0x5e0]: 44100 48000 88200 96000 192000
     bits [0x1e]: 16 20 24 32
     formats [0x5]: PCM AC3
   Unsolicited: tag=0x00, enabled=0
   Power: setting=D0, actual=D0
 Node 0x07 [Audio Input] wcaps 0x100599: Stereo
   Device: name="CA0132 Analog", type="Audio", device=0
-  Converter: stream=0, channel=0
+  Converter: stream=1, channel=0
   SDI-Select: 0
   PCM:
     rates [0x1e4]: 16000 44100 48000 88200 96000
     bits [0x1f]: 8 16 20 24 32
     formats [0x1]: PCM
   Unsolicited: tag=0x00, enabled=0
   Power: setting=D0, actual=D0
   Connection: 1
======================================
so y tried ruuning

Code: Select all

sudo hda-verb /dev/snd/hwC0D0 0x07 SET_PIN_WIDGET_CONTROL 0x24
but output is

Code: Select all

open: Device or resource busy

Re: Cant Use External mic, using hw mic jack

Posted: Fri Jan 18, 2019 3:47 pm
by MrEen
I'm trying to learn some of this hda-verb stuff to possibly help you with that. I might actually learn enough to be helpful before Mint 23 comes out! :mrgreen:

Anyway, I've learned one thing and it will help to determine the NID for you. In this case, you believe 0x07 is the correct NID, and you can test that this way:

Code: Select all

sudo hda-verb /dev/snd/hwC0D0 0x07 GET_PIN_SENSE 0
When the mic is not connected it'll return 0x0 for the value and when it is connected it'll return 0x80000000 for the value.

At least that will get us one step closer.

Re: Cant Use External mic, using hw mic jack

Posted: Sun Jan 20, 2019 2:30 am
by MrEen
And if that last step was successful, see if this gets the mic working (the built-in mic will probably still be recording as well I'm guessing):

Code: Select all

sudo hda-verb /dev/snd/hwC0D0 0x07 SET_AMP_GAIN_MUTE AMP_IN_UNMUTE

Re: Cant Use External mic, using hw mic jack

Posted: Sun Jan 20, 2019 11:39 am
by MrEen
And I just found more code online that uses 0x24 to turn the mic off. That person turns the mic on with 0x64. Source is last answer here: https://unix.stackexchange.com/question ... redirect=1