# Asound.conf does nothing

**URL:** https://dietpi.com/forum/t/asound-conf-does-nothing/21808
**Category:** Troubleshooting
**Created:** [27 October 2024 15:45 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808 "2024-10-27T15:45:43Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![wkloppen](https://dietpi.com/forum/user_avatar/dietpi.com/wkloppen/32/7024_2.png) [@wkloppen](https://dietpi.com/forum/u/wkloppen)
#### Post date: [27 October 2024 15:45 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/1 "2024-10-27T15:45:43Z")

</div>

#### Required Information

DietPi version  
G\_DIETPI\_VERSION\_CORE=9  
G\_DIETPI\_VERSION\_SUB=8  
G\_DIETPI\_VERSION\_RC=0  
G\_GITBRANCH=‘master’  
G\_GITOWNER=‘MichaIng’

Distro version  
bookworm 0

Kernel version  
Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

Architecture  
arm64

SBC model  
RPi 4 Model B (aarch64)

Power supply used  
IFI power supply 5volt 3 ampere

SD card used  
SanDisk ultra 32 gb

I appears my asound.conf is not loading. Any changes I make in it don’t do anything. Possibly a user error my side. Not sure.  
Current asound config located in /etc/asound.conf

```auto
pcm.!default {
        type hw
        card 0
        device 0
}

ctl.!default {
        type hw
        card 0
}

```

aplay -l gives this

```auto
****List of PLAYBACK Hardware Devices****
card 0: AUDIO [SMSL USB AUDIO], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

```

I can change asound to anything and or rubbish but it doesn’t have any effect. The music still plays though which suggest to my alsa loads a generic config somewhere. Don’t know how this works.

journalctl -xe | grep alsa gives this

```auto
Oct 27 16:25:11 DietPi systemd[1]: alsa-state.service - Manage Sound Card State (restore and store) was skipped because of an unmet condition check (ConditionPathExists=/etc/alsa/state-daemon.conf).
░░ Subject: A start job for unit alsa-state.service has finished successfully
░░ A start job for unit alsa-state.service has finished successfully.
Oct 27 16:25:11 DietPi systemd[1]: Starting alsa-restore.service - Save/Restore Sound Card State...
░░ Subject: A start job for unit alsa-restore.service has begun execution
░░ A start job for unit alsa-restore.service has begun execution.
Oct 27 16:25:11 DietPi alsactl[356]: alsa-lib parser.c:2783:(load_toplevel_config) Unable to find the top-level configuration file '/usr/share/alsa/ucm2/ucm.conf'.
Oct 27 16:25:11 DietPi alsactl[356]: alsa-lib main.c:1541:(snd_use_case_mgr_open) error: failed to import hw:0 use case configuration -2
Oct 27 16:25:11 DietPi systemd[1]: Finished alsa-restore.service - Save/Restore Sound Card State.
░░ Subject: A start job for unit alsa-restore.service has finished successfully
░░ A start job for unit alsa-restore.service has finished successfully.

```

thx for any help/tips…

willem

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [27 October 2024 16:37 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/2 "2024-10-27T16:37:48Z")

</div>

Probably something @MichaIng could help with

---

<div class="post-metadata">

### Author: ![wkloppen](https://dietpi.com/forum/user_avatar/dietpi.com/wkloppen/32/7024_2.png) [@wkloppen](https://dietpi.com/forum/u/wkloppen)
#### Post date: [27 October 2024 21:59 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/3 "2024-10-27T21:59:17Z")

</div>

I ran some tests and defenitely something has changed suddenly today. Yesterday my dac displayed the samplerate of the the actual song playing sometimes 96khz / 24 or even 192khz and now it re-samples everything to 44khz / 16 bit. Don’t know what has happened to the config I’m afraid.

regards

willem

---

<div class="post-metadata">

### Author: ![wkloppen](https://dietpi.com/forum/user_avatar/dietpi.com/wkloppen/32/7024_2.png) [@wkloppen](https://dietpi.com/forum/u/wkloppen)
#### Post date: [27 October 2024 22:21 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/4 "2024-10-27T22:21:14Z")

</div>

Found out one more thing. When I go to the dietpi-config and I select dac (hw:0,0) and hit submit It actually removes my /etc/asound.conf first and then creates a standard asound.conf

```auto
[SUB1] DietPi-Set_hardware > soundcard (hw:0,0)
[INFO] DietPi-Set_hardware | Checking for required APT packages: alsa-utils
[INFO] DietPi-Set_hardware | Resetting all sound card settings...
[OK] DietPi-Set_hardware | rm /etc/asound.conf
[OK] DietPi-Set_hardware | rm /var/lib/alsa/asound.state
Found hardware: "USB-Audio" "USB Mixer" "USB152a:85dd" "" ""
Hardware is initialized using a generic method
[OK] DietPi-Set_hardware | sed --follow-symlinks -Ei -e /^[[:blank:]]*(dtoverlay=(allo-|applepi-dac|dionaudio-|googlevoicehat-soundcard|hifiberry-|i-sabre-q2m|iqaudio-|justboom-|rpi-dac)|dtparam=i2s)/d -e s/^[[:blank:]]*(hdmi_drive(:[01])?=.*$)/#\1/ /boot/config.txt
[OK] DietPi-Set_hardware | Desired setting in /boot/config.txt was already set: dtparam=audio=off
[OK] DietPi-Set_hardware | eval echo 'blacklist snd_bcm2835' > /etc/modprobe.d/dietpi-disable_rpi_audio.conf
[OK] DietPi-Set_hardware | sed --follow-symlinks -Ei /root=/s/[[:blank:]]*snd_bcm2835.enable_[^[:blank:]]*([[:blank:]]*$)?//g /boot/cmdline.txt
[INFO] DietPi-Set_hardware | Applying new sound card settings...
[OK] DietPi-Set_hardware | Desired setting in /boot/dietpi.txt was already set: CONFIG_SOUNDCARD=hw:0,0
[OK] DietPi-Set_hardware | alsactl -g store
[OK] soundcard hw:0,0 | Completed

```

---

<div class="post-metadata">

### Author: ![Arrafar](https://dietpi.com/forum/user_avatar/dietpi.com/arrafar/32/6976_2.png) [@Arrafar](https://dietpi.com/forum/u/Arrafar)
#### Post date: [28 October 2024 07:09 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/5 "2024-10-28T07:09:06Z")

</div>

Oct 27 16:25:11 DietPi alsactl[356]: alsa-lib parser.c:2783:(load\_toplevel\_config) Unable to find the top-level configuration file ‘/usr/share/alsa/ucm2/ucm.conf’.

Joining the quiz;

Just a guess, I’m trying to understand. I think this is the cause, but wait for the pro. 😉

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [28 October 2024 08:18 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/6 "2024-10-28T08:18:43Z")

</div>

> [@wkloppen](#):
>
> It actually removes my /etc/asound.conf first and then creates a standard asound.conf

yes this is how the script is designed actually.

---

<div class="post-metadata">

### Author: ![wkloppen](https://dietpi.com/forum/user_avatar/dietpi.com/wkloppen/32/7024_2.png) [@wkloppen](https://dietpi.com/forum/u/wkloppen)
#### Post date: [28 October 2024 08:22 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/7 "2024-10-28T08:22:10Z")

</div>

🙂

> [@wkloppen](#):
>
> Yesterday my dac displayed the samplerate of the the actual song playing sometimes 96khz / 24 or even 192khz and now it re-samples everything to 44khz / 16 bit.

Yes,…I’m seeing that and I start to understand it a bit but it doesn’t explain why it suddenly starts resampling which it did NOT do before…🙂

---

<div class="post-metadata">

### Author: ![wkloppen](https://dietpi.com/forum/user_avatar/dietpi.com/wkloppen/32/7024_2.png) [@wkloppen](https://dietpi.com/forum/u/wkloppen)
#### Post date: [28 October 2024 08:47 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/8 "2024-10-28T08:47:53Z")

</div>

In addition: It might have something to do with /etc/asound.conf in relation to ~/.asoundrc which is the user specific config. But then again, I’ve never used ~/.asoundrc before and my /etc/asound.conf appeared to be loaded. or at least it didn’t re-sample my qobuz audio stream. I know that for a 100% sure as the dac itself indicates the sample frequency of the audio being played.

---

<div class="post-metadata">

### Author: ![wkloppen](https://dietpi.com/forum/user_avatar/dietpi.com/wkloppen/32/7024_2.png) [@wkloppen](https://dietpi.com/forum/u/wkloppen)
#### Post date: [28 October 2024 11:02 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/9 "2024-10-28T11:02:39Z")

</div>

Uninstalled alsa-utils using dietpi-config  
Installed alsa-utils using dietpi-config  
selected hw:0,0 in dietpi-config (soundcard)  
/etc/asound.conf was created with the defaulkt config

```auto
pcm.!default {
        type hw
        card 0
        device 0
}

ctl.!default {
        type hw
        card 0
}

```

nano ~/.asoundrc with the same config  
editted both /etc/asound.conf and ~/.asoundrc card =1 (instead of 0)  
sudo reboot  
ALSA\_DEBUG=1 aplay -l gives me

```auto
root@DietPi:~# ALSA_DEBUG=1 aplay -l
****List of PLAYBACK Hardware Devices****
card 0: AUDIO [SMSL USB AUDIO], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

```

---

<div class="post-metadata">

### Author: ![wkloppen](https://dietpi.com/forum/user_avatar/dietpi.com/wkloppen/32/7024_2.png) [@wkloppen](https://dietpi.com/forum/u/wkloppen)
#### Post date: [28 October 2024 11:22 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/10 "2024-10-28T11:22:02Z")

</div>

one thing I just did. Uninstalled alsa-utils using dietpi-config and the music / playback still works.

---

<div class="post-metadata">

### Author: ![wkloppen](https://dietpi.com/forum/user_avatar/dietpi.com/wkloppen/32/7024_2.png) [@wkloppen](https://dietpi.com/forum/u/wkloppen)
#### Post date: [28 October 2024 15:25 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/11 "2024-10-28T15:25:02Z")

</div>

Gents,…I’ve resolved the matter of the “re-sampeling” at least. In the upmpdcli.conf file I forgot to specify the quality parameter after I re-installed upmpdcli… 😠…my bad. So that part is resolved. Still have the question about modifying /etc/asound.conf. What happens exactly in alsa if put in rubbish or remove the file completely? In other words. How can you check whether or not alsa takes your config into account or not.

thx in advance

reg

willem

---

<div class="post-metadata">

### Author: ![wkloppen](https://dietpi.com/forum/user_avatar/dietpi.com/wkloppen/32/7024_2.png) [@wkloppen](https://dietpi.com/forum/u/wkloppen)
#### Post date: [28 October 2024 15:49 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/12 "2024-10-28T15:49:45Z")

</div>

Did some regression testing by out commented /etc/asound.conf completely. Nothing changes, sound exactly the same so I reckon it works like this. When alsa doesn’t find a module or config for my dac it automatically loads / uses the default kernel module and you can’t influence it in any which way. Not sure though but that’s how I think it works…

reg

w

---

<div class="post-metadata">

### Author: ![system](https://dietpi.com/forum/uploads/default/original/1X/7e1021de2213860bce185915ce2c1786e56490ec.png) [@system](https://dietpi.com/forum/u/system)
#### Post date: [25 April 2025 03:49 UTC](https://dietpi.com/forum/t/asound-conf-does-nothing/21808/13 "2025-04-25T03:49:53Z")

</div>

This topic was automatically closed 178 days after the last reply. New replies are no longer allowed.
