Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mic not detected on boot but appears after reconnecting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 221

PostPosted: Sun Apr 26, 2020 1:53 pm    Post subject: Mic not detected on boot but appears after reconnecting Reply with quote

Hi,

So i had this problem appear at some point and i wanted to debug it (not sure how), after boot my mic doesn't exist, no capture devices no anything.
If i disconnect it and reconnect then everything is detected properly and works, the connector is 3.5mm jack.
Any idea why this is happening and how to fix it?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15995

PostPosted: Sun Apr 26, 2020 4:41 pm    Post subject: Reply with quote

What type of microphone is this? When it does exist, what kernel driver(s) handle it? What does dmesg show about the kernel discovering the device? Is the driver a kernel module or is it built in? If it is a module, does the module load on boot, or only load when you reconnect the microphone?
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 221

PostPosted: Mon Apr 27, 2020 7:47 pm    Post subject: Reply with quote

Hu wrote:
What type of microphone is this? When it does exist, what kernel driver(s) handle it? What does dmesg show about the kernel discovering the device? Is the driver a kernel module or is it built in? If it is a module, does the module load on boot, or only load when you reconnect the microphone?


It's a 3.5 mm connection mic aka a regular pc mic.
I have the following in "dmesg"
Code:

snd_hda_codec_realtek hdaudioC0D2:      Rear Mic=0x18
5.122337] input: HDA Intel PCH Rear Mic as /devices/pci0000:00/0000:00:1b.0/sound/card0/input18


There is no change in "dmesg" when the device is discovered or not so it doesn't seem like a system\kernel issue i think, maybe it's a kmix issue?

i think the driver is "snd_hda_intel" and it's a module that loads on boot which would explain why it works after plugging and unplugging, so it's probably a software issue?

I'm running KDE with Alsa and PulseAudio if this helps.
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 221

PostPosted: Fri May 01, 2020 9:46 am    Post subject: Reply with quote

Any ideas?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15995

PostPosted: Sat May 02, 2020 12:23 am    Post subject: Reply with quote

None.
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 221

PostPosted: Sat May 02, 2020 12:37 pm    Post subject: Reply with quote

Well, thanks for trying.
I'll keep playing with it
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1873
Location: United Kingdom

PostPosted: Tue May 26, 2020 3:52 pm    Post subject: Reply with quote

In another thread, you wrote:

Troopo wrote:
I really don't want to go offtopic but any chance you have an idea regarding the mic problem? i think it's pluseadudio related since when i connect\disconnect the mic, i can see the following in the logs:
Code:

May 26 10:37:53 Tron kdeconnectd[5604]: org.kde.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
May 26 10:37:53 Tron plasmashell[5568]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"



My guess is that after it resets it auto detects it, similarly to the audio timeout from earlier in this thread.


For future reference, to provide detailed information on your sound hardware and software to the readers of a forum thread you can download a Bash script from the ALSA site and run it:

Code:
$ wget http://www.alsa-project.org/alsa-info.sh
$ chmod +x alsa-info.sh
$ ./alsa-info.sh
ALSA Information Script v 0.4.65
--------------------------------

This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.

  dmesg
  lspci
  aplay
  amixer
  alsactl
  rpm, dpkg
  /proc/asound/
  /sys/class/sound/
  ~/.asoundrc (etc.)

See './alsa-info.sh --help' for command line options.

Automatically upload ALSA information to www.alsa-project.org? [y/N] : N

Your ALSA information is in /tmp/alsa-info.txt.rq5i6kfWBK

You can then upload the output file to a pastebin and give a link to it in the forum thread.


Before you login to KDE, what is the output of the following command on a TTY?:

$ pacmd list-sources | grep -e 'index:' -e device.string -e 'name:'

After you login to KDE, what is the output of the above command in a Konsole window?
_________________
Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 221

PostPosted: Wed May 27, 2020 12:36 am    Post subject: Reply with quote

Fitzcarraldo wrote:
In another thread, you wrote:

Troopo wrote:
I really don't want to go offtopic but any chance you have an idea regarding the mic problem? i think it's pluseadudio related since when i connect\disconnect the mic, i can see the following in the logs:
Code:

