On 12/21/2017 09:04 PM, Pierre Frenkiel wrote: > hi, > the sound works perfectly with vlc or audacity, but I can't make aplay > to work. > the "aplay -l" output is: > **** List of PLAYBACK Hardware Devices **** > card 0: HDMI [HDA ATI HDMI], device 3: Generic Digital [Generic Digital] > Subdevices: 1/1 > Subdevice #0: subdevice #0 > card 1: Generic [HD-Audio Generic], device 0: ALC233 Analog [ALC233 > Analog] > Subdevices: 1/1 > Subdevice #0: subdevice #0 > > and both audacity and vlc actually use the HD-Audio output. > > After configuring ~/.aoundrc like this: > > pcm.!default { > type hw > card 1 > } > > ctl.!default { > type hw > card 1 > } > > running "aplay file.wav" gives: > aplay: set_params:1081: Sample format non available > Available formats: > - S16_LE > - S32_LE > > I get the same thing with all .wav files I try. > > This problem is specific to my amd64 laptop, as I don't have it on my > desktop, > running the same OS version (Stretch), and with the same files. > > Looking at Google didn't gave me any useful information. > Has anybody an idea? >
Hi Pierre, if you are using PulseAudio just remove any exiting content of ~/.asoundrc and put this: pcm.pulse { type pulse } ctl.pulse { type pulse } pcm.!default { type pulse } ctl.!default { type pulse } This redirects ALSA to PulseAudio - see https://wiki.archlinux.org/index.php/PulseAudio/Examples then just run: $ aplay test.wav OR $ aplay --device=pcm:pulse test.wav and you should hear the wave file. BUT if you are not using PulseAudio then aplay parameters should look like this: $ aplay --device=hw:X,Y test.wav Where X is your sound device number and Y is sub-device number. For example output of $ aplay -l is this on my computer: **** List of PLAYBACK Hardware Devices **** card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: PCH [HDA Intel PCH], device 1: ALC887-VD Digital [ALC887-VD Digital] Subdevices: 1/1 Subdevice #0: subdevice #0 card 2: Headset [Logitech USB Headset], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 and $ aplay --device=hw:2,0 test.wav works just fine. hw:2,0 is my USB headset on my computer. Kind regards Georgi