I have this following asound.conf file, but when i play $ speaker-test it fails. How can you tell asound.conf that each and every time on restart of pc also use this sound card only? card 2: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]  Subdevices: 1/1??$ aplay -l**** List of PLAYBACK Hardware Devices ****ALSA lib conf.c:1220:(parse_def) default is not a compoundALSA lib conf.c:1686:(snd_config_load1) _toplevel_:2:13:Invalid argumentALSA lib conf.c:3406:(config_file_open) /etc/asound.conf may be old or corrupted: consider to remove or fix itcard 1: Device [C-Media USB Audio Device], device 0: USB Audio [USB Audio]  Subdevices: 1/1  Subdevice #0: subdevice #0card 2: PCH [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]  Subdevices: 1/1  Subdevice #0: subdevice #0card 2: PCH [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]  Subdevices: 1/1  Subdevice #0: subdevice #0card 2: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]  Subdevices: 1/1  Subdevice #0: subdevice #0card 2: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]  Subdevices: 1/1  Subdevice #0: subdevice #0$ cat /etc/asound.conf    pcm.default {        type hw # Kernel PCM        card 2        device 0 # Device number (default 0)        #[subdevice] INT # Subdevice number, -1 first available (default -1)        #mmap_emulation BOOL # enable mmap emulation for ro/wo devices    }    pcm.!default {        type hw # Kernel PCM        card 2        device 0 # Device number (default 0)        #[subdevice] INT # Subdevice number, -1 first available (default -1)        #mmap_emulation BOOL # enable mmap emulation for ro/wo devices    }I tried this it works but how to avoid using the hw:2,0 but use some static string so that on reboot it does not get lost?pcm.!default {         type asym         playback.pcm {                 type plug                 slave.pcm hw:0,1         } }
asound.conf file is corrupted does not allow the play with the correct sound card as a result it keeps failing
ubuntu;fedora;audio;alsa;pulseaudio
To just change the default cards, replace that asound.conf with this:defaults.pcm.card 2defaults.pcm.device 0To be independent from changing card numbers, use the card ID instead:defaults.pcm.card PCHdefaults.pcm.device 0