May 26 10:37:53 Tron kdeconnectd[5604]: org.kde.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
May 26 10:37:53 Tron plasmashell[5568]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"



My guess is that after it resets it auto detects it, similarly to the audio timeout from earlier in this thread.


For future reference, to provide detailed information on your sound hardware and software to the readers of a forum thread you can download a Bash script from the ALSA site and run it:

Code:
$ wget http://www.alsa-project.org/alsa-info.sh
$ chmod +x alsa-info.sh
$ ./alsa-info.sh
ALSA Information Script v 0.4.65
--------------------------------

This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.

  dmesg
  lspci
  aplay
  amixer
  alsactl
  rpm, dpkg
  /proc/asound/
  /sys/class/sound/
  ~/.asoundrc (etc.)

See './alsa-info.sh --help' for command line options.

Automatically upload ALSA information to www.alsa-project.org? [y/N] : N

Your ALSA information is in /tmp/alsa-info.txt.rq5i6kfWBK

You can then upload the output file to a pastebin and give a link to it in the forum thread.


Before you login to KDE, what is the output of the following command on a TTY?:

$ pacmd list-sources | grep -e 'index:' -e device.string -e 'name:'

After you login to KDE, what is the output of the above command in a Konsole window?



Thank you, i really appreciate your help and tips :)

Output from the Alsa Script
http://dpaste.com/395XTQV

Before login to KDE i get:
Code:

no pulseaudio daemon running or not running as session daemon


After i get:
Code:

  * index: 0
        name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
                device.string = "0"
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15995

PostPosted: Wed May 27, 2020 2:11 am    Post subject: Reply with quote

Fitzcarraldo wrote:
For future reference, to provide detailed information on your sound hardware and software to the readers of a forum thread you can download a Bash script from the ALSA site and run it:
Or you could emerge --noreplace media-sound/alsa-utils && /usr/sbin/alsa-info.sh. ;)
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1873
Location: United Kingdom

PostPosted: Wed May 27, 2020 2:29 am    Post subject: Reply with quote

Troopo,

From the ALSA information script output you uploaded, am I correct in thinking you created or edited ~/.asoundrc and /etc/asound.conf? I wonder if your problem with the external mic not being detected is a result of the settings in those two ALSA files. Anyway, what happens if you login to a TTY and start PulseAudio:

Code:
$ pulseaudio --start


then, without logging out of the TTY, you login to KDE? Do you still get those two logged messages you posted earlier?:

Code:
May 26 10:37:53 Tron kdeconnectd[5604]: org.kde.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
May 26 10:37:53 Tron plasmashell[5568]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"

_________________
Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 221

PostPosted: Wed May 27, 2020 7:18 am    Post subject: Reply with quote

Hu wrote:
Fitzcarraldo wrote:
For future reference, to provide detailed information on your sound hardware and software to the readers of a forum thread you can download a Bash script from the ALSA site and run it:
Or you could emerge --noreplace media-sound/alsa-utils && /usr/sbin/alsa-info.sh. ;)


Cool, i already have that there, thanks

Fitzcarraldo wrote:
Troopo,

From the ALSA information script output you uploaded, am I correct in thinking you created or edited ~/.asoundrc and /etc/asound.conf? I wonder if your problem with the external mic not being detected is a result of the settings in those two ALSA files. Anyway, what happens if you login to a TTY and start PulseAudio:

Code:
$ pulseaudio --start


then, without logging out of the TTY, you login to KDE? Do you still get those two logged messages you posted earlier?:

Code:
May 26 10:37:53 Tron kdeconnectd[5604]: org.kde.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
May 26 10:37:53 Tron plasmashell[5568]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"


Seems correct, it was so long ago i've frogtten but yes both ~/.asoundrc and /etc/asound.conf were edited to include the HDMI port sound (don't remember why).

After trying what you suggested i still get the following in my logs:
Code:

May 27 10:08:13 Tron plasmashell[5600]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
May 27 10:08:46 Tron kdeconnectd[5629]: org.kde.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"


I didn't check for pulseaudio before but it's also there:
Code:

