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/TLV320AIC3XSW-LINUX: TLV320AIC as a master or as a slave

Part Number: TLV320AIC3XSW-LINUX
Other Parts Discussed in Thread: TLV320AIC3106

Tool/software: Linux

Hi Everyone..

We are using tlv320aic3x codec in our project and it is playing well.

I have a confusion regarding the configuration of codec..i.e whether it is acting as a master or a slave.

My device tree is :

&mcasp0 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&mcasp0_pins>;
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
1 2 0 0 /* Changing from 0 0 1 0 to 1 2 0 0 */

>;

tx-num-evt = <32>;
rx-num-evt = <32>;
};

mcasp0_pins: mcasp0_pins {

pinctrl-single,pins = <

AM33XX_IOPAD(0x860, PIN_INPUT_PULLDOWN | MUX_MODE6) /* mcasp0_aclkx*/
AM33XX_IOPAD(0x864, PIN_INPUT_PULLDOWN | MUX_MODE6) /* mcasp0_fsx*/
AM33XX_IOPAD(0x868, PIN_OUTPUT_PULLDOWN | MUX_MODE6) /* mcasp0_axr0*/
AM33XX_IOPAD(0x86c, PIN_INPUT_PULLDOWN | MUX_MODE6) /* mcasp0_axr1 */
>;
};

sound {
compatible = "simple-audio-card";
simple-audio-card,name = "TI BeagleBone Black";
simple-audio-card,widgets =
"Headphone", "Headphone Jack",
"Line", "Line In";
simple-audio-card,routing =
"Headphone Jack", "HPLOUT",
"Headphone Jack", "HPROUT",
"LINE1L", "Line In",
"LINE1R", "Line In";
simple-audio-card,format = "dsp_b";
simple-audio-card,bitclock-master = <&sound_master>;
simple-audio-card,frame-master = <&sound_master>;
simple-audio-card,bitclock-inversion;

simple-audio-card,cpu {
sound-dai = <&mcasp0>;
};

sound_master:simple-audio-card,codec {
sound-dai = <&tlv320aic3106>;
system-clock-frequency = <24000000>;
};

};

As it is written above..bitclock and frame master is the codec..but in the pin muxing we are using ACLKX and FSX which are for Transmit. 

Also we are using dma_event_intr0 .clkout1 for generating the master clock. As the processor is generating the master clock..it should be the master. But in device tree it is shown that the codec is the master.

Can anyone please explain me this that who is the master? and who is generating the bit and word clock
My codec is working fine. I am able to play from the custom board.

Thanks 
Deep