Thread 中讨论的其他器件:TAS2563、
工具与软件:
团队成员、您好!
我使用的是 AM623平台和 TAS2563音频编解码器。 我会遇到 BCLK 和 WCLK 时钟在音频播放期间激活但在播放结束时停止的问题。 这会导致器件上的 TDM 时钟错误。
我需要时钟(BCLK 和 WCLK)始终保持激活状态、以避免出现此问题。 您能帮我解决这个问题吗?
以下是我先前创建的相关票证的链接: TAS2563 TDM 时钟错误-未播放音频。
谢谢!
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.
工具与软件:
团队成员、您好!
我使用的是 AM623平台和 TAS2563音频编解码器。 我会遇到 BCLK 和 WCLK 时钟在音频播放期间激活但在播放结束时停止的问题。 这会导致器件上的 TDM 时钟错误。
我需要时钟(BCLK 和 WCLK)始终保持激活状态、以避免出现此问题。 您能帮我解决这个问题吗?
以下是我先前创建的相关票证的链接: TAS2563 TDM 时钟错误-未播放音频。
谢谢!
尊敬的 Sakshi:
我看着你和伊凡的互动在另一个线程。 查看器件树的更改后、您能否添加以下行、并查看 BCLK 和 WCLK 是否保持激活状态:主要更改是系统时钟方向输出;
下面是一个期望 MCLK 为25MHz 的示例器件树。
sound_master:simple-audio-card、CPU {
sound-Dai =<&mcaspx>;
位时钟主控;
帧-主机;
系统时钟频率=<25000000>;
系统时钟方向输出
请告诉我、它是如何处理这一变化的。
此致、
Suren
尊敬的 Suren:
感谢您的快速响应。 我尝试添加此属性、但播放结束时时时、时钟仍然停止。
这是我当前的 devicetre 配置:
main_mcasp2_pins_default: main-mcasp2-pins-default {
pinctrl-single,pins = <
AM62X_IOPAD(0x0178, PIN_INPUT, 2) /* (AC20) RGMII2_TD3.MCASP2_ACLKX */
AM62X_IOPAD(0x0174, PIN_INPUT, 2) /* (AD21) RGMII2_TD2.MCASP2_AFSX */
AM62X_IOPAD(0x018c, PIN_INPUT, 2) /* (AC21) RGMII2_RD2.MCASP2_AXR0 */
AM62X_IOPAD(0x0170, PIN_OUTPUT, 5)/* (AA18) RGMII2_TD1.MCASP2_AXR8 */
AM62X_IOPAD(0x016c, PIN_INPUT, 7) /* (Y18) RGMII2_TD0.GPIO0_89 */
>;
};
codec_audio: sound {
compatible = "simple-audio-card";
simple-audio-card,name = "AM623-GTC700C";
simple-audio-card,widgets =
"Speaker", "Internal Speaker",
"Microphone", "Internal Mic";
simple-audio-card,routing =
"Internal Speaker", "OUT",
"DMIC", "Internal Mic";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&sound_master>;
simple-audio-card,frame-master = <&sound_master>;
simple-audio-card,mclk-fs = <256>;
simple-audio-card,bitclock-inversion;
sound_master: simple-audio-card,cpu {
sound-dai = <&mcasp2>;
system-clock-frequency = <12288000>;
system-clock-direction-out;
dai-tdm-slot-num = <2>;
dai-tdm-slot-width = <16>;
};
simple-audio-card,codec {
sound-dai = <&tas2563>;
};
};
tas2563: tas2563@4c{
status = "okay";
reg = <0x4c>;
compatible = "ti,tas2563";
#sound-dai-cells = <0>;
ti,imon-slot-no = <0>;
ti,vmon-slot-no = <0>;
ti,asi-format = <0>;
reset-gpios = <&main_gpio0 89 GPIO_ACTIVE_HIGH>;
};
&mcasp2 {
status = "okay";
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&main_mcasp2_pins_default>;
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
assigned-clock-rates = <12288000>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
2 2 1 0
>;
tx-num-evt = <32>;
rx-num-evt = <32>;
};
尊敬的 Suren:
以下是 BCLK 和 wclk 波形:
播放前的 BCLK:(电压电平不完美、因为它应该是高电平或低电平、但一旦它开始播放 BCLK 且 wclk 显示预期的3.3V 电平)
播放前的 wclk:
播放时 BCLK:
播放时发出 Wclk:
一旦它停止播放、我们就不会得到任何时钟、就像在播放前波形图像中一样。
以下是我从驱动程序获得的一些日志、这些日志会在播放停止时显示时钟变为0:
tasdevice-codec 3-004c: firmware: direct-loading firmware tas2562-1amp-reg.bin tasdevice-codec 3-004c: tasdev: regbin_ready start tasdevice-codec 3-004c: nconfig = 8 tasdevice-codec 3-004c: img_sz = 1528 total_config_sz = 1236 offset = 292 tasdevice-codec 3-004c: Firmware init complete tasdevice-codec 3-004c: tasdevice_set_dai_sysclk: clk_id = 0, freq = 12288000, CLK direction IN tasdevice-codec 3-004c: tasdevice_hw_params: Playback tasdevice-codec 3-004c: tasdevice_hw_params: BCLK rate = 1536000 Channel = 2Sample rate = 48000 slo t width = 16 tasdevice-codec 3-004c: powercontrol_routine:1204: enter tasdevice-codec 3-004c: select_cfg_blk: profile_conf_id = 1 tasdevice-codec 3-004c: select_cfg_blk: conf 1, block type:PRE_POWER_UP device idx = 0x01 tasdevice-codec 3-004c: powercontrol_routine:1213: leave tasdevice-codec 3-004c: select_cfg_blk: profile_conf_id = 1 tasdevice-codec 3-004c: select_cfg_blk: conf 1, block type:PRE_SHUTDOWN device idx = 0x00 tasdevice-codec 3-004c: tasdevice_set_dai_sysclk: clk_id = 0, freq = 0, CLK direction IN tasdevice-codec 3-004c: tasdevice_set_dai_sysclk: clk_id = 0, freq = 12288000, CLK direction IN tasdevice-codec 3-004c: tasdevice_hw_params: Playback tasdevice-codec 3-004c: tasdevice_hw_params: BCLK rate = 1536000 Channel = 2Sample rate = 48000 slo t width = 16 tasdevice-codec 3-004c: powercontrol_routine:1204: enter tasdevice-codec 3-004c: select_cfg_blk: profile_conf_id = 1 tasdevice-codec 3-004c: select_cfg_blk: conf 1, block type:PRE_POWER_UP device idx = 0x01 tasdevice-codec 3-004c: powercontrol_routine:1213: leave tasdevice-codec 3-004c: select_cfg_blk: profile_conf_id = 1 tasdevice-codec 3-004c: select_cfg_blk: conf 1, block type:PRE_SHUTDOWN device idx = 0x00 tasdevice-codec 3-004c: tasdevice_set_dai_sysclk: clk_id = 0, freq = 0, CLK direction IN
尊敬的 Sakshi:
根据我的内部讨论、Linux 中的 McASP 只会在用户启动应用程序(arecord/aplay/gstreamer)时生成时钟。 您的电路板上是否有任何其他器件能够充当时钟主器件? 在 TI EVM 上、我们通常将 McASP 配置为从站。
此外、如果我正确理解、您可以在启动 aplay 时收听音频、而在 BCLK/WCLK 因 TDM 错误而停止后无法收听音频。
此致、
Suren
尊敬的 Suren:
在我们的设置中、我们将编解码器用作从器件。 我们从一开始就听不到任何声音。 播放结束且 BCLK/wclk 停止后、它会显示 tdm 时钟错误。
另外、我看到了一些类似的查询、其中用户希望 McASP 作为主控方、而编解码器作为从属方。 我认为这与我们的需求有一定关系。 https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1272002/am623-audio_ext_refclk1-input/4844633#4844633。您是否能够为此提供解决方案?