May 27 10:08:11 Tron plasma_session[5568]: org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/pulseaudio.desktop" ("/usr/bin/start-pulseaudio-x11")
May 27 10:08:13 Tron plasmashell[5600]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
May 27 10:08:46 Tron kdeconnectd[5629]: org.kde.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1873
Location: United Kingdom

PostPosted: Wed May 27, 2020 2:59 pm    Post subject: Reply with quote

Troopo wrote:
I didn't check for pulseaudio before but it's also there:

Code:
May 27 10:08:11 Tron plasma_session[5568]: org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/pulseaudio.desktop" ("/usr/bin/start-pulseaudio-x11")
May 27 10:08:13 Tron plasmashell[5600]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
May 27 10:08:46 Tron kdeconnectd[5629]: org.kde.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"


From what you posted, it appears that Plasma is trying to launch PulseAudio using /etc/xdg/autostart/pulseaudio.desktop and /usr/bin/start-pulseaudio-x11. Do you have those added in 'System Settings' > 'Startup and Shutdown' > 'Autostart'/'Background Services'/'Desktop Session'?

What does the following command return before and after login to KDE?

Code:
$ ps -ef | grep pulse | grep -v grep


I also think there could be a /usr/lib/systemd/user/pulseaudio.service, and I don't know what effect that could be having on all of this. (Can't say I'm a fan of either systemd or PulseAudio, to be honest.)

Add the following line to /etc/pulse/default.pa and reboot (rather than just restarting PulseAudio from the command line) to see what happens:

Code:
set-default-source alsa_output.pci-0000_00_1b.0.analog-stereo.monitor

_________________
Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 221

PostPosted: Wed May 27, 2020 8:52 pm    Post subject: Reply with quote

Fitzcarraldo wrote:


From what you posted, it appears that Plasma is trying to launch PulseAudio using /etc/xdg/autostart/pulseaudio.desktop and /usr/bin/start-pulseaudio-x11. Do you have those added in 'System Settings' > 'Startup and Shutdown' > 'Autostart'/'Background Services'/'Desktop Session'?


Nope, nothing there about pulse or alsa.

Fitzcarraldo wrote:

What does the following command return before and after login to KDE?



Before is empty

After:
Code:

js          5482       1  0 10:07 ?        00:01:23 pulseaudio --start
js          5490    5482  0 10:08 ?        00:00:00 /usr/libexec/pulse/gsettings-helper


Fitzcarraldo wrote:

Add the following line to /etc/pulse/default.pa and reboot (rather than just restarting PulseAudio from the command line) to see what happens:


This is the new log:
Code:

May 28 00:48:21 Tron plasmashell[5578]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"
May 28 00:48:15 Tron plasma_session[5556]: org.kde.plasma.session: Starting autostart service  "/etc/xdg/autostart/pulseaudio.desktop" ("/usr/bin/start-pulseaudio-x11")
May 28 00:48:21 Tron pulseaudio[5724]: [pulseaudio] pid.c: Daemon already running.
May 28 00:48:21 Tron pulseaudio[5727]: [pulseaudio] pid.c: Daemon already running.
May 28 00:48:21 Tron pulseaudio[5736]: [pulseaudio] pid.c: Daemon already running.
May 28 00:48:21 Tron pulseaudio[5738]: [pulseaudio] pid.c: Daemon already running.
May 28 00:48:21 Tron plasmashell[5578]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1b.0.analog-stereo.monitor"


I don't really see any change based on that.

Fitzcarraldo wrote:

(Can't say I'm a fan of either systemd or PulseAudio, to be honest.)


Systemd i can understand but what do you use instead of PulseAudio?
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1873
Location: United Kingdom

PostPosted: Thu May 28, 2020 12:19 am    Post subject: Reply with quote

Troopo wrote:
I don't really see any change based on that.

Neither can I. I'll have to think of something else you could try.

Troopo wrote:
Systemd i can understand but what do you use instead of PulseAudio?

I put up with it, but it's caused me quite a lot of hassle (as demonstrated by various posts in my blog over the years). Ironically, I finally found it useful during the current COVID-19 lockdown, as it enables me to cast application audio via Jitsi Meet (as explained in a recent blog post of mine). Actually, I have no choice to put up with systemd in a couple of other Linux distributions I use, as those binary distributions offer no choice.
_________________
Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1873
Location: United Kingdom

