The officially official Devuan Forum!

You are not logged in.

#26 2022-10-13 20:59:16

tux
Member
Registered: 2022-10-01
Posts: 36  

Re: No Sound ALSA

Head_on_a_Stick wrote:
tux wrote:

drivers not support, driver is on ALSA list of unsupported drivers.

Please provide a link to support this statement.

My research indicates both cards should have drivers:

https://linux-hardware.org/index.php?id … -1043-1d8d

https://linux-hardware.org/?id=pci:1002-aae0-1002-aae0



inxi -Aa

Audio:
  Device-1: Intel 100 Series/C230 Series Family HD Audio 
  driver: snd_hda_intel
  Device-2: AMD Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] 
  driver: N/A alternate: snd_hda_intel

hdmi does not show below

lsmod | grep snd

snd_hda_codec_generic    98304  1
ledtrig_audio          16384  1 snd_hda_codec_generic
snd_hda_intel          57344  1
snd_intel_dspcfg       28672  1 snd_hda_intel
soundwire_intel        45056  1 snd_intel_dspcfg
snd_soc_core          319488  1 soundwire_intel
snd_compress           32768  1 snd_soc_core
snd_hda_codec         176128  2 snd_hda_codec_generic,snd_hda_intel
snd_hda_core          110592  3 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec
snd_hwdep              16384  1 snd_hda_codec
snd_pcm_oss            65536  0
snd_mixer_oss          28672  1 snd_pcm_oss
snd_pcm               143360  7 snd_hda_intel,snd_hda_codec,soundwire_intel,snd_compress,snd_pcm_oss,snd_soc_core,snd_hda_core
snd_timer              49152  1 snd_pcm
snd                   110592  12 snd_hda_codec_generic,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_timer,snd_compress,snd_pcm_oss,snd_soc_core,snd_pcm,snd_mixer_oss
soundcore              16384  1 snd

this?

/etc/asound.conf

defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1

driver n/a a rendering problem?

Offline

#27 2022-10-13 22:21:20

tux
Member
Registered: 2022-10-01
Posts: 36  

Re: No Sound ALSA

aplay -L | grep :CARD

hw:CARD=PCH,DEV=0
plughw:CARD=PCH,DEV=0
default:CARD=PCH
sysdefault:CARD=PCH
front:CARD=PCH,DEV=0
surround21:CARD=PCH,DEV=0
surround40:CARD=PCH,DEV=0
surround41:CARD=PCH,DEV=0
surround50:CARD=PCH,DEV=0
surround51:CARD=PCH,DEV=0
surround71:CARD=PCH,DEV=0
dmix:CARD=PCH,DEV=0
usbstream:CARD=PCH

sudo alsactl init

alsa-lib parser.c:260:(error_node) UCM is not supported for this HDA model (HDA Intel PCH at 0x92720000 irq 59)
alsa-lib main.c:1014:(snd_use_case_mgr_open) error: failed to import hw:1 use case configuration -6
Found hardware: "HDA-Intel" "Cirrus Logic Generic"

Offline

#28 2022-10-15 19:36:35

tux
Member
Registered: 2022-10-01
Posts: 36  

Re: No Sound ALSA

reinstalled pulse and alsa

no longer says cirris-logic-genaric

cat /proc/asound/card*/codec* | grep Codec
Codec: Cirrus Logic CS8409

how to compile and install driver from github? cd, mkdir, make build not installing

https://github.com/egorenar/snd-hda-codec-cs8409

Offline

#29 2022-10-16 00:04:52

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

tux wrote:

reinstalled pulse and alsa

no longer says cirris-logic-genaric

cat /proc/asound/card*/codec* | grep Codec
Codec: Cirrus Logic CS8409

how to compile and install driver from github? cd, mkdir, make build not installing

https://github.com/egorenar/snd-hda-codec-cs8409

It's not so trivial. I recommend you to install the driver using the Dynamic Kernel Module Support (DKMS).

You need to install dkms together with the linux-headers (replace the version of the headers to match your kernel version):

# apt-get install dkms linux-headers-5.16.0-1-amd64

Download the tarball:

$ wget https://github.com/egorenar/snd-hda-codec-cs8409/archive/refs/heads/master.zip

