seeed-voicecard icon indicating copy to clipboard operation
seeed-voicecard copied to clipboard

[Bug]: seeed-voicecard can't play mp3

Open kanglue opened this issue 6 months ago • 2 comments

Describe the bug

mplayer -ao alsa:noblock:device=plughw=2,0 xxx.mp3

Expected behavior

mp3 file can be played.

Platform

Raspberry Pi 4b Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

Raspberrypi 4b, Installed card success.

aplay -l 2: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [bcm2835-i2s-wm8960-hifi wm8960-hifi-0] Subdevices: 1/1 Subdevice #0: subdevice #0

use mplay can play wav file normally, like this

mplayer -ao alsa:noblock:device=plughw=2,0 /home/ianglei/music/test.wav MPlayer 1.4 (Debian), built with gcc-10 (C) 2000-2019 MPlayer Team do_connect: could not connect to socket connect: No such file or directory Failed to open LIRC support. You will not be able to use your remote control.

Playing /home/ianglei/music/test.wav. libavformat version 58.45.100 (external) Audio only file format detected. Load subtitles in /home/ianglei/music/

Opening audio decoder: [pcm] Uncompressed PCM audio decoder AUDIO: 16000 Hz, 1 ch, s16le, 256.0 kbit/100.00% (ratio: 32000->32000) Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)

AO: [alsa] 16000Hz 1ch s16le (2 bytes per sample) Video: no video Starting playback… *A: 4.5 (04.5) of 5.0 (05.0) 0.1% *

Exiting… (End of file)

but play m4a or mp3 failed, I want to know why?

mplayer -ao alsa:noblock:device=plughw=2,0 /home/ianglei/music/horse.mp3 MPlayer 1.4 (Debian), built with gcc-10 (C) 2000-2019 MPlayer Team do_connect: could not connect to socket connect: No such file or directory Failed to open LIRC support. You will not be able to use your remote control.

Playing /home/ianglei/music/horse.mp3. libavformat version 58.45.100 (external) Audio only file format detected. Load subtitles in /home/ianglei/music/

Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III AUDIO: 44100 Hz, 2 ch, s16le, 32.0 kbit/2.27% (ratio: 4000->176400) Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)

[AO_ALSA] alsa-lib: pcm_hw.c:386:(snd_pcm_hw_hw_params) SNDRV_PCM_IOCTL_HW_PARAMS failed (-22): Invalid argument [AO_ALSA] Unable to set hw-parameters: Invalid argument Failed to initialize audio driver ‘alsa:noblock:device=plughw=2’ No such audio driver ‘0’ Could not open/initialize audio device → no sound. Audio: no sound Video: no video

Relevant log output

No response

kanglue avatar Aug 18 '24 14:08 kanglue