PostPosted: Sat May 30, 2020 3:43 am    Post subject: Reply with quote

OK, looking at the ALSA script output you posted, your HDA Intel soundcard is Card 0. The following command will show all ALSA mixer simple controls:

Code:
$ amixer -c 0 scontrols


Looking at the ALSA script output you posted, the ALSA mixer controls for Card 0 can be summarised as:

Simple mixer control 'Master',0
Simple mixer control 'Headphone',0
Simple mixer control 'PCM',0
Simple mixer control 'Front',0
Simple mixer control 'Front Mic',0 [off]
Simple mixer control 'Front Mic Boost',0
Simple mixer control 'Surround',0
Simple mixer control 'Center',0
Simple mixer control 'LFE',0
Simple mixer control 'Side',0
Simple mixer control 'Line',0
Simple mixer control 'Line Boost',0
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958 Default PCM',0
Simple mixer control 'Capture',0 [off]
Simple mixer control 'Capture',1 [off]
Simple mixer control 'Capture',2 [off]
Simple mixer control 'Auto-Mute Mode',0
Simple mixer control 'Input Source',0
Simple mixer control 'Input Source',1
Simple mixer control 'Input Source',2
Simple mixer control 'Loopback Mixing',0
Simple mixer control 'Rear Mic',0 [off]
Simple mixer control 'Rear Mic Boost',0

You could try commands like the following to see if one of those enables the external mic without needing to unplug it and plug it in again. If that works, you could configure KDE Plasma via 'System Settings' > 'Startup and Shutdown' > 'Autostart' to issue the command automatically at login. You'll need to try various things.

Code:
amixer -c 0 set Capture toggle


Code:
amixer -c 0 set 'Front Mic' toggle


Code:
amixer -c 0 set 'Rear Mic' toggle


If you have no joy with amixer, the only other thing I can think of would be to delete ~/.asoundrc and /etc/asound.conf (obviously making a copy of them first) and seeing if, with the current versions of the kernel, ALSA software and PulseAudio software that you are now using, your HDMI, analogue audio and Bluetooth work without those ALSA configuration files. You might find they do. My laptop, for example, has two soundcards (HDMI and PCH, like you) and Bluetooth. I don't have ~/.asoundrc and /etc/asound.conf files but I can successfully switch between HDMI, analogue audio and my Bluetooth headphones by using PulseAudio Volume Control. So you might find the files ~/.asoundrc and /etc/asound.conf that you created in the past when you were using earlier versions of the kernel, ALSA, PulseAudio and Bluetooth software are no longer necessary.

Other things you could investigate are:

a) Are there any kernel Quirks for the Realtek ALC889 that you could apply in the kernel line in /boot/grub/grub.cfg? You'll need to search the Web to see if there is a quirk for your specfic issue.

b) Are there any Options (see /usr/src/linux/Documentation/sound/alsa-configuration.rst) for the Realtek ALC889? Again, you'll need to search the Web and the kernel documentation. If you have built the driver as a kernel module, the options can be added in a file /etc/modprobe.d/alsa.conf, whereas if you have built the driver into the kernel then the options can be added to the kernel boot line in /boot/grub/grub.cfg.

c) Are there any Early Patches? When CONFIG_SND_HDA_PATCH_LOADER=y is set, you can pass a 'patch' as a firmware file for modifying the HD-audio setup before initializing the codec (see /usr/src/linux/Documentation/sound/hd-audio/notes.rst for information).

And if none of those help, you may find you are stuck with the current functionality because it's the way the Realtek ALC889 driver has been coded or how it works with your specific hardware.
_________________
Clevo W230SS: amd64 nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 xf86-video-ati. Dual boot Win 7 Pro 64-bit.
OpenRC eudev elogind & KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 221

PostPosted: Sat May 30, 2020 12:16 pm    Post subject: Reply with quote

Fitzcarraldo wrote:
OK, looking at the ALSA script output you posted, your HDA Intel soundcard is Card 0. The following command will show all ALSA mixer simple controls:

