我正在尝试从Beaglebone AI 中的圆形麦克风板 ( TIDA-01454 ) 捕获声音。我已经通过 I2C 成功配置了 CMB 的 ADC,并检查了 I2S 输出与外部 DAC 是否正常工作。
然而,我的下一步是将这个 I2S 捕获到我的 Beaglebone AI 中,以便以后进行处理。我想我已经按照本指南和本文档正确配置了引脚。所以我的显示引脚是这样的:
我的 DTS 文件是这样的:
#include "am5729-beagleboneai.dts"
// make it easy to determine which dtb you're currently running on
// (via /proc/device-tree/chosen/)
/ {
chosen {
base_dtb = "am5729-beagleboneai-custom.dts";
base_dtb_timestamp = __TIMESTAMP__;
};
};
// eventually these should be available in a header
#define P9_14 (0x3400 + 4 * 107)
#define P9_16 (0x3400 + 4 * 108)
#define P9_19a (0x3400 + 4 * 16)
#define P9_19b (0x3400 + 4 * 95)
#define P9_20a (0x3400 + 4 * 17)
#define P9_20b (0x3400 + 4 * 94)
#define P9_12 (0x3400 + 4 * 171)
#define P9_27b (0x3400 + 4 * 172)
#define P9_18b (0x3400 + 4 * 173)
//
/{
pcm5102a: pcm5102a {
#sound-dai-cells = <0>;
compatible = "ti,pcm5102a";
status = "okay";
};
sound {compatible = "simple-audio-card";
simple-audio-card,format = "i2s";
simple-audio-card,name = "PCM5102a";
simple-audio-card,bitclock-master = <&sound1_master>;
simple-audio-card,frame-master = <&sound1_master>;
simple-audio-card,bitclock-inversion;
simple-audio-card,cpu {
sound-dai = <&mcasp1>;
};
sound1_master: simple-audio-card,codec {
#sound-dai-cells = <0>;
sound-dai = <&pcm5102a>;
};
};
};
// enable i2c-3 on P9.19 (scl) + P9.20 (sda)
&i2c4 {
status = "okay";
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&i2c4_pins>;
};
&mcasp1 {
#sound-dai-cells = <0>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&mcasp1_pins>;
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
num-serializer = <4>;
/* 16 serializers */
serial-dir = < /* 1 TX 2 RX 0 unused */
2 0 0 0
>;
rx-num-evt = <1>;
tx-num-evt = <1>;
};
&dra7_pmx_core {
i2c4_pins: i2c4 {
pinctrl-single,pins = <
DRA7XX_CORE_IOPAD( P9_19a, PIN_INPUT_PULLUP | MUX_MODE7 ) // scl
DRA7XX_CORE_IOPAD( P9_19b, PIN_INPUT_PULLUP | MUX_MODE14 ) // (shared pin)
DRA7XX_CORE_IOPAD( P9_20a, PIN_INPUT_PULLUP | MUX_MODE7 ) // sda
DRA7XX_CORE_IOPAD( P9_20b, PIN_INPUT_PULLUP | MUX_MODE14 ) // (shared pin)
>;
};
mcasp1_pins: mcasp1_pins {
pinctrl-single,pins = <
DRA7XX_CORE_IOPAD(P9_12, PIN_INPUT_PULLDOWN | MUX_MODE0) // 12 0 mcasp1_aclkr BIT CLOCK BCLK
DRA7XX_CORE_IOPAD(P9_27b, PIN_INPUT | MUX_MODE0) // 27b 0 mcasp1_fsr FRAME SYNC LRCLK
DRA7XX_CORE_IOPAD(P9_18b, PIN_INPUT | MUX_MODE0) // 18b 0 mcasp1_axr0 I2S INPUT DATA
>;
};
};
// enable pwm-2 on P9.14 (out-A) + P9.16 (out-B)
&epwmss2 {
status = "okay";
};
&ehrpwm2 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&ehrpwm2_pins>;
};
&dra7_pmx_core {
ehrpwm2_pins: ehrpwm2 {
pinctrl-single,pins = <
DRA7XX_CORE_IOPAD( P9_14, PIN_OUTPUT_PULLDOWN | MUX_MODE10 ) // out A
DRA7XX_CORE_IOPAD( P9_16, PIN_OUTPUT_PULLDOWN | MUX_MODE10 ) // out B
>;
};
};
但是我认为它不会将其检测为捕获设备。由于 grep 和 arecord 命令返回以下内容:
debian@beaglebone:/var/lib/cloud9$ dmesg |grep sound
[ 1.385258] asoc-simple-card sound: pcm5102a-hifi <-> 48460000.mcasp mapping ok
debian@beaglebone:/var/lib/cloud9$ arecord -l
**** List of CAPTURE Hardware Devices ****
debian@beaglebone:/var/lib/cloud9$
我认为 ALSA 配置可能存在问题,但我是新手,我不知道该怎么做。
我的 ALSA 版本是:Advanced Linux Sound Architecture Driver Version k4.14.108-ti-r143.
我的声卡是:
cat /proc/asound/cards
0 [Black ]: TI_BeagleBone_B - TI BeagleBone Black
TI BeagleBone Black
所以没有检测到卡?是ALSA还是驱动问题?我该怎么做?