仍然无法让我的 xmos 卡正常工作,在更新到最新内核后,我的卡显示为 snd-usb-audio 设备,并列在aplay -l
我已将其设置为选项中的第一张卡alsa-base.conf
我有以下内容asound.conf
:
pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}
但它不会播放音频
sudo aplay -D plughw:0,0 /media/Disk2/Rehab.flac
[sudo] password for stu:
Playing raw data '/media/Disk2/Rehab.flac' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:1297: Unable to install hw params:
ACCESS: RW_INTERLEAVED
FORMAT: U8
SUBFORMAT: STD
SAMPLE_BITS: 8
FRAME_BITS: 8
CHANNELS: 1
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 1000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: NONE
BUFFER_BYTES: 4000
TICK_TIME: 0
我的 alsa 配置在这里:
http://www.alsa-project.org/db/?f=3d3a11fb80ca467d9922fdfd58f5320f103726b2
有任何想法吗?
更新 1
此外,还dmesg
产生:
usb 3-1: new high-speed USB device number 2 using xhci_hcd
[79121.642479] usb 3-1: New USB device found, idVendor=20b1, idProduct=000a
[79121.642487] usb 3-1: New USB device strings: Mfr=1, Product=3, SerialNumber=0
[79121.642492] usb 3-1: Product: xCORE USB Audio 2.0
[79121.642496] usb 3-1: Manufacturer: XMOS
[79121.657970] snd-usb-audio 3-1:1.0: cannot find the slot for index 0 (range 0- 1), error: -16
[79121.658044] usb 3-1: cannot create card instance 0
[79121.658088] snd-usb-audio: probe of 3-1:1.0 failed with error -5
[79121.658121] usbcore: registered new interface driver snd-usb-audio
[79271.693734] usbcore: deregistering interface driver snd-usb-audio
[79276.863389] usb 3-1: cannot get ctl value: req = 0x83, wValue = 0x201, wIndex = 0xa00, type = 4
[79276.863490] usb 3-1: 10:0: cannot get min/max values for control 2 (id 10)
[79276.863759] usb 3-1: cannot get ctl value: req = 0x83, wValue = 0x200, wIndex = 0xa00, type = 4
[79276.863859] usb 3-1: 10:0: cannot get min/max values for control 2 (id 10)
有没有办法给它更多通用的参数?
更新 2
谢谢,我已将文件转换为 48Khz wav,但仍然出现错误:
ALSA lib pcm_direct.c:998:(snd1_pcm_direct_initialize_slave) unable to install hw params
ALSA lib pcm_dmix.c:1034:(snd_pcm_dmix_open) unable to initialize slave
aplay: main:722: audio open error: Input/output error
我甚至运行了带有 Ubuntu 桌面的 Live CD 来让我的生活更轻松,但 Alsa 一直给出错误消息。我能对硬件参数做些什么吗?
答案1
使用该hw
设备将禁用所有自动样本格式转换。(并且aplay
不支持 FLAC 文件。)
设置默认卡的正确方法asound.conf
是这样的:
defaults.pcm.card 0
defaults.ctl.card 0
但是,卡零无论如何都是默认的;您不需要任何asound.conf
。