Code:
$ amixer -c 0 scontrols


Looking at the ALSA script output you posted, the ALSA mixer controls for Card 0 can be summarised as:

Simple mixer control 'Master',0
Simple mixer control 'Headphone',0
Simple mixer control 'PCM',0
Simple mixer control 'Front',0
Simple mixer control 'Front Mic',0 [off]
Simple mixer control 'Front Mic Boost',0
Simple mixer control 'Surround',0
Simple mixer control 'Center',0
Simple mixer control 'LFE',0
Simple mixer control 'Side',0
Simple mixer control 'Line',0
Simple mixer control 'Line Boost',0
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958 Default PCM',0
Simple mixer control 'Capture',0 [off]
Simple mixer control 'Capture',1 [off]
Simple mixer control 'Capture',2 [off]
Simple mixer control 'Auto-Mute Mode',0
Simple mixer control 'Input Source',0
Simple mixer control 'Input Source',1
Simple mixer control 'Input Source',2
Simple mixer control 'Loopback Mixing',0
Simple mixer control 'Rear Mic',0 [off]
Simple mixer control 'Rear Mic Boost',0

You could try commands like the following to see if one of those enables the external mic without needing to unplug it and plug it in again. If that works, you could configure KDE Plasma via 'System Settings' > 'Startup and Shutdown' > 'Autostart' to issue the command automatically at login. You'll need to try various things.

Code:
amixer -c 0 set Capture toggle


Code:
amixer -c 0 set 'Front Mic' toggle


Code:
amixer -c 0 set 'Rear Mic' toggle


If you have no joy with amixer, the only other thing I can think of would be to delete ~/.asoundrc and /etc/asound.conf (obviously making a copy of them first) and seeing if, with the current versions of the kernel, ALSA software and PulseAudio software that you are now using, your HDMI, analogue audio and Bluetooth work without those ALSA configuration files. You might find they do. My laptop, for example, has two soundcards (HDMI and PCH, like you) and Bluetooth. I don't have ~/.asoundrc and /etc/asound.conf files but I can successfully switch between HDMI, analogue audio and my Bluetooth headphones by using PulseAudio Volume Control. So you might find the files ~/.asoundrc and /etc/asound.conf that you created in the past when you were using earlier versions of the kernel, ALSA, PulseAudio and Bluetooth software are no longer necessary.

Other things you could investigate are:

a) Are there any kernel Quirks for the Realtek ALC889 that you could apply in the kernel line in /boot/grub/grub.cfg? You'll need to search the Web to see if there is a quirk for your specfic issue.

b) Are there any Options (see /usr/src/linux/Documentation/sound/alsa-configuration.rst) for the Realtek ALC889? Again, you'll need to search the Web and the kernel documentation. If you have built the driver as a kernel module, the options can be added in a file /etc/modprobe.d/alsa.conf, whereas if you have built the driver into the kernel then the options can be added to the kernel boot line in /boot/grub/grub.cfg.

c) Are there any Early Patches? When CONFIG_SND_HDA_PATCH_LOADER=y is set, you can pass a 'patch' as a firmware file for modifying the HD-audio setup before initializing the codec (see /usr/src/linux/Documentation/sound/hd-audio/notes.rst for information).

And if none of those help, you may find you are stuck with the current functionality because it's the way the Realtek ALC889 driver has been coded or how it works with your specific hardware.


First of all before anything else, thank you!
I really appreciate the time and efforts you've put into this.


Moving to the main part.

I did try the suggested ALSA script commands and after enabling the mics that were off it didn't help..

After that, as you suggested, i've tried deleting my custom files, also didn't work for the mic but i did discover they are no longer needed as you assumed.

Before moving to the next part, i also tried another mic similar to this one and it yielded the same results.

Then i thought maybe it's not an alsa problem but a pulseaudio problem and google that, ending up in:
https://wiki.archlinux.org/index.php/PulseAudio/Troubleshooting#Microphone_not_detected_by_PulseAudio

After adding the suggested loadmodule
Code:

load-module module-alsa-source device=hw:0,0
# the line above should be somewhere before the line below
.ifexists module-udev-detect.so


