This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] Linux/AM5728:与 McASP6进行 PCM5102a 协商

Guru**** 2587345 points
Other Parts Discussed in Thread: PCM5102A, PCM5102

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/594381/linux-am5728-pcm5102a-negotiation-with-mcasp6

器件型号:AM5728
主题中讨论的其他器件:PCM5102APCM5102

工具/软件:Linux

我正在尝试使用连接到 McASP6的 PCM5102a 编解码器在我的定制板上播放.wav 文件。
我已经编写了虚拟 PCM5102a 驱动程序、正如 它在这里描述的那样、我已经在 DTS 文件中添加了以下字符串:

pcm5102a:pcm5102a{
 #sound-di-cells =<0>;
 兼容="ti、pcm5102a";
};

声音0:声音@0{
 兼容="简单音频卡";
 simple-audio-card、name ="PCM5102";
 simple-audio-card、format ="I2S";
 simple-audio-card、bitclock-master =<&sound0_master>;
 simple-audio-card、frame-master =<&sound0_master>;

 sound0_master:简单音频卡、CPU{
  Sound-Dai =<&mcasp6>;
 };

 简单音频卡、编解码器{
  sound-dai =<&pcm5102a>;
 };
};

mcasp6{.m&mcasp6}
 #sound-di-cells =<0>;
 分配的时钟=<&mcasp6_ahclkx_mux>;
 分配的时钟父级=<&sys_clkin2>;
 pinctrl-names ="default";
 pinctrl-0 =<&mcasp6_pins_default>;
 状态="正常";

 OP-MODE =<0>;/* MCASP_IIS_MODE */
 TDM-SLOTS =<2>;
 /* 4个串行器*/
 serial-dir =</* 0:非活动、1:TX、2:Rx *
 0 1 0 0
 >;
 tx-num-evt =<32>;
 Rx-num-evt =<32>;
};

引导 Linux 后、器件已成功注册:

[2.008698] ASOC-simple-card sound@0:pcm5102a-hifi <-> 48474000.McASP 映射正常
[6.294296] ALSA 器件列表:
[6.297296]#0:PCM5102

但是当我尝试播放.wav 文件时、出现以下错误:

root@am57xx-EVM:~# aplay test.wav
播放波'test.wav':有符号16位小端字节序、速率44100Hz、单声道
ALSA lib ./../../alsa-lib-1.1.0/src/pcm/pcm_params.c:2162:(snd1_pcm_hw_精炼_slave)从 PCM 不可用
aplay:SET_params:1204:此 PCM 的配置中断:无可用配置

如何解决此问题?




 

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好!

    我建议您运行 aplay -l 和 cat /proc/asound/cards 以查看 alsa 和内核是否能看到您的音频设备。
    aplay -Dplughw:X、X


    BR
    玛格丽塔
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

     /proc/asound/cards 中的声卡与 aplay -l 创建的设备匹配:

    $ cat /proc/asound/cards
    0 [PCM5102 ]:PCM5102 - PCM5102
    PCM5102
    $ aplay -l

    ****播放硬件设备列表****
    卡0:PCM5102 [PCM5102]、器件0:Davinci-McAP.0-pcm5102a-hifi pcm5102a-hifi-0 []
    子设备:1/1
    子设备#0:子设备#0

    通过直接设置硬件设备、结果是一样的:

    aplay -D plughw:0、0、0 test.wav
    播放波'test.wav':有符号16位小端字节序、速率44100Hz、单声道
    ALSA lib ./../../alsa-lib-1.1.0/src/pcm/pcm_params.c:2162:(snd1_pcm_hw_精炼_slave)从 PCM 不可用
    aplay:SET_params:1204:此 PCM 的配置中断:无可用配置






  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    从 xrefclk1接收 PCM5102a 的 MCLK、在 mcasp6_ahclk 上进行多路复用。
    我已经使用示波器检查了这个引脚、发现没有任何信号。
    这是否是问题的根源?