我的目标设备上的alsa说“找不到卡'0'”

时间:2012-08-28 02:14:14

标签: audio pcm alsa

我正在尝试通过ALSA使我的目标声卡工作,这是一个Qualcomm MSM8660 Snapdragon,这意味着没有pci设备并运行一种嵌入式Linux。

因为这个设备最初是商业Android手机,所以我确信它的内核上有正确的内置音频驱动程序,但ALSA根本不识别录音机。

我相信这是因为我没有写任何alsa配置文件,如/etc/asound.conf和/usr/share/alsa/alsa.conf(我尝试了其构建源附带的默认alsa.conf)但没有运气)

以下命令所说的是:

/dev # ls pcm*
pcmC0D0c  pcmC0D0p  pcmC0D1c  pcmC0D1p


/dev # cat /proc/asound/cards
 0 [msmaudio       ]:  - msm-audio
                      msm-audio


/dev # cat /proc/asound/devices 
  0: [ 0]   : control
 16: [ 0- 0]: digital audio playback
 17: [ 0- 1]: digital audio playback
 24: [ 0- 0]: digital audio capture
 25: [ 0- 1]: digital audio capture
 33:        : timer


/dev # cat /proc/asound/pcm
00-00: DSP 1 msm-codec-dai-0 :  : playback 2 : capture 1
00-01: MVS mvs-codec-dai-1 :  : playback 1 : capture 1


/dev # cat /proc/asound/timers 
G0: system timer : 10000.000us (10000000 ticks)
P0-0-0: PCM playback 0-0-0 : SLAVE
P0-0-1: PCM capture 0-0-1 : SLAVE
P0-0-2: PCM playback 0-0-2 : SLAVE
P0-1-0: PCM playback 0-1-0 : SLAVE
P0-1-1: PCM capture 0-1-1 : SLAVE


/dev # cat /proc/asound/card0/pcm0p/info 
card: 0
device: 0
subdevice: 0
stream: PLAYBACK
id: DSP 1 msm-codec-dai-0
name: 
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 2
subdevices_avail: 2


/dev # cat /proc/asound/card0/pcm1p/info 
card: 0
device: 1
subdevice: 0
stream: PLAYBACK
id: MVS mvs-codec-dai-1
name: 
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1

请让我知道应该怎么做才能发挥它。

我提前感激。

度过美好的一天。


我将官方alsa-lib源的默认alsa.conf添加到/ usr / share /也在/ etc

写了一个非常简单的asound.conf
pcm.!default {
        type hw
        card 0
}

ctl.!default {
        type hw
        card 0
}

结果是,

/temp # aplay- l
**** List of PLAYBACK Hardware Devices ****
card 0: msmaudio [msm-audio], device 0: DSP 1 msm-codec-dai-0 []
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 0: msmaudio [msm-audio], device 1: MVS mvs-codec-dai-1 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

所以问题是配置文件,我遇到了另一个问题,即aplay陷入了

/temp # aplay -i ./gbb.mp3
...
...
access("//.asoundrc", R_OK)             = -1 ENOENT (No such file or directory)
open("/dev/snd/controlC0", O_RDWR|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
ioctl(3, SNDRV_CTL_IOCTL_PVERSION or USBDEVFS_CONTROL or USBDEVFS_CONTROL32, 0xbedb085c) = 0
ioctl(3, SNDRV_CTL_IOCTL_PCM_PREFER_SUBDEVICE, 0xbedb0880) = 0
open("/dev/snd/pcmC0D0p", O_RDWR|O_NONBLOCK|O_CLOEXEC
...
...

但我想这不再是配置了。

0 个答案:

没有答案