AnsweredAssumed Answered

adv7611 audio stream to iMX6

Question asked by alexandreur on Aug 25, 2016
Latest reply on Nov 8, 2016 by alexandreur

Hi.

I am connecting ADV7611 to iMX6Q under Linux kernel 3.14.

The video part is fine.

But I have a trouble with audio.

 

When I try to record the input audio I hear silence only. Nothing else happens.

No error messages etc. Silence only.

There were error before I went to the current settings shown below but they are now eliminated and I have no further idea what to do.

 

Since the chip generates 32 bit per channel as documented in the UG-180.pdf, pages 54-57 (main doc on ADV7611. also see the attached screenshot) but iMX6 cannot receive 32 bit data.

I suspect mismatch of word length.

 

What must I do to fix it?

Is it possible to extract 24 or 16 most significant bits from the 32-bit source stream without changing the input format?

How to program the SRCR and SRCCR registers correctly?

Or must I pay attention on other things? Which?

 

There is output from my adv driver showing content of audio registers:

adv7611 2-004c: Audio: pll locked, samples detected, enabled
adv7611 2-004c: Audio format: stereo
adv7611 2-004c: Audio CTS: 74250
adv7611 2-004c: Audio N: 6144
adv7611 2-004c: AV Mute: off

 

These CTS and N correspond to 48 kHz stream

 

the adv7611 connects to AUDMUX4_RXFS, _RXC, _RXD

since adv7611 is master and connections are made to Rxxx signals I decided to use the async mode

 

now part of DTS

&ssi1 {
fsl,mode = "i2s-slave";
fsl,ssi-asynchronous;
status = "okay";
};

/ {
sound_mydriver:mydriver {
compatible = "my,mydriver";
model = "mydriver-audio";
cpu-dai = <&ssi1>;
mux-int-port = <1>;
mux-ext-port = <4>;
};
};

.....

MX6QDL_PAD_DISP0_DAT18__AUD4_RXFS 0x130b0
MX6QDL_PAD_DISP0_DAT19__AUD4_RXC 0x130b0
MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0

.....

 

so AUDMUX ports are programmed 

int=0 ptcr/pdcr=def7b000 00006000

ext=3 ptcr/pdcr=00000000 00000000

 

now output from debugfs

port 1 (number 0 by API)

PDCR: 00006000
PTCR: def7b000
TxFS output from RxFS3, TxClk output from RxClk3
RxFS output from RxFS3, RxClk output from RxClk3
Data received from 3

 

port 4 (number 3 by API)

PDCR: 00000000
PTCR: 00000000
TxFS input, TxClk input
RxFS input, RxClk input
Data received from 0

 

part of my driver code about DAI settings

data->dai.name = "Mydriver HiFi";
data->dai.stream_name = "Mydriver HiFi stream";
data->dai.codec_dai_name = "snd-soc-dummy-dai";
data->dai.codec_name = "snd-soc-dummy";
data->dai.cpu_of_node = ssi_np;
data->dai.platform_of_node = ssi_np;
data->dai.capture_only = true;
data->dai.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBM_CFM;

 

 

How to overcome the silence?

Thanks!

Alex.

Outcomes