[alsa-devel] Audio play problem with tlv320aic3106 in mainline.
Enric Balletbo Serra
eballetbo at gmail.com
Fri May 29 11:24:50 CEST 2015
Thanks for the answer Peter,
2015-05-29 9:20 GMT+02:00 Peter Ujfalusi <peter.ujfalusi at ti.com>:
> On 05/28/2015 02:36 PM, Enric Balletbo Serra wrote:
>> Dear all,
>>
>> Recently I sent some patches to add support for a new board based on
>> AM335x processor [1]. The board has the TLV320AIC3106 audio codec, the
>> MCLK signal is provided by an external oscillator of 12MHz. The
>> problem is that when I play a wav file for example I heard the song a
>> double speed. This is with v4.0 and current mainline.
>>
>> In dts file I defined "ti,codec-clock-rate = <12000000>;" which is the
>> correct value. Curiously when I changed the clock rate value to
>> 24000000 I heard the song at normal speed. AFAIK the correct value for
>> clock-rate is 12MHz so I suspect that something is wrong in the
>> driver, maybe it sets a wrong clock divider/multiplier ? Anyone can
>> point me in the right direction to fix the issue ? I see that
>> am335x-evm and am335x-pepper boards also uses this audio codec, did
>> anyone with those boards have the same problem?
>
> It might be really 24MHz.
> If the MCLK in your board is wired like am335x-evmsk or how BeagleBone's audio
> capes are wired (MCLK is coming from AM335x's EVENT_INTR0/1 pin as CLKOUT1/2)
> then 24MHz is correct. On the am335x-evm there is a dedicated crystal
> providing the 12MHz.
>
Well, in my board there is also a dedicated crystal providing the
12MHz, so I expect that the correct value for clock-frequency is 12MHz
not 24MHz.
clocks {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <0>;
/* audio external oscillator */
tlv320aic3x_mclk: oscillator at 0 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <12000000>; /* 12MHz */
};
};
sound {
compatible = "ti,da830-evm-audio";
ti,model = "AM335x-SL50";
ti,audio-codec = <&audio_codec>;
ti,mcasp-controller = <&mcasp0>;
clocks = <&tlv320aic3x_mclk>;
clock-names = "mclk";
ti,audio-routing =
"Headphone Jack", "HPLOUT",
"Headphone Jack", "HPROUT",
"LINE1R", "Line In",
"LINE1L", "Line In";
};
For me it's really odd have to set the clock-frequency to 24MHz to make it work
clock-frequency = <24000000>;
For that reason I'm wondering if there is a bug in the driver, did
anyone test with an am335x-evm board ?
>>
>> [1] https://patchwork.kernel.org/patch/6480071/
>>
>> Thanks in advance,
>> Enric
>>
>
> --
> Péter
Thanks,
Enric
More information about the Alsa-devel
mailing list