About adau1961 driver

I found the  macro in here https://github.com/analogdevicesinc/linux/blob/adau17x1/sound/soc/codecs/adau17x1.h

#define ADUA_SERIAL_PORT1_BCLK32          (0x0 << 5)

#define ADUA_SERIAL_PORT1_BCLK48          (0x1 << 5)

#define ADUA_SERIAL_PORT1_BCLK64          (0x2 << 5)

But I am strange that on page 55 of datasheet

Table 41. Serial Port Control 1 Register

Bits Bit Name Description

[7:5] BPF[2:0] Number of bit clock cycles per LRCLK audio frame.

Setting Bit Clock Cycles

000 64 (default)

001 32

010 48

011 128

100 256

who is right one ?

I am also puzzle that why  the Headphone playback switch is alway on  but my lineout switch always off?

numid=14,iface=MIXER,name='Headphone Playback Switch'

  ; type=BOOLEAN,access=rw------,values=2

  : values=on,on

numid=13,iface=MIXER,name='Headphone Playback Volume'

  ; type=INTEGER,access=rw---R--,values=2,min=0,max=63,step=0

  : values=37,37

  | dBscale-min=-57.00dB,step=1.00dB,mute=0

There is no script in the filesystem do such behavior.

Can anybody tell me why?

I use PLL, so the core clock is 1024fs =1024*44.1kHz, My MCLK input is 24MHz,

How to set or configure the BCLK? The BCLK and LRCLK of ADAU1961 is master.

Thank you

Parents
  • Hi,

    This is most likely a bug in the driver. Thanks for reporting it, I'll fix it.

    Do the Headphone/Lineout switches stay On/Off even if you toggle them?

    Do you mean the BCLK rate or the number of BCLKs per frame? The driver will set the BCLK rate based on the selected sample rate by the userspace program. You need to tell the adau1761 driver the input clock rate though. This is done in your ASoC board driver using snd_soc_dai_set_pll(). See the Example DAI configuration section in the ADAU1761 Linux driver documentation. For I2S mode the number of BLCKs per frame is fixed to 64, in TDM mode it can be configured using snd_soc_dai_set_tdm_slot().

    - Lars

Reply
  • Hi,

    This is most likely a bug in the driver. Thanks for reporting it, I'll fix it.

    Do the Headphone/Lineout switches stay On/Off even if you toggle them?

    Do you mean the BCLK rate or the number of BCLKs per frame? The driver will set the BCLK rate based on the selected sample rate by the userspace program. You need to tell the adau1761 driver the input clock rate though. This is done in your ASoC board driver using snd_soc_dai_set_pll(). See the Example DAI configuration section in the ADAU1761 Linux driver documentation. For I2S mode the number of BLCKs per frame is fixed to 64, in TDM mode it can be configured using snd_soc_dai_set_tdm_slot().

    - Lars

Children
No Data