RPi-Distro / raspi-config

Configuration tool for the Raspberry Pi
Other
565 stars 206 forks source link

Browsing Audio options without setting an option corrupts .asoundrc #223

Open moodeaudio opened 11 months ago

moodeaudio commented 11 months ago

Hi,

Ater opening raspy-config, looking at the Audio options then exiting out, the file /home/pi/.asoundrc file is missing the card number.

Latest Bookworm 64bit Lite

  1. sudo raspi-config
  2. Navigate to Audio
  3. Right-arrow then click Cancel
  4. Right-arrow then click Finish
pi@dev64-bk:~ $ cat ./.asoundrc
pcm.!default {
  type asym
  playback.pcm {
    type plug
    slave.pcm "output"
  }
  capture.pcm {
    type plug
    slave.pcm "input"
  }
}

pcm.output {
  type hw
  card 
}

ctl.!default {
  type hw
  card 
}

This results in aplay -l generating errors.

pi@dev64-bk:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
ALSA lib conf.c:2007:(_snd_config_load_with_include) _toplevel_:18:1:Unexpected char
ALSA lib conf.c:4096:(config_file_open) /home/pi/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:4018:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:4625:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:283: control open (0): Invalid argument
ALSA lib conf.c:2007:(_snd_config_load_with_include) _toplevel_:18:1:Unexpected char
ALSA lib conf.c:4096:(config_file_open) /home/pi/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:4018:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:4625:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:283: control open (1): Invalid argument
ALSA lib conf.c:2007:(_snd_config_load_with_include) _toplevel_:18:1:Unexpected char
ALSA lib conf.c:4096:(config_file_open) /home/pi/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:4018:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:4625:(snd_config_update_r) hooks failed, removing configuration
aplay: device_list:283: control open (2): Invalid argument

-Tim