Skip to content

Commit 264353f

Browse files
author
Codrin Ciubotariu
committed
ASoC: atmel: Add ASRC driver
The Asynchronous Sample Rate Converter (ASRC) converts the sample rate of an incoming audio frame without affecting quality. It supports input and output sampling rates up to 192 kHz. It is made of 4 independent digital signal processing modules (DSP). Each DSP can be configured with specific input and output sampling frequencies and is associated to oneof the DMA channels. Each DSP can process mono or stereo audio stream. Data can be provided to the DSPs via up to four input channels and data can be read from the DSPs via up to 4 output channels. A channel comprises a holding register that can be accessed via software or via a channel of the central DMA. The ASRC generates the trigger events for the central DMA. Up to 8 channels are available. Depending on the channel index and its configuration, a channel manages from one up to eight audio frames. The ASRC can be configured to process up to four stereo audio streams in a fully independent manner. Input/out sampling frequencies differ for each DSP. The ASRC supports TDM audio stream. ASRC is capable to concatenate/split audio streams while resampling frequencies. The ASRC can be configured to resample and merge several audio input sources of the same or of different sampling frequencies carried by several DMA channels into a single output audio stream sampled at a unique frequency and carried on a single DMA channel (TDM audio stream creation from multiple sources). The ASRC can also split and resample audio streams (e.g. TDM stream) carried on a single DMA channel to multiple audio streams, each having the same or different resampling frequencies. Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
1 parent a2988a3 commit 264353f

5 files changed

Lines changed: 3121 additions & 0 deletions

File tree

sound/soc/atmel/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,4 +176,17 @@ config SND_MCHP_SOC_PDMC
176176
2 data lines. The signal path includes an audio grade programmable
177177
decimation filter and outputs 24-bit audio words.
178178

179+
config SND_MCHP_SOC_ASRC
180+
tristate "Microchip ASoC driver for boards using ASRC"
181+
depends on OF && (ARCH_AT91 || COMPILE_TEST)
182+
select SND_SOC_GENERIC_DMAENGINE_PCM
183+
select REGMAP_MMIO
184+
help
185+
Say Y or M if you want to add support for Microchip ASRC ASoC
186+
driver on the following Microchip platforms:
187+
- sama7g5
188+
189+
The Asynchronous Sample Rate Converter (ASRC) converts the sample
190+
rate of an incoming audio frame without affecting quality. It
191+
supports input and output sampling rates up to 192 kHz.
179192
endif

sound/soc/atmel/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ snd-soc-mchp-i2s-mcc-objs := mchp-i2s-mcc.o
88
snd-soc-mchp-spdiftx-objs := mchp-spdiftx.o
99
snd-soc-mchp-spdifrx-objs := mchp-spdifrx.o
1010
snd-soc-mchp-pdmc-objs := mchp-pdmc.o
11+
snd-soc-mchp-asrc-objs := mchp-asrc.o mchp-asrc-dma.o
1112

1213
# pdc and dma need to both be built-in if any user of
1314
# ssc is built-in.
@@ -23,6 +24,7 @@ obj-$(CONFIG_SND_MCHP_SOC_I2S_MCC) += snd-soc-mchp-i2s-mcc.o
2324
obj-$(CONFIG_SND_MCHP_SOC_SPDIFTX) += snd-soc-mchp-spdiftx.o
2425
obj-$(CONFIG_SND_MCHP_SOC_SPDIFRX) += snd-soc-mchp-spdifrx.o
2526
obj-$(CONFIG_SND_MCHP_SOC_PDMC) += snd-soc-mchp-pdmc.o
27+
obj-$(CONFIG_SND_MCHP_SOC_ASRC) += snd-soc-mchp-asrc.o
2628

2729
# AT91 Machine Support
2830
snd-soc-sam9g20-wm8731-objs := sam9g20_wm8731.o

0 commit comments

Comments
 (0)