Community
cancel
Showing results for 
Search instead for 
Did you mean: 
HC_R
New Contributor I
964 Views

I2S - TXD line doesn't have data

Hi

I have edited the yocto kernel to send out I2S data from the I2S_2 interface in Intel Edison (which ouputs PCM/TDM by default). So as per this forum post I edited the file linux/sound/soc/intel/platform-libs/controls_v2_dpcm.c

as

Original Edited

[SST_SSP2] = {

[SST_SSP_CODEC_MUX] = {

[SST_SSP_CODEC_DOMAIN] = {

.ssp_id = SSP_CODEC,

.bits_per_slot = 24,

.slots = 4,

.ssp_mode = SSP_MODE_MASTER,

.pcm_mode = SSP_PCM_MODE_NETWORK,

.duplex = SSP_DUPLEX,

.ssp_protocol = SSP_MODE_PCM,

.fs_width = 1,

.fs_frequency = SSP_FS_48_KHZ,

.active_slot_map = 0xF,

.start_delay = 0,

},

},

},

[SST_SSP2] = {

[SST_SSP_CODEC_MUX] = {

[SST_SSP_CODEC_DOMAIN] = {

.ssp_id = SSP_CODEC,

.bits_per_slot = 24,

.slots = 2,

.ssp_mode = SSP_MODE_MASTER,

.pcm_mode = SSP_PCM_MODE_NORMAL,

.duplex = SSP_DUPLEX,

.ssp_protocol = SSP_MODE_I2S,

.fs_width = 24,

.fs_frequency = SSP_FS_48_KHZ,

.active_slot_map = 0x3,

.start_delay = 1,

},

},

},

recompiled the kernel and flashed to Edison + enabled mux for I2S pin configuration + edited /usr/share/alsa/alsa.conf and set the default card to card '1'. + played a .wav file using aplay and probed the lines. I could only see activity in BCLK and FS lines, there was no activity in TXD line.

What could be the reason for this behavior ?

9 Replies
idata
Community Manager
54 Views

Hi,

 

 

All changes seem to be made within the accepted paramenters.

 

A couple of questions, why do you set 0x3 as .active_slot_map? How did you enabled muxing for I2S, did you follow any guide? What are the contents of your /usr/share/alsa/alsa.conf file?

 

 

What steps did you follow to recompile the kernel?

 

 

Sergio

 

HC_R
New Contributor I
54 Views

why do you set 0x3 as .active_slot_map?

I just reffered from the post I've mentioned above , should i change it to some other value for I2S operation ?

How did you enabled muxing for I2S, did you follow any guide?

I configured the pins properly cz I can see the PCM data output properly so I assume all the pin muxing and pull configurations are correct

What are the contents of your /usr/share/alsa/alsa.conf file?

I changed the /usr/share/alsa/alsa.conf file's

defaults.ctl.card 0

defaults.pcm.card 0

to

defaults.ctl.card 1

defaults.pcm.card 1

idata
Community Manager
54 Views

Take a look at this link https://github.com/ZenfoneArea/android_kernel_asus_zenfone5/blob/master/linux/kernel/sound/soc/intel... https://github.com/ZenfoneArea/android_kernel_asus_zenfone5/blob/master/linux/kernel/sound/soc/intel... . In the static const struct sst_ssp_config function are described the [SST_SSP0], [SST_SSP1] and [SST_SSP2].

 

 

Can you try to try the SSP2 port tested configuration from the Audio setup guide section 2.1.3.

 

The Audio setup guide can be found here http://www.intel.com/content/www/us/en/support/boards-and-kits/000005983.html http://www.intel.com/content/www/us/en/support/boards-and-kits/000005983.html .

 

What is your main goal of changing the original [SST_SSP2], to use .ssp_protocol = SSP_MODE_I2S?

 

 

Sergio

 

idata
Community Manager
54 Views

Hi Hari_CR,

 

 

Do you still need help with this thread, did you find our last suggestion helpful?

 

 

-Sergio

 

HC_R
New Contributor I
54 Views

Hi Sergio

What I found in the link was the default configuration of Edison Image, (what we can see in controls_v2_dpcm.c) and it is in dpcm mode. So that Edison outputs PCM data as 4 slot TDM in 24 bits mode with 48Khz sampling rate .

What I'm trying to do is to output I2S data via I2S_2 interface so the configuration has to be changed from PCM to I2S.

Any thoughts how to configure for that ?

-hari

DAppu
Beginner
54 Views

Hi,

Referring to same issue as mentioned by Hari.

We are using MAX98357A chip as codec. This chip supports two modes of operation.

1. TDM mode - MAX98357A supports 16/32 bit , 8 channel data in this mode. It seems to be quite important for this codec that the number of channels is set to 8 and does _not_ seem to support less than that many slots. So there should be either 16x8 or 32x8 bclk clock cycles between each FS sync pulses. We tried to modify the Kernel to output data in this format but was not successful. We had raised this issue in the following thread -

2. I2S mode - standard I2S protocol data in 16/24/32 bit frames. For this we did the modifications as Hari mentioned above. This is also not been successful yet. We are not seeing any data in the TXD line.

Please advise if you have any comments on this.

Thanks.

Br,

Deepa

idata
Community Manager
54 Views

Hi Hari_CR and Deepa_Appu,

We'll investigate on your inquiries and reply back to this thread soon.

-Sergio

 

idata
Community Manager
54 Views

Hi Hari_CR,

 

 

Have you tried the lookback test? You can check how to do loopback tests on the Audio Guide https://software.intel.com/en-us/articles/intel-edison-audio-setup-guide-0 https://software.intel.com/en-us/articles/intel-edison-audio-setup-guide-0

 

 

Let us know your results.

 

 

-Sergio

 

idata
Community Manager
54 Views

Hi Hari_CR,

 

 

Do you still need help with this thread, have you tried our latest suggestion?

 

 

-Sergio