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.

Am335x Mcasp I2S as master and codec as the slave

Other Parts Discussed in Thread: TLV320DAC3100, TLV320AIC3106

HI,

     First: we are not getting any clocks out -- CLKOUT1 , BCLK and WCLK , which is same as Sitara EVM Starter kit configuration.

     later we changed the pinmux - as I2S as Mater and Codec as Slave - so we have to made IO's as OUTPUT_PULLUP. 

     we are getting CLOCKOUT1-->MCLK: 378HZ instead of 24MHZ and ACLK->BCLK(getting a spike while aplay command ) and FSX->WCLK has NO Clock, 

DTS PINMUX: to get Clocks out 

clkout1_pin: pinmux_clkout1_pin {
    pinctrl-single,pins = <
                                            0x1b0 (PIN_OUTPUT_PULLUP | MUX_MODE3) /* xdma_event_intr0.clkout1 */
                                  >;
};

mcasp1_pins: mcasp1_pins {
    pinctrl-single,pins = <
                                            0x10c (PIN_OUTPUT_PULLUP | MUX_MODE4) /* mii1_crs.mcasp1_aclkx */      // as I2S act as master -  ACLK 
                                            0x110 (PIN_OUTPUT_PULLUP | MUX_MODE4) /* mii1_rxerr.mcasp1_fsx */      // WCLK
                                            0x108 (PIN_OUTPUT_PULLUP | MUX_MODE4) /* mii1_col.mcasp1_axr2 */       // TX
                                            0x144 (PIN_INPUT_PULLDOWN | MUX_MODE4) /* rmii1_ref_clk.mcasp1_axr3 */ //RX
                                    >;
};

we are not able to find,  why clock are getting out -- we done only necessary changes for the codec change only default TLV320AIC3106 to TLV320DAC3100. 

log for the aplay cmd: codec is detected and registered with ALSA LIST.

[ 3.240622] platform 4a100000.ethernet: omap_device_late_idle: enabled but no driver. Idling
[ 3.249861] ALSA device list:
[ 3.252992] #0: AM335x-EVMSK
[ 3.271711] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 3.280417] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[ 3.291118] devtmpfs: mounted

......................

ALSA: Restoring mixer settings...
No state is present for card AM335xEVMSK
Found hardware: "AM335x-EVMSK" "" "" "" ""
Hardware is initialized using a generic method
No state is present for card AM335xEVMSK

a/Front_Center.wav s/devices/sound.10/TLV320AIC31XX# aplay /usr/share/sounds/alsa
[ 1304.662838] davinci_mcasp_startup:dir:1 substream->stream:0
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
[ 1304.678412] aic31xx_set_dai_sysclk
[ 1304.684561] davinci_mcasp_set_sysclk:mcasp->sysclk_freq:24000000 ; dir:1
[ 1304.691683] aic31xx_hw_params
[ 1304.695347] aic31xx_setup_pll
[ 1304.705986] davinci_mcasp_hw_params:mcasp->sysclk_freq:24000000
[ 1304.712373] mcasp_common_hw_param
[ 1304.715962] mcasp->serial_dir[2]:1,
[ 1304.719762] mcasp_i2s_hw_param:active_serializers:1
[ 1304.724888] davinci_mcasp_hw_params:word_length:16
[ 1304.735049] davinci_mcasp_trigger:CMD:1
[ 1304.739205] davinci_mcasp_start:
[ 1304.742596] mcasp_start_tx:
[ 1304.745549] mcasp_start_tx:tdm_slots:2, op_mode:0,num_serializer:4,txnumevt:32,rxnumevt:32
[ 1304.754228] mcasp_start_tx:wait for XDATA to be cleared
[ 1304.759720] mcasp_start_tx:enable transmit underrun IRQ
[ 1304.765214] mcasp_start_tx:After IRQ enable transmit underrun IRQ
^CAborted by signal Interrupt...
aplay: pcm_write[ 1307.181603] davinci_mcasp_trigger:CMD:0
[ 1307.189231] mcasp_stop_tx:
:1939: write error: Interrupted system call

this is the state of the codec:

root@am335x-evm:/sys/devices/sound.10/TLV320AIC31XX# cat dapm_widget
SPK ClassD: Off
MICBIAS: Off
MIC_GAIN_CTL: Off
ADC: Off
SPK ClassD: Off
HPR Driver: Off
HPL Driver: Off
Output Right: Off
Output Left: Off
DAC Right: Off
DAC Left: Off
PM State: Standby
root@am335x-evm:/sys/devices/sound.10/TLV320AIC31XX#

how to enable these codec features -- do we need to change any thing in the codec driver -- to enable these.

regards,

Viswanath K.

CLKOUT1: need to get 24MHZ but getting 374HZ.