pair. If all the pairs are not used, users can adjust the channel number through the proc
file. The total channels number should be 10. Otherwise, the adjusted value cannot be
saved properly.
Now 7.1 audio codec driver supports calling ASRC driver for memroy > ASRC >
perripheral(ESAI TX). The input audio file is convert into board defined sampling
rate(for example, 48khz). This use case only supports 2-channel or 6-channel playback.
To call this use case, perform the the following steps::
• Call aplay -l | grep ASRC to get the card number and device number of playback
PCM. The device name is CS42888_ASRC. For example, the card number is 0 and
the device number is 1.
• Play the audio file with the card0device1 device. For example, aplay -Dplughw:0,1
$AUDIO_FILE.
26.2.1 Sequence for Memory to ASRC to Memory
• Start the /dev/mxc_asrc device.
• Request ASRC pair. (ASRC_REQ_PAIR)
• Configure ASRC pair. (ASRC_CONIFG_PAIR)
• Start ASRC. (ASRC_START_CONV)
• Write the raw audio data (to be converted) into the user maintained input buffer. Fill
asrc_convert_buffer struct with input/output buffer length and address. Driver would
copy output data to user maintained output buffer address according to the output
buffer size. Repeat this step until all data is converted. (ASRC_CONVERT)
• Stop ASRC conversion: (ASRC_STOP_CONV)
• Release ASRC pair. (ASRC_RELEASE_PAIR)
• Shut down the /dev/mxc_asrc device.
26.2.2 Sequence for Memory to ASRC to Peripheral
Memory to ASRC to peripheral audio path is involved in 7.1 audio codec driver. In 7.1
audio sound card, a new device with the name of CS42888_ASRC is specified for
playback with ASRC. The steps below show the flow of calling ASRC to memroy to
peripheral:
• The sound device (PCM) has been registered and start to enable the DMA channel in
ALSA driver.
• Request ASRC pair. (asrc_req_pair)
• Configure ASRC pair. (asrc_config_pair)
Chapter 26 Asynchronous Sample Rate Converter (ASRC) Driver
i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013
Freescale Semiconductor, Inc.
193