clu
clu

Reputation: 1

RPi Linux Audio driver for 8 channels Codec

I would like to interface my RPi with an audio device that is using PCM audio communication (DA14AVDDECT). This device is used to make calls using DECT protocol. It is possile to make 8 calls at the same time and I would like to retrieve the audio (RX/TX) of each call as "seperate audio devices" on the RPi. The device can be programmed as a PCM slave and the RPi will be the master.

Regarding the PCM parameters, I need to use :

I have already looked inside the Linux kernel drivers and codecs. I managed to understand how to generate the PCM ModeA clock using these parameters in struct snd_soc_dai_link with .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS .

My final goal is to be able to use these audio channels seperately to use them to make indepedant VoIP calls.

Thank you for your help!

What are already tried :

I added dtoverlay=i2s-dac in config.txt

I modified ./sound/soc/bcm/rpi-simple-soundcard.c with :

static struct snd_soc_dai_link snd_rpi_dac_dai[] = {
{
        .name           = "RPi-DAC",
        .stream_name    = "RPi-DAC HiFi",
        .dai_fmt        = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF |
                                SND_SOC_DAIFMT_CBS_CFS,
        SND_SOC_DAILINK_REG(rpi_dac),
},

I modified ./sound/soc/codecs/pcm1794a.c with :

static struct snd_soc_dai_driver pcm1794a_dai = {
        .name = "pcm1794a-hifi",
        .playback = {
                .channels_min = 2,
                .channels_max = 8,
                .rates = SNDRV_PCM_RATE_16000,
                .formats = SNDRV_PCM_FMTBIT_S16_LE |
                           SNDRV_PCM_FMTBIT_S24_LE
        },
};

I got the expected FRAME/SYNC clock and the frequency of the bit clock is 16 kHz.

Upvotes: 0

Views: 71

Answers (0)

Related Questions