Page 1 of 1

No sound when play music from aplay utility

Posted: Tue Dec 18, 2018 6:54 am
by koval
Hello, I have some strange problem.

Here is list of my sound card:

Code: Select all

aplay -L
default
    Playback/recording through the PulseAudio sound server
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
sysdefault:CARD=PCH
    HDA Intel PCH, CX20590 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    Front speakers
surround21:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
hdmi:CARD=PCH,DEV=0
    HDA Intel PCH, HDMI 0
    HDMI Audio Output
hdmi:CARD=PCH,DEV=1
    HDA Intel PCH, HDMI 1
    HDMI Audio Output
hdmi:CARD=PCH,DEV=2
    HDA Intel PCH, HDMI 2
    HDMI Audio Output
dmix:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    Direct sample mixing device
dmix:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct sample mixing device
dmix:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Direct sample mixing device
dmix:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Direct sample mixing device
dsnoop:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Direct sample snooping device
dsnoop:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Direct sample snooping device
hw:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Direct hardware device without any conversions
hw:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Direct hardware device without any conversions
plughw:CARD=PCH,DEV=0
    HDA Intel PCH, CX20590 Analog
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=3
    HDA Intel PCH, HDMI 0
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=7
    HDA Intel PCH, HDMI 1
    Hardware device with all software conversions
plughw:CARD=PCH,DEV=8
    HDA Intel PCH, HDMI 2
    Hardware device with all software conversions
When I start this command

Code: Select all

aplay   ./piano2.wav
it shows that music is playing

Code: Select all

aplay   ./piano2.wav 
Playing WAVE './piano2.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
But there is no sound on my speakers.

Here is alsamixer
https://prnt.sc/lwg2z6

When I play music on my youtube via browser it works fine.
The question is how to play music from aplay ?

Re: No sound when play music from aplay utility

Posted: Tue Dec 18, 2018 10:48 am
by richyrich
I see Auto-Mute as enabled in the Alsa Mixer picture . . ?

Re: No sound when play music from aplay utility

Posted: Tue Dec 18, 2018 5:27 pm
by MrEen
That is a weird problem. I don't think the Auto-Mute would affect that.

I'd guess the first thing to check is that it's not an empty file. While in the directory run ls -la piano2.wav in the terminal. If the number in front of the month is zero, there's your issue.

Any chance you didn't realize headphones were plugged in when you tried playing the file?

If those don't help solve it, see if there's anything weird showing with aplay -v ./piano2.wav. Here's my output for a wav that worked:

Code: Select all

scott@scott-HP /usr/share/sounds/alsa $ aplay -v ./Front_Center.wav
Playing WAVE './Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 1
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 24000
  period_size  : 6000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 6000
  period_event : 0
  start_threshold  : 24000
  stop_threshold   : 24000
  silence_threshold: 0
  silence_size : 0
  boundary     : 6755399441055744000
scott@scott-HP /usr/share/sounds/alsa $
Mine was a mono file, so yours should show channels : 2 (or more.)
Good luck.

Re: No sound when play music from aplay utility

Posted: Wed Dec 19, 2018 7:08 am
by koval
richyrich wrote:
Tue Dec 18, 2018 10:48 am
I see Auto-Mute as enabled in the Alsa Mixer picture . . ?
I've disabled auto mute. But it dosn't help.

http://prntscr.com/lwxeqn

Re: No sound when play music from aplay utility

Posted: Wed Dec 19, 2018 7:12 am
by koval
I'd guess the first thing to check is that it's not an empty file. While in the directory run ls -la piano2.wav in the terminal. If the number in front of the month is zero, there's your issue.
piano2.wav is normal audio file. I could play it from GUI player.
Any chance you didn't realize headphones were plugged in when you tried playing the file?

No, I've checked with headphone and without headphones.
If those don't help solve it, see if there's anything weird showing with aplay -v ./piano2.wav. Here's my output for a wav that worked:
Here is my output. Seems it is ok.

Code: Select all

aplay -v ./piano2.wav
Playing WAVE './piano2.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 24000
  period_size  : 6000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : GETTIMEOFDAY
  period_step  : 1
  avail_min    : 6000
  period_event : 0
  start_threshold  : 24000
  stop_threshold   : 24000
  silence_threshold: 0
  silence_size : 0
  boundary     : 6755399441055744000

Re: No sound when play music from aplay utility

Posted: Wed Dec 19, 2018 8:16 am
by MrEen
Try deleting the files in ~/.config/pulse then run pulseaudio -k in the terminal. Wait a few seconds then try aplay.

Re: No sound when play music from aplay utility

Posted: Wed Dec 19, 2018 10:33 am
by koval
Yeah, it helps.
Thank you.

Re: No sound when play music from aplay utility

Posted: Sat Jan 19, 2019 4:10 pm
by herbie643
I had the same problem but installed SOX and that did the trick.
In fact I just checked now, have shortcut to play the shutter sound, when I press capslock and it wasn't working, no sound. Install sox and now it's fine.