2
votes

I am using a USB sound card in Linux openwrt. When I want to try using alsa-lib to play sounds or voices it prints an error and do nothing. I used aplay, baresip (a sip client use alsa) and also my own program using alsa-lib to play sound but the same problem occur:

ALSA lib pcm_direct.c:1137:(snd1_pcm_direct_initialize_poll_fd) unable to open timer 'hw:CLASS=3,SCLASS=0,CARD=0,DEV=0,SUBDEV=0'
ALSA lib pcm_dmix.c:1101:(snd_pcm_dmix_open) unable to initialize poll_fd

I can play the sounds via madplay, but not alsa players. Moreover, I could use alsamixer or alsactl to control the driver and sound card.

Here is my sound card listed byaplay -l

root@OpenWrt:~# aplay -l
* List of PLAYBACK Hardware Devices *
card 0: AUDIO [MV USB AUDIO], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0

Any help would be appreciated,

Thanks,

Majid.

1

1 Answers

1
votes

The problem described in below link:

https://git.lede-project.org/?p=source.git;a=commitdiff;h=2ab6aaca4dfe1265006dae3f3cd0fd838f9bf2af

It needs to add CONFIG_SND_PCM_TIMER to /package/kernel/linux/modules/sound.mk file.