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.

Switching from McASP2 to McASP0 does not have audio output

Hi, All

We are working on a modified DM8168 EVM, which changes from McASP2 to McASP0 for audio output. After changing codes like below, We tried to read signals from an oscilloscope, but could not found any audio output from McASP0, not even any clock signals. 

/*board-ti8168evm.c*/

static struct snd_platform_data ti81xx_evm_snd_data = {
.tx_dma_offset = 0x46000000,
.rx_dma_offset = 0x46000000,
.op_mode = DAVINCI_MCASP_IIS_MODE,
.num_serializer = ARRAY_SIZE(ti8168_iis_serializer_direction),
.tdm_slots = 2,
.serial_dir = ti8168_iis_serializer_direction,
.asp_chan_q = EVENTQ_2,
.version = MCASP_VERSION_2,
.txnumevt = 1,
.rxnumevt = 0,
};

/*devices.c*/

static struct resource ti81xx_mcasp_resource[] = {
{
.name = "mcasp",
.start = TI81XX_ASP0_BASE,
.end = TI81XX_ASP0_BASE + (SZ_1K * 12) - 1,
.flags = IORESOURCE_MEM,
},
/*TX event*/
{
.start = TI81XX_DMA_MCASP0_AXEVT,
.end = TI81XX_DMA_MCASP0_AXEVT,
.flags = IORESOURCE_DMA,
},
/*RX event*/
{
.start = TI81XX_DMA_MCASP0_AREVT,
.end = TI81XX_DMA_MCASP0_AREVT,
.flags = IORESOURCE_DMA,
},
};

static struct platform_device ti81xx_mcasp_device = {
.name = "davinci-mcasp",
.id = 0,
.num_resources = ARRAY_SIZE(ti81xx_mcasp_resource),
.resource = ti81xx_mcasp_resource,
};

/*davinci-evm.c*/

static struct snd_soc_dai_link ti81xx_evm_dai = {
.name = "CS42L52",
.stream_name = "CS42L5X",
.cpu_dai_name = "davinci-mcasp.0",
.codec_dai_name = "cs42l52-hifi",
.codec_name = "cs42l52-codec.1-004b",
.platform_name = "davinci-pcm-audio",
.init = evm_aic3x_init,
.ops =&evm_ops,
};

On application layer, when we play an wav, like : aplay -vv /usr/share/sounds/alsa/Front_Center.wav, it got stuck as below

Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
Plug PCM: Route conversion PCM (sformat=S16_LE)
Transformation table:
0 <- 0
1 <- 0
Its setup is:
stream : PLAYBACK
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 1
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 32768
period_size : 2048
period_time : 42666
tstamp_mode : NONE
period_step : 1
avail_min : 2048
period_event : 0
start_threshold : 32768
stop_threshold : 32768
silence_threshold: 0
silence_size : 0
boundary : 1073741824
Slave: Hardware PCM card 0 'VENUE R4 EVM' device 0 subdevice 0
Its setup is:
stream : PLAYBACK
access : MMAP_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 32768
period_size : 2048
period_time : 42666
tstamp_mode : NONE
period_step : 1
avail_min : 2048
period_event : 0
start_threshold : 32768
stop_threshold : 32768
silence_threshold: 0
silence_size : 0
boundary : 1073741824
appl_ptr : 0
hw_ptr : 0
# + | 36%

Our guess is DMA transfer didn't actually happen and application is waiting for available tx buffer.

Any one who encountered and solved this ?