Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #190113 > unrolled thread

aplay fails on amd64 laptop

Started byPierre Frenkiel <pierre.frenkiel@gmail.com>
First post2017-12-21 20:10 +0100
Last post2017-12-24 22:20 +0100
Articles 4 — 3 participants

Back to article view | Back to linux.debian.user


Contents

  aplay fails on amd64 laptop Pierre Frenkiel <pierre.frenkiel@gmail.com> - 2017-12-21 20:10 +0100
    Re: aplay fails on amd64 laptop deloptes <deloptes@gmail.com> - 2017-12-21 23:00 +0100
    Re: aplay fails on amd64 laptop Georgi Naplatanov <gosho@oles.biz> - 2017-12-24 20:10 +0100
      Re: aplay fails on amd64 laptop Pierre Frenkiel <pierre.frenkiel@gmail.com> - 2017-12-24 22:20 +0100

#190113 — aplay fails on amd64 laptop

FromPierre Frenkiel <pierre.frenkiel@gmail.com>
Date2017-12-21 20:10 +0100
Subjectaplay fails on amd64 laptop
Message-ID<uZeob-6YN-27@gated-at.bofh.it>
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?

best regards,
-- 
Pierre Frenkiel

[toc] | [next] | [standalone]


#190118

Fromdeloptes <deloptes@gmail.com>
Date2017-12-21 23:00 +0100
Message-ID<uZh2F-6s-7@gated-at.bofh.it>
In reply to#190113
Pierre Frenkiel wrote:

> card 1: Generic [HD-Audio Generic], device 0: ALC233 Analog [ALC233
> Analog] Subdevices: 1/1
> Subdevice #0: subdevice #0

you need to use hw:1.0
as you target your second card, or configure snd module to initialize the
analog as first card

regards

[toc] | [prev] | [next] | [standalone]


#190249

FromGeorgi Naplatanov <gosho@oles.biz>
Date2017-12-24 20:10 +0100
Message-ID<v0jON-1bh-9@gated-at.bofh.it>
In reply to#190113
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

[toc] | [prev] | [next] | [standalone]


#190251

FromPierre Frenkiel <pierre.frenkiel@gmail.com>
Date2017-12-24 22:20 +0100
Message-ID<v0lQB-2qc-1@gated-at.bofh.it>
In reply to#190249
On Sun, 24 Dec 2017, Georgi Naplatanov wrote:

> if you are using PulseAudio just remove any exiting content of
> ~/.asoundrc and put this:

   hi Georgi,
   thank you for your suggestion, but I can't launch pulseaudio:

    Failed to load module "module-alsa-sink"

    and as I have a working config with plughw, I don't want to spend
    too much time with pulsequdio

best regards,
-- 
Pierre Frenkiel

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web