and extract the content (you'll need to install unzip first):

$ unzip master.zip

Enter the directory:

$ cd snd-hda-codec-cs8409-master

Create the dkms.conf file inside of the extracted source code directory. For example:

PACKAGE_NAME=snd_hda_codec_cs8409
BUILT_MODULE_NAME=snd_hda_codec_cs8409
PACKAGE_VERSION=1.0
BUILT_MODULE_LOCATION=./
DEST_MODULE_LOCATION=/kernel/driver/updates
AUTOINSTALL=yes

This example identifies a kernel module named snd_hda_codec_cs8409 with version 1.0.

As root, copy the kernel module source code into the /usr/src/ directory:

# mkdir /usr/src/snd_hda_codec_cs8409-1.0
# cp -Rv . /usr/src/snd_hda_codec_cs8409-1.0

In the above commands, the name of the folder must be:  <PACKAGE_NAME> - <PACKAGE_VERSION>

Add the kernel module to the dkms tree so that it is tracked by if:

# dkms add -m snd_hda_codec_cs8409

Build the kernel module using dkms:

# dkms build -m snd_hda_codec_cs8409 -v 1.0

Install the kernel module using dkms:

# dkms install -m snd_hda_codec_cs8409 -v 1.0

The modprobe command can be used to load it:

# modprobe snd_hda_codec_cs8409

Validate the kernel module is loaded:

$ lsmod | grep snd_hda_codec_cs8409

Good luck!

Last edited by aitor (2022-10-17 20:23:29)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#30 2022-10-16 09:36:59

tux
Member
Registered: 2022-10-01
Posts: 36  

Re: No Sound ALSA

aitor nice documentation

before saw your post i used the git fork https://github.com/mac-repo-001/snd-hda-codec-cs8409 and followed readme instructions
git clone
cd
make
make install
reboot

in backports 5.18 launch alsamixer I switched from pulseaudio (default) to HDI Intel PCH
chip output back to: Cirris Logic Generic from previous Cirris Logic 8490

now has a new volume next to PCM volume, <Internal Mic Boost> both 100% umuted

no sound either 5.18 backport or stable 5.10.0.18

deleted snd-8409 dir, alsamixer still same cirris logic generic, no documentation on uninstalling correctly




Now following your documentation

when creating dkms.conf in 8409-master dir it turn into a brown folder package
cd into 8409 dir

touch dkms.conf

nano dkms.conf

PACKAGE_NAME=snd_hda_codec_cs8409
BUILT_MODULE_NAME=snd_hda_codec_cs8409
PACKAGE_VERSION=1.0
BUILT_MODULE_LOCATION=./
DEST_MODULE_LOCATION=/kernel/driver/updates
AUTOINSTALL=yes

on save it turn into a dkms.conf package not file


sudo dkms add -m snd_hda_codec_cs8409 and sudo dkms add -m snd_hda_codec_cs8409-master
give error

Error! Arguments <module> and <module-version> are not specified
Usage: add <module>/<module-version> or
       add -m <module>/<module-version> or
       add -m <module> -v <module-version>

Last edited by tux (2022-10-16 09:39:11)

Offline

#31 2022-10-16 10:09:30

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

tux wrote:

when creating dkms.conf in 8409-master dir it turn into a brown folder package
cd into 8409 dir

Pay attention to what I said:

The name of the folder must be:  <PACKAGE_NAME> - <PACKAGE_VERSION>

Althogh there isn't any debian package here. So, the uncompressed tarball must be copied to /usr/src/snd_hda_codec_cs8409-1.0 or whatever name and version you wish. But they should match those given in the dkms.conf file:

PACKAGE_NAME=snd_hda_codec_cs8409
BUILT_MODULE_NAME=snd_hda_codec_cs8409
PACKAGE_VERSION=1.0
BUILT_MODULE_LOCATION=./
...

BUILT_MODULE_LOCATION is the subdirectory containing the source and the Makefile. It might be src/ in some common cases.

All the steps worked for me.

Last edited by aitor (2022-10-16 10:09:59)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#32 2022-10-16 10:15:30

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

aitor wrote:

The name of the folder must be:  <PACKAGE_NAME> - <PACKAGE_VERSION>

Disclaimer: don't use hyphens ( - ) in the name, use underscores ( _ ) instead.

Last edited by aitor (2022-10-16 10:18:41)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#33 2022-10-16 11:03:34

tux
Member
Registered: 2022-10-01
Posts: 36  

Re: No Sound ALSA

inexperienced linux user here, much learn i have do

package tar had been correctly installed to /usr/src/snd_hda_codec_cs8409-1.0 and dkms.conf tar matches original tar.

name of folder is snd_hda_codec_cs8409-1.0


there is no subdirectory inside /usr/src/snd_hda_codec_cs8409-1.0 which has source code and tar, nor inside original.

Offline

#34 2022-10-16 11:10:30

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

tux wrote:

there is no subdirectory inside /usr/src/snd_hda_codec_cs8409-1.0 which has source code and tar, nor inside original.

Therefore BUILT_MODULE_LOCATION=./


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#35 2022-10-16 11:16:32

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

tux wrote:

when creating dkms.conf in 8409-master dir it turn into a brown folder package

...

on save it turn into a dkms.conf package not file

Yes, if you are referring to the icon.

Last edited by aitor (2022-10-16 11:16:51)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#36 2022-10-16 11:31:07

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

tux wrote:

dkms.conf tar matches original tar.

...

there is no subdirectory inside /usr/src/snd_hda_codec_cs8409-1.0 which has source code and tar...

The icon confuses you. It's not a compressed tarball. It's just a plain text file. The icon looking like a package is due to the content of the first line beginning with PACKAGE_NAME=blah_blah_blah.

Move the line:

BUILT_MODULE_NAME=snd_hda_codec_cs8409

to the top file, and the icon changes.

Last edited by aitor (2022-10-16 11:43:27)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#37 2022-10-16 11:31:42

tux
Member
Registered: 2022-10-01
Posts: 36  

Re: No Sound ALSA

cannot find ./ dir

should i nano edit /usr/snd... dir and add

BUILT_MODULE_LOCATION=./usr/src

delete /usr/src/snd... dir and restart whole process again?

Offline

#38 2022-10-16 11:41:24

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

tux wrote:

cannot find ./ dir

Huh? It's the parent directory

tux wrote:

should i nano edit /usr/snd... dir and add

BUILT_MODULE_LOCATION=./usr/src

delete /usr/src/snd... dir and restart whole process again?

Nope. The location is right. This variable is not an absolute path (note that it hasn't a forward slash at the beginning), but a relative path (relative to /usr/src/snd_hda_codec_cs8409-1.0/ where the tarball has been uncompressed). And it's the path to the Makefile, which is located in the parent directory.

In some cases, for example, you can find the Makefile in

/usr/src/<name>-<version>/src/Makefile

Hence, the variable would be BUILT_MODULE_LOCATION=./src

If I'm not mistaken smile

Last edited by aitor (2022-10-16 11:52:03)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#39 2022-10-16 11:52:25

tux
Member
Registered: 2022-10-01
Posts: 36  

Re: No Sound ALSA

original dir /home/user/snd-hda-codec-cs8409-master

parent dir '/usr/src/snd_hda_codec_cs8409-1.0'

Offline

#40 2022-10-16 11:54:39

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

tux wrote:

parent dir '/usr/src/snd_hda_codec_cs8409-1.0'

Contaning the configuration file for dkms, I suppose.

Try deleting it (but don't remove the content of the folder):

# dkms delete -m snd_hda_codec_cs8409

and then add, build and install it again. Via dkms add/build/install

Last edited by aitor (2022-10-16 11:58:55)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#41 2022-10-16 12:07:12

tux
Member
Registered: 2022-10-01
Posts: 36  

Re: No Sound ALSA

is the parent the subdirectory inside /usr/src/snd_hda_codec_cs8409-1.0'
if it is then there is no subdirectory inside /usr/src/snd... dir and only an copy of  /home/user/snd-hda-codec-cs8409-master at /usr/src/snd_hda_codec_cs8409-1.0'

Offline

#42 2022-10-16 12:22:59

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

tux wrote:

is the parent the subdirectory inside /usr/src/snd_hda_codec_cs8409-1.0'

Yes.

if it is then there is no subdirectory inside /usr/src/snd... dir and only an copy of  /home/user/snd-hda-codec-cs8409-master at /usr/src/snd_hda_codec_cs8409-1.0'

As a result:

BUILT_MODULE_LOCATION=./    ==>    absolute_dir = /usr/src/snd_hda_codec_cs8409-1.0/ + relative_dir (= ./)

where the Makefile is found, that is:

path_to_the_makefile     ==>       absolute_dir/Makefile = /usr/src/snd_hda_codec_cs8409-1.0/Makefile

All this is right, and the origin of the issue is another one.

Last edited by aitor (2022-10-16 16:25:10)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#43 2022-10-16 12:37:20

tux
Member
Registered: 2022-10-01
Posts: 36  

Re: No Sound ALSA

aitor wrote:
tux wrote:

parent dir '/usr/src/snd_hda_codec_cs8409-1.0'

Contaning the configuration file for dkms, I suppose.

Try deleting it (but don't remove the content of the folder):

# dkms delete -m snd_hda_codec_cs8409

and then add, build and install it again. Via dkms add/build/install

man dkms does not have delete action, only remove or uninstall

name of folder snd_hda_codec_cs8409 and name of the .config file is call dkms.conf

might below command fix?
sudo dkm remove -m dkms.conf

Last edited by tux (2022-10-16 13:03:27)

Offline

#44 2022-10-16 13:05:10

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

tux wrote:

sudo dkms add -m snd_hda_codec_cs8409 and sudo dkms add -m snd_hda_codec_cs8409-master
give error

Sorry, the version of the module was missing in my howto:

# dkms add -m snd_hda_codec_cs8409 -v 1.0

I put it when using dkms build and dkms install , but I forgot it when adding the module.

Now it should work...

Sorry again sad

Last edited by aitor (2022-10-16 13:06:32)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#45 2022-10-16 13:17:49

tux
Member
Registered: 2022-10-01
Posts: 36  

Re: No Sound ALSA

cd '/usr/src/snd_hda_codec_cs8409-1.0'

sudo dkms add -m snd_hda_codec_cs8409 -v 1.0

ouput - Creating symlink /var/lib/dkms/snd_hda_codec_cs8409/1.0/source ->
                 /usr/src/snd_hda_codec_cs8409-1.0 
DKMS: add completed.
dkms install -m snd_hda_codec_cs8409 -v 1.0

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.18.0-0.deb11.4-amd64 -C /lib/modules/5.18.0-0.deb11.4-amd64/build M=/var/lib/dkms/snd_hda_codec_cs8409/1.0/build....
Error!  Build of snd_hda_codec_cs8409.ko failed for: 5.18.0-0.deb11.4-amd64 (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory

and in stable

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.10.0-18-amd64 -C /lib/modules/5.10.0-18-amd64/build M=/var/lib/dkms/snd_hda_codec_cs8409/1.0/build...
Error!  Build of snd_hda_codec_cs8409.ko failed for: 5.10.0-18-amd64 (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory





there are dmks headers for apt-get install dkms linux-headers-5.10.0-18-amd64 but none for backport 5.18.0.0-amd64

Last edited by tux (2022-10-16 13:59:21)

Offline

#46 2022-10-16 16:09:54

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

tux wrote:

cd '/usr/src/snd_hda_codec_cs8409-1.0'

sudo dkms add -m snd_hda_codec_cs8409 -v 1.0

ouput - Creating symlink /var/lib/dkms/snd_hda_codec_cs8409/1.0/source ->
                 /usr/src/snd_hda_codec_cs8409-1.0 
DKMS: add completed.
dkms install -m snd_hda_codec_cs8409 -v 1.0

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.18.0-0.deb11.4-amd64 -C /lib/modules/5.18.0-0.deb11.4-amd64/build M=/var/lib/dkms/snd_hda_codec_cs8409/1.0/build....
Error!  Build of snd_hda_codec_cs8409.ko failed for: 5.18.0-0.deb11.4-amd64 (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory

and in stable

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.10.0-18-amd64 -C /lib/modules/5.10.0-18-amd64/build M=/var/lib/dkms/snd_hda_codec_cs8409/1.0/build...
Error!  Build of snd_hda_codec_cs8409.ko failed for: 5.10.0-18-amd64 (x86_64)
Make sure the name of the generated module is correct and at the root of the
build directory





there are dmks headers for apt-get install dkms linux-headers-5.10.0-18-amd64 but none for backport 5.18.0.0-amd64

This morning I've built it successfully, but now I'm getting the same error than you. The problem is that, testing one of my installers, I formatted the disk where the installation succeded. However, I'm pretty sure that this mess comes from the use of underscores instead of hyphens in the module name. Though I see all the drivers using underscores in /lib/modules, this one is generated as snd-hda-codec-cs8409.ko. You can see this fact in the Makefile, but I'm not sure whether or not hyphens are allowed for kernel module names.

Give me some time, and I'll update my how-to.


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#47 2022-10-16 16:14:27

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

By the way...

tux wrote:
aitor wrote:
tux wrote:

parent dir '/usr/src/snd_hda_codec_cs8409-1.0'

Contaning the configuration file for dkms, I suppose.

Try deleting it (but don't remove the content of the folder):

# dkms delete -m snd_hda_codec_cs8409

and then add, build and install it again. Via dkms add/build/install

man dkms does not have delete action, only remove or uninstall

name of folder snd_hda_codec_cs8409 and name of the .config file is call dkms.conf

might below command fix?
sudo dkm remove -m dkms.conf

The command is:

# dkms remove -m snd_hda_codec_cs8409 -v 1.0

instead of delete.

Last edited by aitor (2022-10-16 16:17:23)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#48 2022-10-16 16:23:18

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

aitor wrote:

... but I'm not sure whether or not hyphens are allowed for kernel module names.

Yes, they are! I've found some of them. So, I'll write the definitive howto in a few minutes...


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#49 2022-10-16 17:09:38

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

aitor wrote:
aitor wrote:

... but I'm not sure whether or not hyphens are allowed for kernel module names.

Yes, they are! I've found some of them. So, I'll write the definitive howto in a few minutes...

Indeed, there are a lot. But this morning something got me confused, because using modprobe with hyphens the later use of lsmod didn't list anything. This is the reason why I changed all the hyphens by underscores in the module name. In doing so, It doesn't build. Hense, the howto needs a workaround in the install target of the Makefile.

First of all, remove the previous work:

# dkms remove -m snd_hda_codec_cs8409 -v 1.0
# rm -rf /usr/src/snd_hda_codec_cs8409 -v 1.0

Leave the content of dkms.conf as follows (using hyphens):

PACKAGE_NAME=snd-hda-codec-cs8409
BUILT_MODULE_NAME=snd-hda-codec-cs8409
PACKAGE_VERSION=1.0
BUILT_MODULE_LOCATION=./
DEST_MODULE_LOCATION=/kernel/driver/updates
AUTOINSTALL=yes

Now we are going to modify the install target in the Makefile, renaming the module before it's installation:

install:
	mkdir -p $(KDIR)/updates/
	mv snd-hda-codec-cs8409.ko snd_hda_codec_cs8409.ko
	cp snd_hda_codec_cs8409.ko $(KDIR)/updates/
	depmod -a

Here you are the rest of the steps:

# mkdir /usr/src/snd-hda-codec-cs8409-1.0
# cp -Rv . /usr/src/snd-hda-codec-cs8409-1.0
# dkms add -m snd-hda-codec-cs8409 -v 1.0
# dkms build -m snd-hda-codec-cs8409 -v 1.0
# dkms install -m snd-hda-codec-cs8409 -v 1.0
# modprobe snd_hda_codec_cs8409
$ lsmod | grep snd_hda_codec_cs8409

In my computer:

$ lsmod | grep snd_hda_codec_cs8409
snd_hda_codec_cs8409   163840  0
snd_hda_codec_generic    98304  2 snd_hda_codec_cs8409,snd_hda_codec_realtek
snd_hda_codec         184320  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_codec_cs8409,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core          118784  6 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_codec_cs8409,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek

One question arises: why do we need to rename the *.ko?
Better workarounds...?

Last edited by aitor (2022-10-16 17:45:22)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

#50 2022-10-16 17:41:26

aitor
Member
From: basque country
Registered: 2016-12-03
Posts: 147  
Website

Re: No Sound ALSA

aitor wrote:

One question arises: why do we need to rename the *.ko?
Better workarounds...?

I'm referring to this:

using modprobe with hyphens the later use of lsmod didn't list anything

I mean, using hyphens in the module name, it's not listed by lsmod

Last edited by aitor (2022-10-16 17:44:34)


If you work systematically, things will come by itself (Lev D. Landau)

Offline

Board footer