I'm trying to get some sound to play via an external USB connected speaker from my Rasp Pi 3 Model B.

aplay -L 

gives me this entry (along with many others)

USB2.0 Device, USB Audio
Default Audio Device

So, I tried running:

aplay -D default:CARD=Device piano2.wav

But end up with the following

Playing WAVE 'piano2.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
aplay: pcm_write:2053: write error: Input/output error

I'm not even sure where to being to troubleshoot this. Thoughts on why this error is thrown?

More info. aplay -l gives me

   **** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device [USB2.0 Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
  • Could be a permission problem. If you aplay the piano as root, does that work? – Ljm Dullaart Aug 7 at 8:44
  • Tried running sudo aplay -D sysdefault:CARD=Device piano2.wav (I've moved around default devices to try to get this working). and I'm getting the same error. – jonmrich Aug 7 at 14:38

If everything is going okay then you have to find these:

  1. Did you set the output from audio menu which is at upper-right side of task bar?
  2. Is your output forced or not from boot menu.

If you find these issues then solve then sequencially. Or check your USB card.

| improve this answer | |
  • "upper-right side of task bar"? I'm only using the terminal as an interface at this point. And not clear on what you're asking in 2 – jonmrich Aug 10 at 15:30
  • @jonmrich forced output is defined in raspi-config – Sohan Arafat Aug 11 at 1:59

Without digging down to the root cause (which I belive lies in ALSA configuration files asound.conf / .asoundrc), a practical solution to such problems is to install pulseaudio (along with its GUI configuration interface, pavucontrol) and set up the default audio sink there.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.