You are not logged in.

#1 2023-08-08 03:17:11

luofeiyu
Member
Registered: 2015-11-03
Posts: 30

How to play mp3 with hw number?

I can play mp3 with:

mplayer  test.mp3

Now i want to specify the hw number with mplayer:

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Generic [HD-Audio Generic], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: ALC662 rev3 Analog [ALC662 rev3 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 1: ALC662 rev3 Digital [ALC662 rev3 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

All of them can play without voice,why no voice?

mplayer test.mp3 -ao alsa:device=hw=0.3
mplayer test.mp3 -ao alsa:device=hw=0.7
mplayer test.mp3 -ao alsa:device=hw=0.8
mplayer test.mp3 -ao alsa:device=hw=1.1

mplayer test.mp3 -ao alsa:device=hw=1.0 can't play

[AO_ALSA] alsa-lib: pcm_hw.c:1715:(snd_pcm_hw_open) open '/dev/snd/pcmC1D0p' failed (-16): Device or resource busy
[AO_ALSA] Playback open error: Device or resource busy
Failed to initialize audio driver 'alsa:device=hw=1.0'
Could not open/initialize audio device -> no sound.

Offline

#2 2023-08-08 06:16:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,112

Re: How to play mp3 with hw number?

Cause the device is taken, likely by pulseaudio or pipewire.

aplay -L

Also this sounds a lot like an https://en.wikipedia.org/wiki/XY_problem - what problem do you actually want to solve this way?
https://wiki.archlinux.org/title/Advanc … sound_card ?

Offline

#3 2023-08-14 01:28:19

luofeiyu
Member
Registered: 2015-11-03
Posts: 30

Re: How to play mp3 with hw number?

aplay -L  | grep hw: | grep -v plug
hw:CARD=Generic,DEV=3
hw:CARD=Generic,DEV=7
hw:CARD=Generic,DEV=8
hw:CARD=Generic_1,DEV=0
hw:CARD=Generic_1,DEV=1

Offline

#4 2023-08-14 07:06:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,112

Re: How to play mp3 with hw number?

Who said anything about applying some random grep there?

Offline

Board footer

Powered by FluxBB