I determined that the secondary data lines of my SPORT were not being
enabled properly. With that problem solved I am finally seeing test
data sent to the DACs correctly. I am still having problems with
placing the data correctly using my custom PCM copy operation.
I do not understand the relationship between snd_pcm_period_elapsed
and the PCM copy and trigger functions. Where can I find a detailed
description of how this works?
I am attempting to troubleshoot this problem but it seems to change
based on values I enter into struct snd_pcm_hardware, which I copy to
substream->runtime->hw when the PCM open operation occurs. What are
the correct values for struct snd_pcm_hardware?
I have included the values I am currently using and a brief
description of the hardware configuration below:
I am using one Blackfin BF537 SPORT to transfer 16 channels of audio
to 2 CS42448 CODECs using TDM. There are 8 channels per TDM frame.
The Primary SPORT data lines are connected to one CS42448 and the
Secondary are connected to another. I use one DMA buffer of 131072
bytes and configure the DMA for 8 periods. I have to interleave the
channel data so that each CODEC receives one TDM frame for every frame
sync clock. With 8 channels in each TDM frame, there are 256 bits per
frame sync clock. The frame sync clock and bit clock are generated
from an ICS661 audio clock source configured for 12.288Mhz (256bits *
48Khz).
static struct snd_pcm_hardware ourCS42448PcmHw =
{
.info = (SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_RESUME),
.formats = SNDRV_PCM_FMTBIT_S32_LE,
.rates = SNDRV_PCM_RATE_48000,
.rate_min = 48000,
.rate_max = 48000,
.buffer_bytes_max = 32768,
.channels_min = 2,
.channels_max = 2,
.period_bytes_min = 4096,
.period_bytes_max = 4096,
.periods_min = 8,
.periods_max = 8,
};
Thanks,
Adam
Adam Rosenberg
Software Engineer
Alcorn McBride Inc.
3300 South Hiawassee
Building 105
Orlando, FL 32835
(407) 296 - 5800 ext. 5490