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.
Tool/software:
Hi expert,
I did some tests with different configuration about struct snd_soc_dai_driver, the results are as below:
configuration one:
static struct snd_soc_dai_driver pcm3168a_dais[] = { { .name = "pcm3168a-dac", .id = PCM3168A_DAI_DAC, .playback = { .stream_name = "Playback", .channels_min = 1, .channels_max = 8, .rates = SNDRV_PCM_RATE_8000_192000, .formats = PCM3168A_FORMATS }, .ops = &pcm3168a_dai_ops }, { .name = "pcm3168a-adc", .id = PCM3168A_DAI_ADC, .capture = { .stream_name = "Capture", .channels_min = 1, .channels_max = 6, .rates = SNDRV_PCM_RATE_8000_96000, .formats = PCM3168A_FORMATS }, .ops = &pcm3168a_dai_ops }, };
result: When aplay mono(stereo) wav file, VOUT1\VOUT2 have audio signal, VOUT3\VOUT4\VOUT5\VOUT6\VOUT7\VOUT8 don't have aduio signal.
When aplay eight-channel wav file, VOUT1\VOUT2 VOUT3\VOUT4\VOUT5\VOUT6\VOUT7\VOUT8 all have aduio signal.
configuration 2:
static struct snd_soc_dai_driver pcm3168a_dais[] = { { .name = "pcm3168a-dac", .id = PCM3168A_DAI_DAC, .playback = { .stream_name = "Playback", .channels_min = 1, .channels_max = 4, .rates = SNDRV_PCM_RATE_8000_192000, .formats = PCM3168A_FORMATS }, .ops = &pcm3168a_dai_ops }, { .name = "pcm3168a-adc", .id = PCM3168A_DAI_ADC, .capture = { .stream_name = "Capture", .channels_min = 1, .channels_max = 6, .rates = SNDRV_PCM_RATE_8000_96000, .formats = PCM3168A_FORMATS }, .ops = &pcm3168a_dai_ops }, };
result: When aplay mono(stereo) wav file, VOUT1\VOUT2 have audio signal, VOUT3\VOUT4\VOUT5\VOUT6\VOUT7\VOUT8 don't have aduio signal.
When aplay eight-channel wav file, VOUT1\VOUT2 VOUT3\VOUT4\VOUT5\VOUT6\VOUT7\VOUT8 all have aduio signal.
When aplay eight-channel wav file, how come VOUT5\VOUT6\VOUT7\VOUT8 also have aduio signal?
configuration three:
static struct snd_soc_dai_driver pcm3168a_dais[] = { { .name = "pcm3168a-dac", .id = PCM3168A_DAI_DAC, .playback = { .stream_name = "Playback", .channels_min = 7, .channels_max = 8, .rates = SNDRV_PCM_RATE_8000_192000, .formats = PCM3168A_FORMATS }, .ops = &pcm3168a_dai_ops }, { .name = "pcm3168a-adc", .id = PCM3168A_DAI_ADC, .capture = { .stream_name = "Capture", .channels_min = 1, .channels_max = 6, .rates = SNDRV_PCM_RATE_8000_96000, .formats = PCM3168A_FORMATS }, .ops = &pcm3168a_dai_ops }, };
result:
When aplay mono(stereo) wav file, VOUT1\VOUT2\VOUT3\VOUT4\VOUT5\VOUT6\VOUT7\VOUT8 all have aduio signal.
When aplay eight-channel wav file, VOUT1\VOUT2 VOUT3\VOUT4\VOUT5\VOUT6\VOUT7\VOUT8 all have aduio signal.
What i want ask:
1. What's the particularly meaning of channels_min\channels_max in PCM3168A?
At context playback, what's the corresponding relationship among channels_min\channels_max, DIN1-DIN4, VOUT1-VOUT8?
At context capture, what's the corresponding relationship among channels_min\channels_max, DOUT1-DOUT3, VIN1-VIN6?
2. If it's possible to have four playback devices(such as pcmC0D0p,pcmC0D1p,pcmC0D2p,pcmC0D3p), pcmC0D0p is bind to VOUT1&VOUT2, pcmC0D1p is bind to VOUT3&VOUT4,pcmC0D2p is bind to VOUT5&VOUT6,pcmC0D3p is bind to VOUT7&VOUT8?
so that when use pcmC0D0p to playback wav(mono\stereo\three-channel\four-channel\...\eight-channel) file,just VOUT1&VOUT2 can hear sound and VOUT3-VOUT8 can't hear sound; when use pcmC0D1p to playback wav(mono\stereo\three-channel\four-channel\...\eight-channel) file,just VOUT3&VOUT4 can hear sound and the other six can't hear sound;when use pcmC0D2p to playback wav(mono\stereo\three-channel\four-channel\...\eight-channel) file,just VOUT5&VOUT6 can hear sound and the other six can't hear sound;when use pcmC0D3p to playback wav(mono\stereo\three-channel\four-channel\...\eight-channel) file,just VOUT7&VOUT8 can hear sound and the other six can't hear sound.
Thanks & Best Regards!
Hi Xiao,
1. What's the particularly meaning of channels_min\channels_max in PCM3168A?
The channels_min \ channels_max correspond to the minimum and maximum number of audio files that can be supported.
I have to remind you that's a function will fix the channel_max, -- pcm3168a_update_fixup_pcm_stream(), which will fix the playback.channels_max to be 8, and capture.channels_max to be 6.
2. If it's possible to have four playback devices(such as pcmC0D0p,pcmC0D1p,pcmC0D2p,pcmC0D3p), pcmC0D0p is bind to VOUT1&VOUT2, pcmC0D1p is bind to VOUT3&VOUT4,pcmC0D2p is bind to VOUT5&VOUT6,pcmC0D3p is bind to VOUT7&VOUT8?
That's what we haven't tried. You can add members of the pcm3168a_dais array to add playback devices. But then the pcm3168a_dai_opswill have to be modified, and that will be a more complicated part.
Regards
Kevin