关于imx8mp android11 上es8316的问题解决

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

关于imx8mp android11 上es8316的问题解决

1,033 Views
c-luo
Contributor III

您好,NXP:

 我司目前正在调试一款imx8mp android11的平板,因为一些原因采用的是es8316的codec芯片,但是目前我们还有些问题需要解决:

下面是我的dts配置:

\ {
sound-es8316 {
compatible = "fsl,imx-audio-es8316";
model = "imx-audio-es8316";
audio-cpu = <&sai3>;
audio-codec = <&codec_es8316>;
audio-routing =
"Ext Spk", "HPOL",
"Ext Spk", "HPOR";
};
};

&i2c1 {
clock-frequency = <400000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1>;
status = "okay";

codec_es8316: es8316@10 {
compatible = "everest,es8316";
reg = <0x10>;
clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_MCLK1>;
clock-names = "mclk";
};
};

&sai3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai3>;
assigned-clocks = <&clk IMX8MP_CLK_SAI3>;
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
assigned-clock-rates = <12288000>;
clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_IPG>, <&clk IMX8MP_CLK_DUMMY>,
<&audio_blk_ctrl IMX8MP_CLK_AUDIO_BLK_CTRL_SAI3_MCLK1>, <&clk IMX8MP_CLK_DUMMY>,
<&clk IMX8MP_CLK_DUMMY>;
clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3";
fsl,sai-mclk-direction-output;
status = "okay";
};

pinctrl_sai3: sai3grp {
fsl,pins = <
MX8MP_IOMUXC_SAI3_TXFS__AUDIOMIX_SAI3_TX_SYNC 0xd6 /* I2S0_LRCK*/
MX8MP_IOMUXC_SAI3_RXFS__AUDIOMIX_SAI3_RX_SYNC 0xd6 /* I2S0_LRCK*/
MX8MP_IOMUXC_SAI3_TXD__AUDIOMIX_SAI3_TX_DATA00 0xd6 /* I2S0_SDOUT*/
MX8MP_IOMUXC_SAI3_RXD__AUDIOMIX_SAI3_RX_DATA00 0xd6 /* I2S0_SDIN*/
MX8MP_IOMUXC_SAI3_TXC__AUDIOMIX_SAI3_TX_BCLK 0xd6 /* I2S0_CK*/
MX8MP_IOMUXC_SAI3_RXC__AUDIOMIX_SAI3_RX_BCLK 0xd6 /* I2S0_CK*/
MX8MP_IOMUXC_SAI3_MCLK__AUDIOMIX_SAI3_MCLK 0xd6 /* AUDIO MCLK*/
>;
};

同时修改的还有这里:

diff --git a/alsa/tinyalsa_hal.cpp b/alsa/tinyalsa_hal.cpp
index 651e153..d8da676 100755
--- a/alsa/tinyalsa_hal.cpp
+++ b/alsa/tinyalsa_hal.cpp
@@ -560,7 +563,7 @@ static int get_card_for_bus(struct imx_audio_device* adev, const char* bus, int
static int get_card_for_device(struct imx_audio_device *adev, int device, unsigned int flag, int *card_index)
{
int i;
- int card = -1;
+ int card = 0;

if (device == AUDIO_DEVICE_NONE)

 

目前我可以播放音乐,但是我无法使用mic录音,原因在与好像imx8mp不支持es8316的mic,我即使有声卡存在,但是也不会使用。

 

于此同时,我想要删除dts中的

 

sound-micfil {
status = "disabled";
compatible = "fsl,imx-audio-micfil";
model = "imx-audio-micfil";
cpu-dai = <&micfil>;
};

&micfil {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_pdm>;
assigned-clocks = <&clk IMX8MP_CLK_PDM>;
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
assigned-clock-rates = <196608000>;

};

的节点,但是我一但删除这个节点,我的系统就会不断的报错:

06-30 13:32:40.142 436 436 E Utils : did not find channel-count and/or sample-rate
06-30 13:32:40.178 540 620 I commit_sys_config_file: [settings-2-0,4]
06-30 13:32:40.214 436 436 I chatty : uid=1040 mediaextractor identical 6 lines
06-30 13:32:40.215 436 436 E Utils : did not find channel-count and/or sample-rate
06-30 13:32:40.227 540 1149 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19
06-30 13:32:40.227 540 1149 W AudioManager: updateAudioPortCache: listAudioPorts failed
06-30 13:32:40.244 436 436 E Utils : did not find channel-count and/or sample-rate
06-30 13:32:40.323 436 436 I chatty : uid=1040 mediaextractor identical 6 lines
06-30 13:32:40.323 436 436 E Utils : did not find channel-count and/or sample-rate
06-30 13:32:40.328 540 1149 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19
06-30 13:32:40.328 540 1149 W AudioManager: updateAudioPortCache: listAudioPorts failed
06-30 13:32:40.349 436 436 E Utils : did not find channel-count and/or sample-rate
06-30 13:32:40.412 436 436 I chatty : uid=1040 mediaextractor identical 6 lines
06-30 13:32:40.413 436 436 E Utils : did not find channel-count and/or sample-rate
06-30 13:32:40.429 540 1149 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19
06-30 13:32:40.429 540 1149 W AudioManager: updateAudioPortCache: listAudioPorts failed
06-30 13:32:40.430 436 436 E Utils : did not find channel-count and/or sample-rate
06-30 13:32:40.527 436 436 I chatty : uid=1040 mediaextractor identical 6 lines
06-30 13:32:40.527 436 436 E Utils : did not find channel-count and/or sample-rate
06-30 13:32:40.529 540 1149 E AudioSystem-JNI: AudioSystem::listAudioPorts error -19

这是为什么呢,我添加这个节点后,我会存在两个输入 pcm ,但是系统会使用micfile这个,但是我的es8316的无法使用。

你们有对应的解决patch么,或者一些建议。

谢谢你们!

 

 

 

 

 

 

 

 

 

 

Labels (1)
0 Kudos
0 Replies