Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
1 answers
8676 views
How do I switch between my audio output devices? (Pop!_os)
I am using Pop!_OS, installed it a few days ago. I have two audio output devices (correction: read #1 under the post) connected to my PC, one to the 3.5mm audio jack in the front panel and one to the same in the back panel. In the front panel I have my headphones connected and in the back panel I ha...
I am using Pop!_OS, installed it a few days ago. I have two audio output devices (correction: read #1 under the post) connected to my PC, one to the 3.5mm audio jack in the front panel and one to the same in the back panel. In the front panel I have my headphones connected and in the back panel I have my stereo speakers connected. I want to be able to switch between the two devices (correction: read #1) like I do on Windows. But I am not able to achieve the same on Linux. (I do not want to be able to play audio from both the devices at once, I don't care about that. I want to be able to switch the output devices with audio playing from only one of them) works kinda like a phone, if I pull my headphones out it automatically starts playing audio from the speakers but as soon as I plug them back in, the audio switches to headphones. Basically my PC is not recognizing headphones and speakers as two separate output devices. Even in settings, only the headphones are available in the list of output devices and line in only appears if I pull my headphones out. Then it starts showing "line in". It works absolutely fine on Windows tho. Note: Don't freak out after seeing Pop!_OS mentioned it's very similar to stock Ubuntu just with better and more functional features. # 1: Someone told me that what I wanna do is not to switch between different audio output devices but rather different audio sinks or jacks connected to the same audio output device. Meaning, my headphone and speakers are not the audio devices, my sound card is which has two different sinks or jacks that my speakers and headphones are connected to. So I don't want to swtich output devicrs, I want to switch audio sinks or jacks.
Sbavert (63 rep)
Apr 26, 2020, 01:48 AM • Last activity: May 28, 2025, 11:00 PM
0 votes
0 answers
32 views
Pop_OS defaults to headphones when headphones are not connected, it should switch to built-in laptop speakers by default
All of a sudden, my laptop decided to detect headphones when no headphones are connected. [![fastfetch][1]][1] I have tried using `pavucontrol` which shows `speakers (unavailable)`. Even though moving the volume makes the sound come out of the built-in speakers (suggesting that the speakers do work!...
All of a sudden, my laptop decided to detect headphones when no headphones are connected. fastfetch I have tried using pavucontrol which shows speakers (unavailable). Even though moving the volume makes the sound come out of the built-in speakers (suggesting that the speakers do work!,right?) pavucontrol Though the headphones still remain mistakenly connected. only-headphones I also tried using hdajackretask as suggested in the post here though it seemed confusing and I am not sure how to read the output from
/proc/asound/card*/codec\#*
But this is what I got https://pastebin.com/Z117DbR6 However doing grep -i jack gives me
Pin Default 0x03211020: [Jack] HP Out at Ext Left
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
  Pin Default 0x18560010: [Jack] Digital Out at Int HDMI
  Pin Default 0x185600f0: [Jack] Digital Out at Int HDMI
I think it says HDMI, because I use the thunderbolt jack in my laptop to connect to my monitor. (Though I am not sure, because the port it connects to in the monitor is a DisplayPort specifically) Any help would be greatly appreciated. I am new to linux, minor troubleshoots are fine for me, however this time I am not sure if this is even a hardware issue or not.
ray_lv (1 rep)
May 3, 2025, 08:26 PM
1 votes
0 answers
37 views
Raspberry Pi 5: alsamixer displaying different controls on boot
I have a Raspberry Pi 5 4Gb. I am trying to run a Python script on boot which will allow me to control the volume of my default amixer device (Master) through a slider switch. The script works perfectly fine when I run it manually. However, I am unable to access the "Master" device via amixer when r...
I have a Raspberry Pi 5 4Gb. I am trying to run a Python script on boot which will allow me to control the volume of my default amixer device (Master) through a slider switch. The script works perfectly fine when I run it manually. However, I am unable to access the "Master" device via amixer when running the script on boot. * When I run the amixer controls command via SSH while logged into user pi (or running the Python script), I get this output:
numid=4,iface=MIXER,name='Master Playback Switch'
    numid=3,iface=MIXER,name='Master Playback Volume'
    numid=2,iface=MIXER,name='Capture Switch'
    numid=1,iface=MIXER,name='Capture Volume'
* However, when I run the same script on reboot, I get this output instead:
numid=1,iface=CARD,name='HDMI Jack'
    numid=5,iface=PCM,name='ELD'
    numid=4,iface=PCM,name='IEC958 Playback Default'
    numid=3,iface=PCM,name='IEC958 Playback Mask'
    numid=2,iface=PCM,name='Playback Channel Map'
Note that I get this same second output if I run the command sudo amixer controls. * I've tried running the script via crontab -e and I've also tried putting this line into my rc.local file:
-sh
    su -u pi -c "python /home/pi/scripts/volume.py > /home/pi/scripts/volume.log 2>&1" &
However, both of these result in the same second output. I believe getting the first output has something to do with running the script under the correct user or setting my environment variables correctly, but I have no idea how to do it. Would someone be able to help me here?
Thimis (11 rep)
Jan 11, 2025, 10:31 AM • Last activity: Jan 21, 2025, 12:37 PM
3 votes
0 answers
33 views
Alsa/jack audio : Confused about alsamixer capture levels generating hard clipping
Not sure if the topic is too audio-specific to be posted here, if so then do tell and I'd appreciate suggestions on proper forums. My LP recording setup is through an M-audio 2496 card on linux running jack, using a command line script to capture. I use the hardware input to capture and set the reco...
Not sure if the topic is too audio-specific to be posted here, if so then do tell and I'd appreciate suggestions on proper forums. My LP recording setup is through an M-audio 2496 card on linux running jack, using a command line script to capture. I use the hardware input to capture and set the recording level using alsamixer; My usual capture level has been -3 dB for years. These days I'm testing a new phono preamp that has an higher output level than my other units so I lowered the capture level to -6dB but ran into clipping issues. Investigating this problem, it turns out that setting the capture level below -3 dB on hardware channels "H/W Multi" (left) and "H/W Multi 1" (right) clips the signal ! Perhaps some pics would help illustrate the phenomenon. Below are shots of the same high modulation passage of an LP record at different capture levels in alsamixer. Note that except for the 0 dB test, there were no Xruns or overruns during the recording process. 0 dB capture level -3 dB capture level -6 dB capture level -9 dB capture level At 0 dB I get overload peaks as can be expected; at -3 dB things seem ok like my usual setup; Note the recorded amplitude level. But as you can see, lowering capture level further not only reduces overall recorded amplitude but clips the peaks, even if they reach a lower amplitude than the recording at -3 dB. I always assumed the alsamixer capture level worked as an equivalent of the "recording level" on the cassette decks of my youth, e.g. simply attenuated the signal. Now it seems it both attenuates and limits somehow.... I'm confused! Please help me better understand what's going on here and thanks in advance for any insights. -Joe
Joe (163 rep)
Jan 18, 2025, 12:17 AM • Last activity: Jan 18, 2025, 01:15 PM
1 votes
0 answers
48 views
USB-Audio no volume unless at 100% sound volume on multiple distros
So basically, whenever I connect a Linux laptop to my docking station which has a builtin speaker I only get audio when the volume is set to 100% (with some small caveats that I explain underneath). So this occurs on two of my work laptops (one with Fedora 40 and also now with 41, the other with min...
So basically, whenever I connect a Linux laptop to my docking station which has a builtin speaker I only get audio when the volume is set to 100% (with some small caveats that I explain underneath). So this occurs on two of my work laptops (one with Fedora 40 and also now with 41, the other with mint 17) and also with my desktop (Fedora 40) and my SteamDeck (SteamOS 3.6). Now what is interesting here is that I can see, that no matter if I move the volume through the knob on the keyboard, in the os or with the control on the dock itself, if I open ALSAmixer on this device I can see the PCM value is "00" as long as the volume in the OS is set to 0-98, then jumps to 33 when the volume is at 99 and to 100 once set to 100. If I manually adjust the PCM value in the AlsaMixer to let's say 23 then the sound is at the expected volume for that setting, but as soon as I touch the volume in the OS again it jumps to either 0 or 100 again. This setting is consistent on all the devices when looking at it with alsamixer. Now I do believe that this behavior is in some way related to some setting with alsamixer that it adjusts the wrong value when turning the volume knob or adjusting it through the OS but I can not find that setting again. I think there was a config file somewhere where this could be set but I am not sure anymore. Not that this would help me much on the steam deck (immutable OS) but at least with the other devices I believe I could maybe solve it this way. Thanks for any help
RedXon (11 rep)
Dec 20, 2024, 12:45 PM
1 votes
1 answers
34 views
Failed to play multiple audio with ALSA DMIX
I am using `alsa-lib-1.2.9` in my embedded Linux system, and now I want to play multiple audio from different threads, so I googled internet (I am NOT familiar with ALSA) and found I can use `dmix`. Here is the main part of my `/etc/asound.conf` in the board. ``` pcm.!default { type asym playback.pc...
I am using alsa-lib-1.2.9 in my embedded Linux system, and now I want to play multiple audio from different threads, so I googled internet (I am NOT familiar with ALSA) and found I can use dmix. Here is the main part of my /etc/asound.conf in the board.
pcm.!default
{
        type asym
        playback.pcm "play_softvol"
        capture.pcm "cap_chn0"
}

pcm.play_softvol {
        type softvol
        slave {
                pcm play_chn0
        }

        control {
                name "Speaker Volume"
        }

        min_dB -60.0
        max_dB -10.0
        resolution 50
}

pcm.play_chn0 {
        type plug
        slave {
                pcm dmixer
        }
}

pcm.dmixer {
        type dmix
        ipc_key 77235
        ipc_key_add_uid true
        slave {
                pcm "hw:0,0"
                period_time 0
                period_size 320
                buffer_size 2560
                rate 32000
        }
}

ctl.dmixer {
        type hw
        card 0
}

pcm.cap_chn0 {
        type plug
        slave {
                pcm dsnooper
        }
}

pcm.tloop_cap {
        type plug
        slave.pcm "hw:Loopback,0,0"
}

pcm.dsnooper {
        type dsnoop
        ipc_key 77236
        ipc_key_add_uid true
        slave {
                pcm "hw:0,0"
                channels 4
                rate 16000
        }
        bindings {
                0 0
                1 1
                2 2
                3 3
        }
}

ctl.dsnooper {
        type hw
        card 0
}
I think the default device is using play_softvol->play_chn0->dmix. So I tried to play 2 PCM files as follows,
#include 
#include 
#include 
#include 

pthread_t tid, tid2;
static snd_pcm_t *playback_handle;
static int size;
static snd_pcm_uframes_t frames;

void *play_func(void *arg)
{
    char *buffer;
    int ret;
    FILE *fp = fopen(arg, "rb");
    if(fp == NULL)
        return 0;

    buffer = (char *) malloc(size);
    fprintf(stderr, "size = %d\n", size);

    while (1)
    {
        ret = fread(buffer, 1, size, fp);
        if(ret == 0)
        {
            fprintf(stderr, "end of file on input\n");
            break;
        }

        while(ret = snd_pcm_writei(playback_handle, buffer, frames) 2)
        ret = pthread_create(&tid2, NULL, play_func2, argv);

        pthread_join(tid, NULL);
        if (argc > 2)
        pthread_join(tid2, NULL);

    snd_pcm_close(playback_handle);

    return 0;
}
asound_threads 1.pcm 2.pcm
play song 1.pcm and 2.pcm
size = 320
size = 320
But it sounds messy, the two PCMs are played in an interleaved way, but the speed is wrong and flittered. So in my case, how can I play multiple audios (audio mixing)?
wangt13 (631 rep)
Nov 5, 2024, 12:45 AM • Last activity: Nov 7, 2024, 01:04 AM
-1 votes
1 answers
463 views
How can I fix my audio for my laptop speaker?
Sound plays in wired earbuds but not in speakers when the earphones are unplugged. I didn't have this problem until today, and I don't remember doing anything to make cause this. I've of course restarted my laptop multiple times, and I have checked Alsamixer and everything seemed fine. I use pipewir...
Sound plays in wired earbuds but not in speakers when the earphones are unplugged. I didn't have this problem until today, and I don't remember doing anything to make cause this. I've of course restarted my laptop multiple times, and I have checked Alsamixer and everything seemed fine. I use pipewire, but there's a problem I have noticed. When I run the command to check the
status pipewire
I get the error
pipewire.service could not be found.
Yet I have pipewire installed, and when I try to uninstall it says it won't because it breaks a bunch of dependencies. I don't know whether it's a problem with pipewire or something else but if anyone has any solutions please let me know.
Blakely Schreiber (1 rep)
Nov 2, 2024, 04:53 AM • Last activity: Nov 3, 2024, 10:38 AM
0 votes
1 answers
123 views
HDA Intel PCH doesn't work/show up in ubuntu 20.04
I'm having audio problems on ubuntu 20.04. My PCH card doesn't show under aplay-l. There are missing files for the card on proc/asound/. Previously I could select it on alsamixer and change the volume meanwhile now shows `This sound device does not have any controls.`
I'm having audio problems on ubuntu 20.04. My PCH card doesn't show under aplay-l. There are missing files for the card on proc/asound/. Previously I could select it on alsamixer and change the volume meanwhile now shows This sound device does not have any controls.
Kermilli (1 rep)
Oct 22, 2024, 07:16 PM • Last activity: Oct 22, 2024, 07:47 PM
0 votes
1 answers
356 views
amixer relationship(s) with pipewire
I have two computers (call them System A & System B); both are running a "headless" version of Debian 'bookworm'. I use both of them to play music through two Bluetooth speakers - one speaker to each computer. They both play reliably since installing `pipewire`. Both have Debian's latest 'stable' ve...
I have two computers (call them System A & System B); both are running a "headless" version of Debian 'bookworm'. I use both of them to play music through two Bluetooth speakers - one speaker to each computer. They both play reliably since installing pipewire. Both have Debian's latest 'stable' version of pipewire installed: 1.2.4. And if it makes any difference, I'm using mpg123 as the *player* on System A, and cmus on System B.
$ pipewire --version
pipewire
Compiled with libpipewire 1.2.4
Linked with libpipewire 1.2.4
I wanted to adjust the volume from the CLI - rather than fiddling with the volume controls on the BT speakers themselves. I looked into doing that with pipewire, but [it seemed *arcane*](https://bbs.archlinux.org/viewtopic.php?id=276379) to me. Instead, I found [this blog post from Baeldung](https://www.baeldung.com/linux/volume-level-command-line) that made sense, and it [*mostly* worked well](https://unix.stackexchange.com/q/785314/286615) on System A. When I tried it on System B however, it did not seem to work at all. 'System A' and 'System B' are not identical systems, but they are quite similar; i.e. A is a Raspberry Pi Zero 2W; B is a Raspberry Pi 3A+. REF: [Hardware Summaries](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html) | command | System A | System B | | ------- | -------- | -------- | | $ mixer | Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 26215 [40%] [on]
| Simple mixer control 'PCM',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback -10239 - 400
Mono: Playback -1988 [78%] [-19.88dB] [on]
| | $ amixer info | Card default 'pipewire'/'PipeWire'
Mixer name : 'PipeWire'
Components : ''
Controls : 4
Simple ctrls : 2 | Card default 'Headphones'/'bcm2835 Headphones'
Mixer name : 'Broadcom Mixer'
Components : ''
Controls : 2
Simple ctrls : 1 | | $ amixer sset Master 90% | **SPEAKER VOLUME INCREASES!**
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 65536
Mono:
Front Left: Playback 58982 [90%] [on]
Front Right: Playback 58982 [90%] [on]
| amixer: Unable to find simple control 'Master',0 | | $ amixer sset PCM 10% | amixer: Unable to find simple control 'PCM',0 | **NO CHANGE IN SPEAKER VOLUME**
Simple mixer control 'PCM',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback -10239 - 400
Mono: Playback -9175 [10%] [-91.75dB] [on]
And so there are several things I don't understand: * Why was pipewire chosen for the default card on System A, and the (Broadcomm) Headphones for System B? * Why is the Mixer control called 'Master' on System A, and 'PCM' on System B? * Why does the sset volume control have no effect on System B, yet seems to work quite well on System A? I looked at [another Q&A here on SE](https://unix.stackexchange.com/a/765342/286615) re "Selecting a card for amixer": * On System A:
$ cat /proc/asound/cards
   --- no soundcards --- 
   
   # and ...
   
   $ cat /etc/asound.conf
   cat: /etc/asound.conf: No such file or directory 

   # and ...

   $ cat /etc/alsa/conf.d/50-pipewire.conf 
   # Add a specific named PipeWire pcm

   defaults.pipewire.server "pipewire-0"
   defaults.pipewire.node "-1"
   defaults.pipewire.exclusive false
   defaults.pipewire.role ""
   defaults.pipewire.rate 0
   defaults.pipewire.format ""
   defaults.pipewire.channels 0
   defaults.pipewire.period_bytes 0
   defaults.pipewire.buffer_bytes 0

   pcm.pipewire {

   # ... etc, etc
* On System B:
$ cat /proc/asound/cards
     0 [Headphones     ]: bcm2835_headpho - bcm2835 Headphones
                          bcm2835 Headphones
     1 [vc4hdmi        ]: vc4-hdmi - vc4-hdmi
                          vc4-hdmi
   
   # and ...
   
   $ cat /etc/asound.conf
   cat: /etc/asound.conf: No such file or directory

   # and ...

   $ less /etc/alsa/conf.d/50-pipewire.conf
   /etc/alsa/conf.d/50-pipewire.conf: No such file or directory
All that said, I am trying to gain a better understanding of how these different pieces of the *sound puzzle* fit together, and a method I can use to control volume from the CLI. *Of course it would be preferable to have the **same** volume control method on both systems.*
Seamus (3772 rep)
Oct 22, 2024, 07:47 AM • Last activity: Oct 22, 2024, 06:07 PM
0 votes
1 answers
1823 views
No sound on Fedora 28 XFCE
After installing Fedora 28 XFCE I had sound (everything worked). I run dnf update and after reboot I have lost sound. PulseAudio plugin for panel says in tooltip "Not connected to the PulseAudio server". After clicking it I see "Establishing connection to PulseAudio. Please wait...". Waiting doesn't...
After installing Fedora 28 XFCE I had sound (everything worked). I run dnf update and after reboot I have lost sound. PulseAudio plugin for panel says in tooltip "Not connected to the PulseAudio server". After clicking it I see "Establishing connection to PulseAudio. Please wait...". Waiting doesn't do anything. Some other panel plugin for sound control (simpler than previous) just says on tooltip "No valid device and/or element". Running VLC gives "Audio output failed: The audio device "default" could not be used: Connection refused.". Running ps aux | grep pulse returns. Running /usr/lib64/xfce4/panel/wrapper-2.0 /usr/lib64/xfce4/panel/plugins/libpulseaudio-plugin.so 36 14680107 pulseaudio PulseAudio Plugin Adjust the audio volume of the PulseAudio sound system alsamixer returns ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused cannot open mixer: Connection refused Running cat /proc/asound/version returns Advanced Linux Sound Architecture Driver Version k4.17.2-200.fc28.x86_64. Running cat /dev/sndstat returns cat: /dev/sndstat: No such file or directory Running sudo pulseaudio returns W: [pulseaudio] main.c: This program is not intended to be run as root (unless --system is specified). E: [pulseaudio] backend-ofono.c: Failed to register as a handsfree audio agent with ofono: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files Running lsusb returns Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 010: ID 8087:07dc Intel Corp. Bus 001 Device 008: ID 0b97:7772 O2 Micro, Inc. OZ776 CCID Smartcard Reader Bus 001 Device 007: ID 0b97:7761 O2 Micro, Inc. Oz776 1.1 Hub Bus 001 Device 006: ID 04f3:0398 Elan Microelectronics Corp. Bus 001 Device 005: ID 05e3:0608 Genesys Logic, Inc. Hub Bus 001 Device 029: ID 1017:2010 Speedy Industrial Supplies, Pte., Ltd Bus 001 Device 009: ID 1199:9063 Sierra Wireless, Inc. Bus 001 Device 028: ID 09da:f613 A4Tech Co., Ltd. Bus 001 Device 031: ID 0fce:51ba Sony Ericsson Mobile Communications AB Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
spam (183 rep)
Jul 3, 2018, 12:29 PM • Last activity: Jul 24, 2024, 09:06 PM
0 votes
1 answers
494 views
amixer: Unable to find simple control 'Master' on Raspbian 12 lite when running from systemctl service
On my Raspbian 12 Lite box I can run: amixer set Master 100% to successfully change the master volume. But if I put it into a systemctl configuration in order to set volume at boot: [Unit] Description=Volume [Service] ExecStart=/usr/bin/amixer set Master 100% Restart=no User=fritz [Install] WantedBy...
On my Raspbian 12 Lite box I can run: amixer set Master 100% to successfully change the master volume. But if I put it into a systemctl configuration in order to set volume at boot: [Unit] Description=Volume [Service] ExecStart=/usr/bin/amixer set Master 100% Restart=no User=fritz [Install] WantedBy=multi-user.target it doesn't work, as journalctl gives: Mar 28 23:02:56 raspberrypi amixer: amixer: Unable to find simple control 'Master',0 Mar 28 23:02:56 raspberrypi systemd: volume.service: Main process exited, code=exited, status=1/FAILURE Mar 28 23:02:56 raspberrypi systemd: volume.service: Failed with result 'exit-code'. As you can see, I specified the same user that I tried from terminal. Adding Group=audio doesn't fix the problem.
Fabrizio Giudici (141 rep)
Mar 28, 2024, 10:17 PM • Last activity: Mar 28, 2024, 10:28 PM
3 votes
1 answers
74 views
alsamixer / amixer supported usb audio class 2 controls
I am currently developing a usb soundcard that is usb audio class 2 compliant. In my current setup I have audio and mute controls for several channels working in alsamixer. The USB audio class 2 spec also supports a lot of other controls such as bass, mid, treble, equalizers, effects, etc. I have be...
I am currently developing a usb soundcard that is usb audio class 2 compliant. In my current setup I have audio and mute controls for several channels working in alsamixer. The USB audio class 2 spec also supports a lot of other controls such as bass, mid, treble, equalizers, effects, etc. I have been trying to find a list of controls supported by alsamixer but the documentation does not mention any specifics on what kind of controls are supported. If someone has a list with supported controls or an alternative command-line program that would be greatly appreciated.
Jelle Jan (33 rep)
Feb 26, 2024, 10:59 AM • Last activity: Feb 28, 2024, 11:34 AM
1 votes
0 answers
80 views
How to get ALSA to trigger events for USB audio volume changes on the hardware
I've been trying to figure this out for a while, and I've even posted a few questions from different angles on it, but I have yet to get a response. So, if my question is nonsense, please let me know. If there is something missing that would make this easier to understand, please let me know. Here i...
I've been trying to figure this out for a while, and I've even posted a few questions from different angles on it, but I have yet to get a response. So, if my question is nonsense, please let me know. If there is something missing that would make this easier to understand, please let me know. Here is the basic problem. I've got a RaspPi 5, with a PolyCom P3200M speaker attached to it. (It is actually for conference calls, so it is mic/speaker in one.) I want to trigger events if the volume keys on the speaker itself are pressed. If I run amixer -Dsysdefault:2 sset PCM Playback 5 for example, it will indeed set the volume on the speaker hardware to that level. If I run amixer -Dsysdefault:2 events, and then issue in a separate term amixer -Dsysdefault:2 sset PCM Playback 5, the events are indeed captured. However, if, instead, I push the volume buttons on the speaker, the volume on the speaker will change, but no event is triggered for amixer to react to. Can this be done? Can I trigger an event on amixer events when I push the volume buttons on the speaker? Is there another way to get to the same end point of knowing when the buttons are pressed?
knottied (21 rep)
Feb 18, 2024, 11:55 PM
1 votes
0 answers
107 views
Why is ALSA often not reading the audio card state
I'm having a terrible time with ALSA on a PI5. It will play and record sound, but the control interface seems to only work sometimes. I cannot find a cause for this. I could use some help understanding what is going on. My objective is to have a USB speaker (Polycom P3200M) reset its volume to the l...
I'm having a terrible time with ALSA on a PI5. It will play and record sound, but the control interface seems to only work sometimes. I cannot find a cause for this. I could use some help understanding what is going on. My objective is to have a USB speaker (Polycom P3200M) reset its volume to the last volume setting on a boot. This should work with alsactl rdaemon. Further, there is a canned service in alsa-state.service that should do that. It is not working. I already have /etc/asla/state-daemon.conf in place, so the rdaemon option should be running. A look at ps -ef shows:
root         660       1  0 20:06 ?        00:00:00 /usr/sbin/alsactl -E HOME=/run/alsa -E XDG_RUNTIME_DIR=/run/alsa/runtime -s -n 19 -c rdaemon
So, I have to assume the service is running correctly. The problem is that if I execute amixer -c2 I don't get the correct output. For example it will show:
Simple mixer control 'PCM',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 20
  Mono: Playback 9 [45%] [-22.00dB] [on]
Simple mixer control 'Headset',0
  Capabilities: cswitch cswitch-joined
  Capture channels: Mono
  Mono: Capture [on]
If I then change the volume on the speaker by pushing the buttons, and rerun axmixer -c2, I get the exact same output. By looking at the timestamp on /var/lib/alsa/asound.state I can see that the file is only touched at boot, and then never again. Finally, in a fit of frustration, I wrote my own code to monitor the device, and determine when the volume was changed.
#include 
#include 

int elem_callback(snd_mixer_elem_t *elem,unsigned int mask);

int main(int argc, char* argv[])
{
	long min, max;
	snd_mixer_t *handle;
	snd_mixer_selem_id_t *sid;
    	const char *selem_name = "PCM";
	long curVolume;
	int res;
	
	if(argc!=2)
	{
		return(1);
	}
	snd_mixer_open(&handle, 0);
	snd_mixer_attach(handle, argv);
	snd_mixer_selem_register(handle, NULL, NULL);
	snd_mixer_load(handle);

	snd_mixer_selem_id_alloca(&sid);
	snd_mixer_selem_id_set_index(sid, 0);
	snd_mixer_selem_id_set_name(sid, selem_name);
	snd_mixer_elem_t* elem = snd_mixer_find_selem(handle, sid);

	printf("Name: %s\n",snd_mixer_selem_get_name(elem));


	snd_mixer_selem_get_playback_volume_range(elem, &min, &max);
	printf("max: %d\nmin:%d\n",max,min);
	snd_mixer_selem_get_playback_volume(elem,SND_MIXER_SCHN_MONO,&curVolume);
	printf("Current Volume: %d\n",curVolume);

	snd_mixer_elem_set_callback(elem,elem_callback);

	while(1)
	{
		res=snd_mixer_wait(handle,-1);
		res=snd_mixer_handle_events(handle);
	}
    	snd_mixer_close(handle);

    return(0);
}


int elem_callback(snd_mixer_elem_t *elem,unsigned int mask)
{
	long curVolume;

	switch(mask)
	{
		case 1:
			snd_mixer_selem_get_playback_volume(elem,SND_MIXER_SCHN_MONO,&curVolume);
			printf("Current Volume: %d\n",curVolume);
			printf("\tmask:  %d\n",mask);
			break;
		default:
			printf("Unrecognized mask: %d\n",mask);
			break;
	}
	return (0);
}
I lifted most of this code from [link](https://stackoverflow.com/questions/6787318/set-alsa-master-volume-from-c-code) What is truly bothersome is the above code worked. I could press the volume button on the speaker and the callback would get triggered. All was good. Then I rebooted the system and came back a day later. Now the code does nothing. It will output what it thinks the current settings are (which are not correct) but it will not react to the button presses. I'm at a loss. Why is ALSA sometimes working?
knottied (21 rep)
Feb 17, 2024, 06:15 PM
1 votes
1 answers
305 views
Parallel / multiple audio output with alsa and USB audio mixer
I have a new docking station for my laptop and have a hard time configuring audio/alsa. After checking cat /proc/asound/cards 0 [PCH ]: HDA-Intel - HDA Intel PCH HDA Intel PCH at 0xec248000 irq 158 1 [Audio ]: USB-Audio - ThinkPad Dock USB Audio Generic ThinkPad Dock USB Audio at usb-0000:3c:00.0-1....
I have a new docking station for my laptop and have a hard time configuring audio/alsa. After checking cat /proc/asound/cards 0 [PCH ]: HDA-Intel - HDA Intel PCH HDA Intel PCH at 0xec248000 irq 158 1 [Audio ]: USB-Audio - ThinkPad Dock USB Audio Generic ThinkPad Dock USB Audio at usb-0000:3c:00.0-1.4.4, high speed I created /etc/asound.conf like this pcm.!default { type hw card 1 } ctl.!default { type hw card 1 } This seems to be working for most applications (Chromium, VLC, mpd, etc.) but I have no audio output in Firefox and I don't have audio output on multiple applications (parallel?) at the same time (ex: If I start Chromium I have no audio in VLC). VLC gives me this error message for example: Audio output failed: The audio device "default" could not be used: Device or resource busy. - How do I make it works for multiple applications at the same time? - Is there something specific to do for Firefox ? - How to fallback to card0 (laptop) if card1 (docking station) is not plugged in? ty Resources: - https://superuser.com/questions/626606/how-to-make-alsa-pick-a-preferred-sound-device-automatically - https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#Set_the_default_sound_card Installed packages: alsa-utils, alsa-firmware, sof-firmware uname -a: Linux T480s 6.7.4-arch1-1 #1 SMP PREEMPT_DYNAMIC Mon, 05 Feb 2024 22:07:49 +0000 x86_64 GNU/Linux Edit: multiple audio output and Firefox audio are working fine with card0 (internal) Edit2: Following https://wiki.archlinux.org/title/Advanced_Linux_Sound_Architecture#Configuring_the_index_order_via_kernel_module_options I changed the index order of the cards in /etc/modprobe.d/alsa-base.conf : options snd_usb_audio index=0 options snd_hda_intel index=1 I removed /etc/asound.conf and rebooted. When snd_usb_audio is loaded as the default card (card0) it is working. Firefox audio is working fine and I can output audio in multiple application at the same time. So this means I only need to load snd_usb_audio as card0 if plugged and fallback to snd_hda_intel if not. Can we do this in alsa-base.conf or /etc/asound.conf?
e___e (55 rep)
Feb 16, 2024, 04:11 PM • Last activity: Feb 16, 2024, 07:06 PM
0 votes
1 answers
73 views
How to route sgtl5000 audio within the chip?
I have an embedded device with an sgtl5000 audio codec, linked to an iMX8 CPU via SPI. According to the datasheet, there is a direct route from LINE_IN to HP_OUT, which avoids sound travelling through the SPI connection to the CPU. [![datasheet block diagram][1]][1] Does ALSA/alsamixer allow me to d...
I have an embedded device with an sgtl5000 audio codec, linked to an iMX8 CPU via SPI. According to the datasheet, there is a direct route from LINE_IN to HP_OUT, which avoids sound travelling through the SPI connection to the CPU. datasheet block diagram Does ALSA/alsamixer allow me to do this routing, or is it restricted to only those audio flows which traverse the kernel? --- Using amixer, I can see: root@test217:~# amixer Simple mixer control 'Headphone',0 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 127 Mono: Front Left: Playback 89 [70%] [-7.00dB] [on] Front Right: Playback 89 [70%] [-7.00dB] [on] Simple mixer control 'Headphone Mux',0 Capabilities: enum Items: 'DAC' 'LINE_IN' Item0: 'DAC' ... What command lets me switch Headphone Mux>>Item0 from DAC to LINE_IN?
fadedbee (1113 rep)
Dec 19, 2023, 02:54 PM • Last activity: Dec 19, 2023, 03:34 PM
0 votes
1 answers
1191 views
How to set HDMI card - default audio card
Hello everyone I'm Use laptop + external monitors, and i need use monitor speaker and i can't see HDMI card in alsamixer, when reviewing command [ aplay -l ] result = [void@base ~]$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: CX20757 Analog [CX20757 An...
Hello everyone I'm Use laptop + external monitors, and i need use monitor speaker and i can't see HDMI card in alsamixer, when reviewing command [ aplay -l ] result = [void@base ~]$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: PCH [HDA Intel PCH], device 0: CX20757 Analog [CX20757 Analog] Subdevices: 0/1 Subdevice #0: subdevice #0 card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [BenQ EX2710] Subdevices: 1/1 Subdevice #0: subdevice #0 and when reviewing command
[void@base ~]$  cat /proc/asound/modules
 0 snd_hda_intel
other thing : I'm using void-base system and some xorg services and dwm window manager allright i need know how to set HDM card to defult audio card
Mousa Abdo (1 rep)
Dec 9, 2023, 01:20 PM • Last activity: Dec 10, 2023, 03:36 PM
0 votes
0 answers
165 views
No audio heard, yet Linux thinks played successfully
I had audio working on my AlmaLinux 9 installation, using a USB sound card. I seemed to have changed something because I no longer hear audio (but AlmaLinux thinks its successfully playing a sound). I did switch from GUI to text mode on boot, but I don't think that should matter. I have no idea how...
I had audio working on my AlmaLinux 9 installation, using a USB sound card. I seemed to have changed something because I no longer hear audio (but AlmaLinux thinks its successfully playing a sound). I did switch from GUI to text mode on boot, but I don't think that should matter. I have no idea how to proceed...hopefully someone sees something wrong here: For example, the following command completes successfully: aplay /data/sounds/intruder_alert.wav Playing WAVE '/data/sounds/intruder_alert.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono I confirmed my USB audio device is detected on bootup (not sure if 'input,hidraw1' is a clue): [ 2.586749] hub 2-2:1.0: USB hub found [ 2.589077] hub 2-2:1.0: 7 ports detected [ 3.536316] usb 2-2.1: new full-speed USB device number 4 using uhci_hcd [ 4.432226] usb 2-2.1: New USB device found, idVendor=08bb, idProduct=2902, bcdDevice= 1.00 [ 4.432236] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 4.432243] usb 2-2.1: Product: USB Audio CODEC [ 4.432248] usb 2-2.1: Manufacturer: Burr-Brown from TI [ 4.524947] input: Burr-Brown from TI USB Audio CODEC as /devices/pci0000:00/0000:00:11.0/0000:02:00.0/usb2/2-2/2-2.1/2-2.1:1.3/0003:08BB:2902.0002/input/input6 [ 4.583437] hid-generic 0003:08BB:2902.0002: input,hidraw1: USB HID v1.00 Device [Burr-Brown from TI USB Audio CODEC ] on usb-0000:02:00.0-2.1/input3 and sound related drivers are loaded by kernel: lsmod | grep snd snd_seq_dummy 16384 0 snd_hrtimer 16384 1 snd_usb_audio 385024 2 snd_usbmidi_lib 45056 1 snd_usb_audio snd_hwdep 16384 1 snd_usb_audio snd_seq 94208 7 snd_seq_dummy snd_pcm 151552 1 snd_usb_audio snd_timer 49152 3 snd_seq,snd_hrtimer,snd_pcm snd_rawmidi 45056 1 snd_usbmidi_lib snd_seq_device 16384 2 snd_seq,snd_rawmidi snd 122880 14 snd_seq,snd_seq_device,snd_hwdep,snd_usb_audio,snd_usbmidi_lib,snd_timer,snd_pcm,snd_rawmidi soundcore 16384 1 snd mc 69632 1 snd_usb_audio Since I'm running pipewire and the nodes are pw-cli ls Node id 28, type PipeWire:Interface:Node/3 object.serial = "28" factory.id = "10" priority.driver = "20000" node.name = "Dummy-Driver" id 29, type PipeWire:Interface:Node/3 object.serial = "29" factory.id = "10" priority.driver = "19000" node.name = "Freewheel-Driver" id 31, type PipeWire:Interface:Node/3 object.serial = "1736" object.path = "alsa:pcm:0:front:0:playback" factory.id = "18" client.id = "33" device.id = "44" priority.session = "1009" priority.driver = "1009" node.description = "PCM2902 Audio Codec Analog Stereo" node.name = "alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-output" node.nick = "USB Audio CODEC" media.class = "Audio/Sink" id 37, type PipeWire:Interface:Node/3 object.serial = "35" factory.id = "10" client.id = "33" node.name = "Midi-Bridge" media.class = "Midi/Bridge" id 42, type PipeWire:Interface:Node/3 object.serial = "1737" object.path = "alsa:pcm:0:hw:0:capture" factory.id = "18" client.id = "33" device.id = "44" priority.session = "2009" priority.driver = "2009" node.description = "PCM2902 Audio Codec Analog Stereo" node.name = "alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-input" node.nick = "USB Audio CODEC" media.class = "Audio/Source" I also tried a simple speaker test: speaker-test -c 2 speaker-test 1.2.8 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 64 to 1048576 Period size range from 32 to 524288 Using max buffer size 1048576 Periods = 4 was set period_size = 262144 was set buffer_size = 1048576 0 - Front Left 1 - Front Right Time per period = 11.005656 0 - Front Left ^C 1 - Front Right Time per period = 5.263193 And I checked the aplay devices aplay -l **** List of PLAYBACK Hardware Devices **** card 0: CODEC [USB Audio CODEC], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 aplay -L null Discard all samples (playback) or generate zero samples (capture) sysdefault Default Audio Device oss Open Sound System pipewire PipeWire Sound Server default Default ALSA Output (currently PipeWire Media Server) sysdefault:CARD=CODEC USB Audio CODEC, USB Audio Default Audio Device front:CARD=CODEC,DEV=0 USB Audio CODEC, USB Audio Front output / input surround21:CARD=CODEC,DEV=0 USB Audio CODEC, USB Audio 2.1 Surround output to Front and Subwoofer speakers surround40:CARD=CODEC,DEV=0 USB Audio CODEC, USB Audio 4.0 Surround output to Front and Rear speakers surround41:CARD=CODEC,DEV=0 USB Audio CODEC, USB Audio 4.1 Surround output to Front, Rear and Subwoofer speakers surround50:CARD=CODEC,DEV=0 USB Audio CODEC, USB Audio 5.0 Surround output to Front, Center and Rear speakers surround51:CARD=CODEC,DEV=0 USB Audio CODEC, USB Audio 5.1 Surround output to Front, Center, Rear and Subwoofer speakers surround71:CARD=CODEC,DEV=0 USB Audio CODEC, USB Audio 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers iec958:CARD=CODEC,DEV=0 USB Audio CODEC, USB Audio IEC958 (S/PDIF) Digital Audio Output And alsa mixer says volume levels are up: amixer Simple mixer control 'Master',0 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 65536 Mono: Front Left: Playback 55864 [85%] [on] Front Right: Playback 55864 [85%] [on] Simple mixer control 'Capture',0 Capabilities: cvolume cswitch cswitch-joined Capture channels: Front Left - Front Right Limits: Capture 0 - 65536 Front Left: Capture 26213 [40%] [on] Front Right: Capture 26213 [40%] [on] I've never seen this before and I'm not sure how to diagnose this. Btw, I confirmed my speakers work fine (hear buzz when I touch the audio cable connections).
TSG (1983 rep)
Nov 28, 2023, 08:45 PM
1 votes
1 answers
1029 views
Change Default Master Volume Control to "PCM" in alsamixer on Linux Mint
I am running Linux Mint and whenever I use my system's hardware volume controls (e.g., volume up/down buttons), it adjusts the "PCM 1" level in alsamixer. However, I want it to adjust the "PCM" level instead. Here's the output from `amixer -c 1` which shows the available controls: Simple mixer contr...
I am running Linux Mint and whenever I use my system's hardware volume controls (e.g., volume up/down buttons), it adjusts the "PCM 1" level in alsamixer. However, I want it to adjust the "PCM" level instead. Here's the output from amixer -c 1 which shows the available controls: Simple mixer control 'PCM',0 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 74 Mono: Front Left: Playback 74 [100%] [0.00dB] [on] Front Right: Playback 74 [100%] [0.00dB] [on] Simple mixer control 'PCM',1 Capabilities: pvolume pswitch pswitch-joined Playback channels: Front Left - Front Right Limits: Playback 0 - 74 Mono: Front Left: Playback 74 [100%] [0.00dB] [on] Front Right: Playback 74 [100%] [0.00dB] [on] Simple mixer control 'Mic',0 Capabilities: cvolume cvolume-joined cswitch cswitch-joined Capture channels: Mono Limits: Capture 0 - 74 Mono: Capture 74 [100%] [0.00dB] [on] I have tried modifying PulseAudio's default.pa configuration, but this resulted in loss of audio. I am looking for a solution that doesn't involve custom scripts or keybindings. I'd prefer to have the standard master volume change "PCM" directly. Any suggestions or insights would be greatly appreciated! As requested, here is the output of cat ~/.xbindkeysrc: ## For the benefit of emacs users: -*- shell-script -*- ########################### # xbindkeys configuration # ########################### # # Version: 1.8.7 # # If you edit this file, do not forget to uncomment any lines # that you change. # The pound(#) symbol may be used anywhere for comments. # # To specify a key, you can use 'xbindkeys --key' or # 'xbindkeys --multikey' and put one of the two lines in this file. # # The format of a command line is: # "command to start" # associated key # # # A list of keys is in /usr/include/X11/keysym.h and in # /usr/include/X11/keysymdef.h # The XK_ is not needed. # # List of modifier: # Release, Control, Shift, Mod1 (Alt), Mod2 (NumLock), # Mod3 (CapsLock), Mod4, Mod5 (Scroll). # # The release modifier is not a standard X modifier, but you can # use it if you want to catch release events instead of press events # By defaults, xbindkeys does not pay attention with the modifiers # NumLock, CapsLock and ScrollLock. # Uncomment the lines above if you want to pay attention to them. #keystate_numlock = enable #keystate_capslock = enable #keystate_scrolllock= enable # Examples of commands: "xbindkeys_show" control+shift + q # set directly keycode (here control + f with my keyboard) #"xterm" # c:41 + m:0x4 # specify a mouse button #"xterm" # control + b:2 #"xterm -geom 50x20+20+20" # Shift+Mod2+alt + s # ## set directly keycode (here control+alt+mod2 + f with my keyboard) #"xterm" # alt + c:0x29 + m:4 + mod2 # ## Control+Shift+a release event starts rxvt #"rxvt" # release+control+shift + a # ## Control + mouse button 2 release event starts rxvt #"rxvt" # Control + b:2 + Release ################################## # End of xbindkeys configuration # ################################## #"xdotool type 'r'" #Control+Alt + Right And the output of pacmd list-cards: 4 card(s) available. index: 0 name: driver: owner module: 7 properties: alsa.card = "2" alsa.card_name = "HDA NVidia" alsa.long_card_name = "HDA NVidia at 0xdc080000 irq 17" alsa.driver_name = "snd_hda_intel" device.bus_path = "pci-0000:01:00.1" sysfs.path = "/devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card2" device.bus = "pci" device.vendor.id = "10de" device.vendor.name = "NVIDIA Corporation" device.product.id = "10f0" device.product.name = "GP104 High Definition Audio Controller" device.string = "2" device.description = "GP104 High Definition Audio Controller" module-udev-detect.discovered = "1" device.icon_name = "audio-card-pci" profiles: output:hdmi-stereo: Digital Stereo (HDMI)-Ausgabe (priority 38668, available: unknown) output:hdmi-stereo-extra1: Digital Stereo (HDMI 2)-Ausgabe (priority 38468, available: unknown) output:hdmi-stereo-extra2: Digital Stereo (HDMI 3)-Ausgabe (priority 38468, available: unknown) output:hdmi-stereo-extra3: Digital Stereo (HDMI 4)-Ausgabe (priority 5700, available: no) output:hdmi-surround-extra3: Digital Surround 5.1 (HDMI 4)-Ausgabe (priority 600, available: no) output:hdmi-surround71-extra3: Digital Surround 7.1 (HDMI 4)-Ausgabe (priority 600, available: no) off: Aus (priority 0, available: unknown) active profile: sinks: alsa_output.pci-0000_01_00.1.hdmi-stereo/#11: GP104 High Definition Audio Controller Digital Stereo (HDMI) sources: alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor/#14: Monitor of GP104 High Definition Audio Controller Digital Stereo (HDMI) ports: hdmi-output-0: HDMI / DisplayPort (priority 5900, latency offset 0 usec, available: yes) properties: device.icon_name = "video-display" device.product.name = "LG HDR 4K " hdmi-output-1: HDMI / DisplayPort 2 (priority 5800, latency offset 0 usec, available: yes) properties: device.icon_name = "video-display" device.product.name = "27GL650F " hdmi-output-2: HDMI / DisplayPort 3 (priority 5700, latency offset 0 usec, available: yes) properties: device.icon_name = "video-display" device.product.name = "27GL650F " hdmi-output-3: HDMI / DisplayPort 4 (priority 5600, latency offset 0 usec, available: no) properties: device.icon_name = "video-display" index: 1 name: driver: owner module: 8 properties: alsa.card = "1" alsa.card_name = "SteelSeries Arctis 9" alsa.long_card_name = "SteelSeries SteelSeries Arctis 9 at usb-0000:00:14.0-3.1, full speed" alsa.driver_name = "snd_usb_audio" device.bus_path = "pci-0000:00:14.0-usb-0:3.1:1.0" sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.1/1-3.1:1.0/sound/card1" udev.id = "usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00" device.bus = "usb" device.vendor.id = "1038" device.vendor.name = "SteelSeries ApS" device.product.id = "12c4" device.product.name = "SteelSeries Arctis 9" device.serial = "SteelSeries_SteelSeries_Arctis_9_000000000000" device.string = "1" device.description = "SteelSeries Arctis 9" module-udev-detect.discovered = "1" device.icon_name = "audio-card-usb" profiles: output:stereo-game+output:stereo-chat+input:mono-chat: Spiel-Ausgabe + Chat-Ausgabe + Chat-Eingabe (priority 5100, available: unknown) input:mono-chat: Chat-Eingabe (priority 1, available: unknown) output:stereo-chat: Chat-Ausgabe (priority 5000, available: unknown) output:stereo-chat+input:mono-chat: Chat-Ausgabe + Chat-Eingabe (priority 5000, available: unknown) output:stereo-game: Spiel-Ausgabe (priority 5000, available: unknown) output:stereo-game+input:mono-chat: Spiel-Ausgabe + Chat-Eingabe (priority 5000, available: unknown) off: Aus (priority 0, available: unknown) active profile: sinks: alsa_output.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00.stereo-game/#1: SteelSeries Arctis 9 Spiel alsa_output.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00.stereo-chat/#2: SteelSeries Arctis 9 Chat sources: alsa_output.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00.stereo-game.monitor/#1: Monitor of SteelSeries Arctis 9 Spiel alsa_output.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00.stereo-chat.monitor/#2: Monitor of SteelSeries Arctis 9 Chat alsa_input.usb-SteelSeries_SteelSeries_Arctis_9_000000000000-00.mono-chat/#3: SteelSeries Arctis 9 Chat ports: usb-gaming-headset-output-stereo: Headphones (priority 0, latency offset 0 usec, available: unknown) properties: usb-gaming-headset-input: Headset Microphone (priority 0, latency offset 0 usec, available: unknown) properties: index: 2 name: driver: owner module: 9 properties: alsa.card = "3" alsa.card_name = "USB Device 0x46d:0x81b" alsa.long_card_name = "USB Device 0x46d:0x81b at usb-0000:00:14.0-6, high speed" alsa.driver_name = "snd_usb_audio" device.bus_path = "pci-0000:00:14.0-usb-0:6:1.2" sysfs.path = "/devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.2/sound/card3" udev.id = "usb-046d_081b_61151E20-02" device.bus = "usb" device.vendor.id = "046d" device.vendor.name = "Logitech, Inc." device.product.id = "081b" device.product.name = "Webcam C310" device.serial = "046d_081b_61151E20" device.form_factor = "webcam" device.string = "3" device.description = "Webcam C310" module-udev-detect.discovered = "1" device.icon_name = "camera-web-usb" profiles: input:mono-fallback: Mono-Eingabe (priority 1, available: unknown) off: Aus (priority 0, available: unknown) active profile: sources: alsa_input.usb-046d_081b_61151E20-02.mono-fallback/#4: Webcam C310 Mono ports: analog-input-mic: Microphone (priority 8700, latency offset 0 usec, available: unknown) properties: device.icon_name = "audio-input-microphone" index: 3 name: driver: owner module: 10 properties: alsa.card = "0" alsa.card_name = "HDA Intel PCH" alsa.long_card_name = "HDA Intel PCH at 0x2ffff20000 irq 139" 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 = "a2f0" device.product.name = "200 Series PCH HD Audio" device.form_factor = "internal" device.string = "0" device.description = "Eingebautes Tongerät" module-udev-detect.discovered = "1" device.icon_name = "audio-card-pci" profiles: input:analog-stereo: Analog Stereo-Eingabe (priority 32833, available: unknown) output:analog-stereo: Analog Stereo-Ausgabe (priority 6500, available: no) output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6565, available: unknown) output:analog-surround-21: Analog Surround 2.1-Ausgabe (priority 1300, available: no) output:analog-surround-21+input:analog-stereo: Analog Surround 2.1-Ausgabe + Analog Stereo-Eingabe (priority 1365, available: unknown) output:analog-surround-40: Analog Surround 4.0-Ausgabe (priority 1200, available: no) output:analog-surround-40+input:analog-stereo: Analog Surround 4.0-Ausgabe + Analog Stereo-Eingabe (priority 1265, available: unknown) output:analog-surround-41: Analog Surround 4.1-Ausgabe (priority 1300, available: no) output:analog-surround-41+input:analog-stereo: Analog Surround 4.1-Ausgabe + Analog Stereo-Eingabe (priority 1365, available: unknown) output:analog-surround-50: Analog Surround 5.0-Ausgabe (priority 1200, available: no) output:analog-surround-50+input:analog-stereo: Analog Surround 5.0-Ausgabe + Analog Stereo-Eingabe (priority 1265, available: unknown) output:analog-surround-51: Analog Surround 5.1-Ausgabe (priority 1300, available: no) output:analog-surround-51+input:analog-stereo: Analog Surround 5.1-Ausgabe + Analog Stereo-Eingabe (priority 1365, available: unknown) output:analog-surround-71: Analog Surround 7.1-Ausgabe (priority 1200, available: no) output:analog-surround-71+input:analog-stereo: Analog Surround 7.1-Ausgabe + Analog Stereo-Eingabe (priority 1265, available: unknown) output:iec958-stereo: Digital Stereo (IEC958)-Ausgabe (priority 38268, available: unknown) output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958)-Ausgabe + Analog Stereo-Eingabe (priority 38333, available: unknown) off: Aus (priority 0, available: unknown) active profile: sinks: alsa_output.pci-0000_00_1f.3.iec958-stereo/#3: Eingebautes Tongerät Digital Stereo (IEC958) sources: alsa_output.pci-0000_00_1f.3.iec958-stereo.monitor/#5: Monitor of Eingebautes Tongerät Digital Stereo (IEC958) alsa_input.pci-0000_00_1f.3.analog-stereo/#6: Eingebautes Tongerät Analog Stereo 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: analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: no) properties: analog-output-headphones: Headphones (priority 9900, latency offset 0 usec, available: no) properties: device.icon_name = "audio-headphones" iec958-stereo-output: Digital Output (S/PDIF) (priority 0, latency offset 0 usec, available: unknown) properties: alsamixer overview
wehnsdaefflae (113 rep)
Oct 22, 2023, 04:48 AM • Last activity: Oct 22, 2023, 10:54 AM
0 votes
1 answers
4142 views
Alsa doesn't recognize soundcards but kernel does
I've an issue with alsa which seems not to recognize my soundcards. Before I didn't have that issue... ``` !!################################ !!ALSA Information Script v 0.4.64 !!################################ !!Script ran on: Mon Jan 6 18:28:00 UTC 2020 !!Linux Distribution !!------------------ I...
I've an issue with alsa which seems not to recognize my soundcards. Before I didn't have that issue...
!!################################
    !!ALSA Information Script v 0.4.64
    !!################################
    
    !!Script ran on: Mon Jan  6 18:28:00 UTC 2020
    
    
    !!Linux Distribution
    !!------------------
    
    ID_LIKE=arch
    
    
    !!DMI Information
    !!---------------
    
    Manufacturer:      Gigabyte Technology Co., Ltd.
    Product Name:      B450M DS3H
    Product Version:   Default string
    Firmware Version:  F41
    Board Vendor:      Gigabyte Technology Co., Ltd.
    Board Name:        B450M DS3H-CF
    
    
    !!ACPI Device Status Information
    !!---------------
    
    /sys/bus/acpi/devices/AMDI0030:00/status 	 15
    /sys/bus/acpi/devices/AMDIF030:00/status 	 15
    /sys/bus/acpi/devices/LNXTHERM:00/status 	 11
    /sys/bus/acpi/devices/PNP0103:00/status 	 15
    /sys/bus/acpi/devices/PNP0501:00/status 	 15
    /sys/bus/acpi/devices/PNP0A08:00/status 	 15
    /sys/bus/acpi/devices/PNP0C01:00/status 	 15
    /sys/bus/acpi/devices/PNP0C02:01/status 	 15
    /sys/bus/acpi/devices/PNP0C02:03/status 	 15
    /sys/bus/acpi/devices/PNP0C0C:00/status 	 11
    /sys/bus/acpi/devices/PNP0C0F:00/status 	 11
    /sys/bus/acpi/devices/PNP0C0F:01/status 	 11
    /sys/bus/acpi/devices/PNP0C0F:02/status 	 11
    /sys/bus/acpi/devices/PNP0C0F:03/status 	 11
    /sys/bus/acpi/devices/PNP0C0F:04/status 	 11
    /sys/bus/acpi/devices/PNP0C0F:05/status 	 11
    /sys/bus/acpi/devices/PNP0C0F:06/status 	 11
    /sys/bus/acpi/devices/PNP0C0F:07/status 	 11
    /sys/bus/acpi/devices/PNP0C14:01/status 	 11
    
    
    !!Kernel Information
    !!------------------
    
    Kernel release:    5.4.6-2-MANJARO
    Operating System:  GNU/Linux
    Architecture:      x86_64
    Processor:         unknown
    SMP Enabled:       Yes
    
    
    !!ALSA Version
    !!------------
    
    Driver version:     k5.4.6-2-MANJARO
    Library version:    1.2.1.2
    Utilities version:  1.2.1
    
    
    !!Loaded ALSA modules
    !!-------------------
    
    
    
    !!Sound Servers on this system
    !!----------------------------
    
    Pulseaudio:
          Installed - Yes (/usr/bin/pulseaudio)
          Running - Yes
    
    Jack:
          Installed - Yes (/usr/bin/jackd)
          Running - No
    
    
    !!Soundcards recognised by ALSA
    !!-----------------------------
    
    --- no soundcards ---
    
    
    !!PCI Soundcards installed in the system
    !!--------------------------------------
    
    07:00.1 Audio device: NVIDIA Corporation GP107GL High Definition Audio Controller (rev a1)
    09:00.3 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) HD Audio Controller
    
    
    !!Advanced information - PCI Vendor/Device/Subsystem ID's
    !!-------------------------------------------------------
    
    07:00.1 0403: 10de:0fb9 (rev a1)
    	Subsystem: 10de:11c0
    --
    09:00.3 0403: 1022:1457
    	Subsystem: 1458:a182
    
    
    !!Loaded sound module options
    !!---------------------------
    
    
    !!ALSA Device nodes
    !!-----------------
    
    crw-rw----+ 1 root audio 116,  1 Jan  6 18:50 /dev/snd/seq
    crw-rw----+ 1 root audio 116, 33 Jan  6 18:50 /dev/snd/timer
    
    
    !!Aplay/Arecord output
    !!--------------------
    
    APLAY
    
    aplay: device_list:272: no soundcards found...
    
    ARECORD
    
    arecord: device_list:272: no soundcards found...
    
    !!Amixer output
    !!-------------
    
    
    !!Alsactl output
    !!--------------
    
    --startcollapse--
    --endcollapse--
    
    
    !!All Loaded Modules
    !!------------------
    
    Module
    ccm
    fuse
    squashfs
    loop
    rtl8192ee
    btcoexist
    rtl_pci
    rtlwifi
    edac_mce_amd
    mac80211
    kvm_amd
    snd_intel_nhlt
    kvm
    snd_hda_codec
    irqbypass
    cfg80211
    r8169
    snd_hda_core
    crct10dif_pclmul
    crc32_pclmul
    snd_hwdep
    ghash_clmulni_intel
    realtek
    uinput
    mousedev
    rfkill
    snd_pcm
    joydev
    input_leds
    aesni_intel
    nvidia_drm
    wmi_bmof
    snd_timer
    nvidia_modeset
    snd
    crypto_simd
    ccp
    cryptd
    sp5100_tco
    glue_helper
    pcspkr
    soundcore
    i2c_piix4
    k10temp
    libarc4
    libphy
    rng_core
    drm_kms_helper
    wmi
    drm
    pinctrl_amd
    gpio_amdpt
    evdev
    mac_hid
    acpi_cpufreq
    agpgart
    syscopyarea
    sysfillrect
    sysimgblt
    fb_sys_fops
    nvidia
    ipmi_devintf
    ipmi_msghandler
    crypto_user
    ip_tables
    x_tables
    ext4
    crc32c_generic
    crc16
    mbcache
    jbd2
    hid_logitech_hidpp
    hid_logitech_dj
    hid_generic
    usbhid
    hid
    sd_mod
    ahci
    libahci
    libata
    crc32c_intel
    xhci_pci
    scsi_mod
    xhci_hcd
    
    
    !!ALSA/HDA dmesg
    !!--------------
➜  ~ alsactl init  
    alsactl: sysfs_init:48: sysfs path '/sys' is invalid
    
    alsactl: init:1759: No soundcards found...
    ➜  ~ alsamixer 
    le mixeur ne peut pas être ouvert: Aucun fichier ou dossier de ce type
[redgl0w redgl0w]# rmmod snd-hda-intel; modprobe snd-hda-intel; dmesg | tail
rmmod: ERROR: Module snd_hda_intel is not currently loaded
modprobe: ERROR: Error running install command for snd_hda_intel
modprobe: ERROR: could not insert 'snd_hda_intel': Operation not permitted
[   57.223367] audit: type=1100 audit(1578342370.883:68): pid=2098 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:authentication grantors=pam_unix,pam_permit acct="redgl0w" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[   57.223711] audit: type=1101 audit(1578342370.886:69): pid=2098 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="redgl0w" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[   57.224131] audit: type=1110 audit(1578342370.886:70): pid=2098 uid=0 auid=1000 ses=2 subj==unconfined msg='op=PAM:setcred grantors=pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[   57.229977] audit: type=1105 audit(1578342370.890:71): pid=2098 uid=0 auid=1000 ses=2 subj==unconfined msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[   57.232712] audit: type=1106 audit(1578342370.893:72): pid=2098 uid=0 auid=1000 ses=2 subj==unconfined msg='op=PAM:session_close grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[   57.232852] audit: type=1104 audit(1578342370.893:73): pid=2098 uid=0 auid=1000 ses=2 subj==unconfined msg='op=PAM:setcred grantors=pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[   61.145820] audit: type=1101 audit(1578342374.806:74): pid=2107 uid=1000 auid=1000 ses=2 subj==unconfined msg='op=PAM:accounting grantors=pam_unix,pam_permit,pam_time acct="redgl0w" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[   61.146060] audit: type=1110 audit(1578342374.806:75): pid=2107 uid=0 auid=1000 ses=2 subj==unconfined msg='op=PAM:setcred grantors=pam_unix,pam_permit,pam_env acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[   61.151701] audit: type=1105 audit(1578342374.813:76): pid=2107 uid=0 auid=1000 ses=2 subj==unconfined msg='op=PAM:session_open grantors=pam_limits,pam_unix,pam_permit acct="root" exe="/usr/bin/sudo" hostname=? addr=? terminal=/dev/pts/0 res=success'
[   61.160687] audit: type=1100 audit(1578342374.823:77): pid=2108 uid=0 auid=1000 ses=2 subj==unconfined msg='op=PAM:authentication grantors=pam_rootok acct="root" exe="/usr/bin/su" hostname=redgl0w addr=? terminal=pts/0 res=success'
[redgl0w redgl0w]#
Thank you !
RedGl0w (11 rep)
Jan 6, 2020, 06:44 PM • Last activity: Jul 20, 2023, 03:03 AM
Showing page 1 of 20 total questions