Finally made it work :)

Going back to what you've said pulseaudio is not to be trusted, but at least all my problems are now solved (for now).

Thanks again
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 221

PostPosted: Thu Jun 11, 2020 1:41 pm    Post subject: Reply with quote

Well apparently i spoke too soon...

Setting a static device in pulseaudio does indeed add a mic in kmix, pulse and everywhere but it's the wrong device, it's not a real mic, the physical device doesn't record and since it's static it also doesn't auto discover the real one anymore.

The approach might be correct, i still need to set something manually since the auto function doesn't work for some reason, it's a dirty fix since i don't fix the auto discover problem which is the preferred way but at least i can make it work.

The question is what do i need to define?

The main difference i can see before i have a working mic and after the auto discover feature works (i have to reconnect the mic physically as i mentioned) is this:

This is before and using the hw:0,0 device that doesn't exist
Code:

pacmd list-sources | grep -e 'index:' -e device.string -e 'name:'
  * index: 0
        name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
                device.string = "0"
    index: 1
        name: <alsa_input.hw_0_0>
                device.string = "hw:0,0"



Default behavior (no hw:0,0 rule)
Code:

  * index: 0
        name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
                device.string = "0"


After mic is properly discovered and working
Code:

  * index: 0
        name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
                device.string = "0"
    index: 1
        name: <alsa_input.pci-0000_00_1b.0.analog-stereo>
                device.string = "front:0"



So i need to set it up as following or understand why isn't the auto discover working properly.

This is where i need some help since i can't set a device like that there is no front setting for hw, i also tried setting the default alsa source which didn't work, maybe i have some alsa rule causing this problem and it's coming from alsa?

In pulseaudio volume control i can see the working mic as rear and it's plugged in while the front is unplugged but in pacmd it is set to front, very strange...


I"ll just add that after playing with all the settings it alsamixer it didn't help but when the mic is detected it seems capture and rear mic are the settings.
Also after removing that rule from the pa file and reinserting the mic so it will auto detect it, then adding the rule back forces this to work which is why i thought that fixed it previously.
So in other words, the rule works but after something else changes as well.

Some additional info maybe it will help

Before
Code:

pacmd list-sources
2 source(s) available.
  * index: 0
        name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
        driver: <module-alsa-card.c>
        flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: RUNNING
        suspend cause: (none)
        priority: 1030
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max rewind: 6 KiB
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        configured latency: 40.00 ms; range is 0.50 .. 371.52 ms
        monitor_of: 0
        card: 1 <alsa_card.pci-0000_00_1b.0>
        module: 7
        properties:
                device.description = "Monitor of Built-in Audio Analog Stereo"
                device.class = "monitor"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xf7500000 irq 36"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1b.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "1c20"
                device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "0"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
    index: 1
        name: <alsa_input.hw_0_0>
        driver: <module-alsa-source.c>
        flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: RUNNING
        suspend cause: (none)
        priority: 9030
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 4.70 ms
        max rewind: 0 KiB
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        configured latency: 40.00 ms; range is 0.50 .. 371.52 ms
        module: 24
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC889 Analog"
                alsa.id = "ALC889 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xf7500000 irq 36"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1b.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "1c20"
                device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "hw:0,0"
                device.buffering.buffer_size = "65536"
                device.buffering.fragment_size = "32768"
                device.access_mode = "mmap+timer"
                device.description = "Built-in Audio"
                device.icon_name = "audio-input-microphone-pci"



After
Code:

