You are not logged in.

#1 2021-02-06 22:42:10

mwigzell
Member
Registered: 2016-01-29
Posts: 38

[SOLVED] ALSA mismatched driver modules to card after install

Hi Archers, I have Intel i7 with NVidia 960 GPU.

$ uname -a
Linux confucius 5.10.13-arch1-1 #1 SMP PREEMPT Wed, 03 Feb 2021 23:44:07 +0000 x86_64 GNU/Linux
$ lspci -k | grep -A 2 VGA
08:00.0 VGA compatible controller: NVIDIA Corporation GM206 [GeForce GTX 960] (rev a1)
	Subsystem: eVga.com. Corp. Device 2968
	Kernel driver in use: nvidia

The problem is that sound doesn't work, as verified by following test:

$ speaker-test -c 2

speaker-test 1.2.4

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 1048576
Period size range from 32 to 349526
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
 0 - Front Left
 1 - Front Right
^CTime per period = 10.950050

I have an HDM cable from graphic card to monitor. This same hookup works when I boot my Linux Mint. I noticed that Mint goes to great lengths to avoid loading incorrect drivers. I tried listing the sound cards as follows:

$ cat /proc/asound/cards
 0 [Intel          ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xf91f8000 irq 42
 1 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xfbe00000 irq 17

and the loaded modules are as follows:

$ cat /proc/asound/modules 2>/dev/null | awk '{ print $2 }' 
snd_hda_intel
snd_hda_intel

Notice that the loaded modules are wrong, it should have loaded a snd_pcm module?
Pls. help me to load the correct driver.

Last edited by mwigzell (2021-02-07 05:30:38)

Offline

#2 2021-02-06 23:08:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,349

Re: [SOLVED] ALSA mismatched driver modules to card after install

The loaded modules are not wrong. If you want HDMI output you would at the very least want to change your default ALSA card. If you want this to behave more like mint, you will want to install pulseaudio and pulseaudio-alsa and pavucontrol instead and then check correct default card setup in pavucontrol.

Last edited by V1del (2021-02-06 23:12:19)

Offline

#3 2021-02-07 00:04:56

mwigzell
Member
Registered: 2016-01-29
Posts: 38

Re: [SOLVED] ALSA mismatched driver modules to card after install

Would you pls. explain: how to change the default ALSA card?  I edited /etc/asound.conf:

defaults.pcm.card 1
defaults.ctl.card 1

Then rebooted, but no difference. I'm not understanding everything that is going on here. I'm thinking it should load "snd_pcm" module?

Offline

#4 2021-02-07 00:20:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,349

Re: [SOLVED] ALSA mismatched driver modules to card after install

The encompassing main driver is  snd_hda_intel, it will load the correct pcm driver depending on what it detected (... check lsmod) and there's no evidence to that being wrong here

HDMI devices are a bit of a special case you need to find out which devices correspond to which card. Check the output of aplay -l it's more likely you'll have devices like 3,7,9 or so (... don't ask me why that's the case, but it is) so your config would be something like

defaults.pcm.card 1
defaults.pcm.device 3
defaults.ctl.card 1
defaults.ctl.device 3

For easier checking which of the devices is the one producing sound you can check the devices with e.g.

speaker-test -Dhw:1,3 -c2

and so fort.

That all assumes you want to do an ALSA config. If you're used to mint and want it to behave similarly, you'll want to setup pulseaudio instead of following the normal ALSA article and control your devices with pavucontrol or so.

Offline

#5 2021-02-07 00:42:01

mwigzell
Member
Registered: 2016-01-29
Posts: 38

Re: [SOLVED] ALSA mismatched driver modules to card after install

ECSTATIC YES!
My device is 7 (from running "aplay -l")
So I edited /etc/asound.conf:

defaults.pcm.card 1
defaults.pcm.device 7
defaults.ctl.card 1
defaults.ctl.device 7

And beautiful white noise  with default "speaker-test -c 2"!!

However not able to play a WAV like so:

$ aplay -D hw:1,7 poncho.wav
aplay: test_wavefile_read:966: read error (called from line 1145)

Is a format issue maybe? I scanned those using "Asunder" ripper ...

Last edited by mwigzell (2021-02-07 00:54:05)

Offline

#6 2021-02-07 01:25:54

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,349

Re: [SOLVED] ALSA mismatched driver modules to card after install

likely, and directly passing to hw:1,7 will not do any format conversion, if you just drop the -D parameter to make use of the new default device that should employ dmix and do any conversions anyway. Other than that you'd need to use -D plughw:1,7 to have something that does basic format conversions

Offline

#7 2021-02-07 01:34:41

mwigzell
Member
Registered: 2016-01-29
Posts: 38

Re: [SOLVED] ALSA mismatched driver modules to card after install

By way of explanation: I wanted to get ALSA working properly before I moved to pulseaudio. I am able to play ".flac" files now with paplay, so all is good! thanks again. we can close this

Offline

#8 2021-02-07 01:43:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,349

Re: [SOLVED] ALSA mismatched driver modules to card after install

That's a bit of a "useless" goal. As pulseaudio uses it's own logic for defining default cards and format support and the like, so if that's the intended mode of operation you can remove your alsa.conf you just created and install pulseaudio-alsa instead. (... Because if you retain that as is now, you will run into conflicts with pulseaudio should you stumble on one of the few applications not yet having pulseaudio integration)

In any case, if you consider this [SOLVED] please edit the title in your first post to reflect this.

Offline

#9 2021-02-07 03:22:12

mwigzell
Member
Registered: 2016-01-29
Posts: 38

Re: [SOLVED] ALSA mismatched driver modules to card after install

ok, good point. I just wanted to see ALSA work before putting pulseaudio on top.
Thanks for your timely help! (I took about 8 hrs of studying to figure out all this). I'm a bit of a pedant, and a tinkerer. So I wanted to be sure I had ALSA in the bag! That was the goal.

How can I edit the post title as [SOLVED} ?

Last edited by mwigzell (2021-02-07 03:36:07)

Offline

Board footer

Powered by FluxBB