Dear TI E2E Community,
I am working in porting of new stereo codec , I followed the links
http://processors.wiki.ti.com/index.php/Sitara_SDK_Linux_Audio_Porting_Guide
http://processors.wiki.ti.com/index.php/Sitara_Linux_SDK_Audio_DAC_Example
As I am new to dts configuration & not clear w.r.t the following points could anybody please clarify on the same
1) I did the pins muxing as shown below, could you anybody please confirm whether the SYSCLK needs to be configured here (ie., in this pin muxing only) or it is not required configured here or somehwere else??
mcasp0_pins: mcasp0_pins {
pinctrl-single,pins = <
0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_ahclkx - SYSCLK */
0x190 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx - BCK */
0x194 (PIN_INPUT_PULLDOWN| MUX_MODE0) /* mcasp0_fsx - WS */
0x198 (PIN_OUTPUT_PULLDOWN | MUX_MODE0) /* mcasp0_axr0 - DATAO */
0x1a8 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_axr1 - DATAI */
>;
};
mcasp0_sleep_pins: mcasp0_sleep_pins {
pinctrl-single,pins = <
0x1ac (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x190 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x194 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x198 (PIN_INPUT_PULLDOWN | MUX_MODE7)
0x1a8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
>;
};
2) In machine layer configuration , I didn't understand what is codec-clock-rate?? is this the master clock or bit clock of stereo codec,
If it is master clock, could you please clarify is 12Mhz is sufficient for codec to respond, since I require my stereo codec to work at 12 bit @ 48 KHz & With respect to audio routing as am using UDA1345TS chipset & I see the below routing configurations in the codec driver file which is already in place (sound/soc/codecs/uda134x.c)
static const struct snd_soc_dapm_widget uda134x_dapm_widgets[] = {
SND_SOC_DAPM_INPUT("VINL1"),
SND_SOC_DAPM_INPUT("VINR1"),
//SND_SOC_DAPM_INPUT("VINL2"),
//SND_SOC_DAPM_INPUT("VINR2"),
SND_SOC_DAPM_OUTPUT("VOUTL"),
SND_SOC_DAPM_OUTPUT("VOUTR"),
};
static const struct snd_soc_dapm_route uda134x_dapm_routes[] = {
{ "ADC", NULL, "VINL1" },
{ "ADC", NULL, "VINR1" },
//{ "ADC", NULL, "VINL2" },
//{ "ADC", NULL, "VINR2" },
{ "VOUTL", NULL, "DAC" },
{ "VOUTR", NULL, "DAC" },
};
I have added the same configurations in dts as shown below ,could you please confirm the below configurations w.r.t audio routing is correct or any other configurations needs to be done apart from this
uda134x: uda134x {
compatible = "ti,uda134x";
};
sound {
compatible = "ti,uda134x-audio-codec";
ti,model = "AM335x-EVM";
ti,audio-codecaudio-codec = <&uda134x>;
ti,mcasp-controller = <&mcasp0>;
ti,codec-clock-rate = <12000000>;
ti,audio-routing =
"ADC", "VINL1",
"ADC", "VINR1";
"VOUTL", "DAC",
"VOUTR", "DAC",
};
3) In MCASP configuration as shown below I didn't understand the following parameters, could anybody please explain the same, so that it
taken care for porting my new audio codec
I feel important parameter is serial-dir , could you please help me to understand what is serial-dir & other parameters also
tdm-slots
tx-num-evt
rx-num-evt
&mcasp0 {
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mcasp0_pins>;
pinctrl-1 = <&mcasp0_sleep_pins>;
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
/* 16 serializer */
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
0 0 1 2
>;
tx-num-evt = <32>;
rx-num-evt = <32>;
};
Kindly do the needful in clarifying the above queries as early as possible, so that I can quickly bringup the codec up & running with better understanding
Awaiting for your replies
Many Many Thanks in advance.