pacmd list-sources
2 source(s) available.
  * index: 0
        name: <alsa_output.pci-0000_00_1b.0.analog-stereo.monitor>
        driver: <module-alsa-card.c>
        flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: RUNNING
        suspend cause: (none)
        priority: 1030
        volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
                balance 0.00
        base volume: 65536 / 100% / 0.00 dB
        volume steps: 65537
        muted: no
        current latency: 0.00 ms
        max rewind: 6 KiB
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        configured latency: 40.00 ms; range is 0.50 .. 371.52 ms
        monitor_of: 0
        card: 1 <alsa_card.pci-0000_00_1b.0>
        module: 7
        properties:
                device.description = "Monitor of Built-in Audio Analog Stereo"
                device.class = "monitor"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xf7500000 irq 36"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1b.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "1c20"
                device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "0"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
    index: 1
        name: <alsa_input.pci-0000_00_1b.0.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
        state: RUNNING
        suspend cause: (none)
        priority: 9039
        volume: front-left: 30421 /  46% / -20.00 dB,   front-right: 30421 /  46% / -20.00 dB
                balance 0.00
        base volume: 6554 /  10% / -60.00 dB
        volume steps: 65537
        muted: no
        current latency: 1.85 ms
        max rewind: 0 KiB
        sample spec: s16le 2ch 44100Hz
        channel map: front-left,front-right
                     Stereo
        used by: 1
        linked by: 1
        configured latency: 40.00 ms; range is 0.50 .. 371.52 ms
        card: 1 <alsa_card.pci-0000_00_1b.0>
        module: 7
        properties:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC889 Analog"
                alsa.id = "ALC889 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xf7500000 irq 36"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1b.0"
                sysfs.path = "/devices/pci0000:00/0000:00:1b.0/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "1c20"
                device.product.name = "6 Series/C200 Series Chipset Family High Definition Audio Controller"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "65536"
                device.buffering.fragment_size = "32768"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "Analog Stereo"
                device.description = "Built-in Audio Analog Stereo"
                alsa.mixer_name = "Realtek ALC889"
                alsa.components = "HDA:10ec0889,1458a132,00100004"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        ports:
                analog-input-front-mic: Front Microphone (priority 8500, latency offset 0 usec, available: no)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-rear-mic: Rear Microphone (priority 8200, latency offset 0 usec, available: yes)
                        properties:
                                device.icon_name = "audio-input-microphone"
                analog-input-linein: Line In (priority 8100, latency offset 0 usec, available: no)
                        properties:

        active port: <analog-input-rear-mic>


Code:

arecord -l     
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC889 Analog [ALC889 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 2: ALC889 Alt Analog [ALC889 Alt Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 221

PostPosted: Wed Jun 17, 2020 1:39 pm    Post subject: Reply with quote

Anyone?
Back to top
View user's profile Send private message
jack0071
n00b
n00b


Joined: 18 Jun 2020
Posts: 2

PostPosted: Tue Jun 23, 2020 7:59 am    Post subject: Reply with quote

I took a stab at utilizing my receiver, yet discovered it wasn't working in spite of utilizing it just half a month earlier. I experienced a couple of settings and discovered that my receiver is obviously (which is set to default incidentally) not stopped, anyway it unquestionably is as should be obvious it is. I utilize a splitter that experiences 2 jacks for mic and earphones individually and this is the place I'm befuddled. Despite the fact that it says it's in, on the off chance that I have it approximately positioned in the jack it distinguishes the gadget, yet the mic still wont work (there's simply static). At the point when it is completely in, it isn't identified and when taken out it isn't recognized. I use Realtek HD Audio with all drivers refreshed.
Back to top
View user's profile Send private message
Troopo
Apprentice
Apprentice


Joined: 14 Jun 2015
Posts: 221

PostPosted: Wed Jun 24, 2020 7:57 am    Post subject: Reply with quote

jack0071 wrote:
I took a stab at utilizing my receiver, yet discovered it wasn't working in spite of utilizing it just half a month earlier. I experienced a couple of settings and discovered that my receiver is obviously (which is set to default incidentally) not stopped, anyway it unquestionably is as should be obvious it is. I utilize a splitter that experiences 2 jacks for mic and earphones individually and this is the place I'm befuddled. Despite the fact that it says it's in, on the off chance that I have it approximately positioned in the jack it distinguishes the gadget, yet the mic still wont work (there's simply static). At the point when it is completely in, it isn't identified and when taken out it isn't recognized. I use Realtek HD Audio with all drivers refreshed.


It sounds like your problem is the splitter which it causing some issues to identify the active device since splitters usually just pass\duplicate the electricity down the connector.
I'm guessing the driver thinks you have 2 devices at the same time and doesn't know which is which.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum