No sound when play music from aplay utility

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
koval
Level 1
Level 1
Posts: 37
Joined: Fri Jan 08, 2016 2:40 pm

No sound when play music from aplay utility

Post 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 ?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
richyrich

Re: No sound when play music from aplay utility

Post by richyrich »

I see Auto-Mute as enabled in the Alsa Mixer picture . . ?
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: No sound when play music from aplay utility

Post 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.
koval
Level 1
Level 1
Posts: 37
Joined: Fri Jan 08, 2016 2:40 pm

Re: No sound when play music from aplay utility

Post 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
koval
Level 1
Level 1
Posts: 37
Joined: Fri Jan 08, 2016 2:40 pm

Re: No sound when play music from aplay utility

Post 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
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

Re: No sound when play music from aplay utility

Post by MrEen »

Try deleting the files in ~/.config/pulse then run pulseaudio -k in the terminal. Wait a few seconds then try aplay.
koval
Level 1
Level 1
Posts: 37
Joined: Fri Jan 08, 2016 2:40 pm

Re: No sound when play music from aplay utility

Post by koval »

Yeah, it helps.
Thank you.
herbie643
Level 3
Level 3
Posts: 190
Joined: Tue Oct 19, 2010 9:16 pm

Re: No sound when play music from aplay utility

Post 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.
Locked

Return to “Sound”