你好,我想记录8个频道从天大-01454中巴到比格尔骨AI。由于中巴是由两个PCM1864模数转换器和它也是比格板,我遵循这个指南(https://www.ti.com/lit/an/sprac97/sprac97.pdf)与一些变化(channels_max=16),以使它与Beaglebone兼容。
我成功地记录了中巴拥有的8部麦克风中的4部(我只需点击麦克风来检查这个麦克风是否有效)。不过,我想录制这8个频道。目前工作的麦克风是MIC1,MIC4,MIC5和MIC8,虽然我想说有很大的噪音。
CMB有4个数据输出引脚,因此我假设每个接口都发送2个通道,因此这是我的dts文件:
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>;
//clocks = <&mcasp1_fck>;
//clock-names = "mclk";
};
};
&mcasp1 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&mcasp1_pins>;
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
num-serializer = <4>;
serial-dir = < /* 1 TX 2 RX 0 unused */
2 2 0 0 0 0 0 0 0 0 2 2
>;
rx-num-evt = <4>;
tx-num-evt = <4>;
};
串行dir是这样的,因为我使用mcasp1_axr0、mcasp1_axr1、mcasp1_10和mcasp1_axr11,因为它们是Beaglbone中可用的。这是我对中巴的配置:
uint8_t U1_PCM1864_CONFIG[][2] = {
{0x00, 0x00}, // Change to Page 0
{0x01, 0x40}, // PGA CH1_L to 32dB
{0x02, 0x40}, // PGA CH1_R to 32dB
{0x03, 0x40}, // PGA CH2_L to 32dB
{0x04, 0x40}, // PGA CH2_R to 32dB
{0x05, 0x86}, // Enable SMOOTH PGA Change; Independent Link PGA;
{0x06, 0x41}, // Polarity: Normal, Channel: VINL1[SE]
{0x07, 0x41}, // Polarity: Normal, Channel: VINR1[SE]
{0x08, 0x44}, // Polarity: Normal, Channel: VINL3[SE]
{0x09, 0x44}, // Polarity: Normal, Channel: VINR3[SE]
{0x0A, 0x00}, // Secondary ADC Input: No Selection
{0x0B, 0x44}, // RX WLEN: 24bit; TX WLEN: 24 bit; FMT: I2S format
{0x10, 0x03}, // GPIO0_FUNC - SCK Out; GPIO0_POL - Normal
{0x11, 0x50}, // GPIO3_FUNC - DOUT2; GPIO3_POL - Normal
{0x12, 0x04}, // GPIO0_DIR - GPIO0 - Output
{0x13, 0x40}, // GPIO3_DIR � GPIO3 - Output
{0x20, 0x11} // MST_MODE: Master; CLKDET_EN: Disable
};
uint8_t U2_PCM1864_CONFIG[][2] = {
{0x00, 0x00}, // Change to Page 0
{0x01, 0x40}, // PGA CH1_L to 32dB
{0x02, 0x40}, // PGA CH1_R to 32dB
{0x03, 0x40}, // PGA CH2_L to 32dB
{0x04, 0x40}, // PGA CH2_R to 32dB
{0x05, 0x86}, // Enable SMOOTH PGA Change; Independent Link PGA;
{0x06, 0x41}, // Polarity: Normal, Channel: VINL1[SE]
{0x07, 0x41}, // Polarity: Normal, Channel: VINR1[SE]
{0x08, 0x44}, // Polarity: Normal, Channel: VINL3[SE]
{0x09, 0x44}, // Polarity: Normal, Channel: VINR3[SE]
{0x0A, 0x00}, // Secondary ADC Input: No Selection
{0x0B, 0x44}, // RX WLEN: 24bit; TX WLEN: 24 bit; FMT: I2S format
{0x10, 0x00}, // GPIO0_FUNC – GPIO0; GPIO0_POL - Normal
{0x11, 0x50}, // GPIO3_FUNC - DOUT2; GPIO3_POL - Normal
{0x12, 0x00}, // GPIO0_DIR - GPIO0 - Input
{0x13, 0x40}, // GPIO3_DIR � GPIO3 - Output
{0x20, 0x01} // MST_MODE: Slave; CLKDET_EN: Enable
};
那么,我错过了什么来获得8个频道?
发布于 2022-05-21 15:44:45
我刚刚简要地查看了您在这里引用的芯片,根据我所看到的,PCM1864有四个通道和一个数据线(I2S),因此为了使用两个PCM1864,您需要为它指定两个引脚,并将信道计数设置为4。
时隙指定有多少个时隙(通道),如果你需要4个,你应该在这里指定4个。
串行-dir指定一个串行(也就是I2S的数据线)是否是in r输出。您有两个PCM1864,因此我假设您只需要两个输入(2RX),而不是四个输入。
https://stackoverflow.com/questions/71396835
复制相似问题