[alsa-devel] [question] Sample rate IC followed by DAC
Hi there,
I have a sample rate converter IC, which is followed by a DAC. This kind of setup :
SoC chip -> Sample rate conv. chip -> DAC chip
I also have the reverse for the ADC... but this question is about the DAC path.
How do you construct a machine driver for this setup ?
Only the Sample rate converter ICs use the SoC I2S bus, the DAC and ADC, sit outside the I2S scope of the SoC... however all chips require I2C control.
Unfortunately the silicon only supports an older 3.14 kernel.
Can it be something like this :
static struct snd_soc_dai_link sr_dai[] = { { .name = "Sample-rate-for-DAC", .stream_name = "playback 0", .cpu_dai_name = "nxp-i2s.0", .platform_name = "nxp-pcm", .codec_dai_name = "sample-rate-in", .codec_name = "sample-rate.4-0012", }, { .name = "DAC", .stream_name = "playback 0", .cpu_dai_name = "?????", .platform_name = "????", .codec_dai_name = "codec-in", .codec_name = "DAC.4-0010", }, };
thanks
Matt
Matt Flax wrote:
I have a sample rate converter IC, which is followed by a DAC. This kind of setup :
SoC chip -> Sample rate conv. chip -> DAC chip
What is the purpose of the converter? What problem does it solve?
How do you construct a machine driver for this setup ?
The original DAC driver will not work correctly, as far as sample rate settings are concerned.
Unfortunately the silicon only supports an older 3.14 kernel.
You mean, you paid for _no support_? And now are asking here instead? (Not that a newer kernel version would help ...)
Well, if your goal isn't a proper driver for upstream, just hack the existing DAC driver to access the other I²C device, when needed.
Regards, Clemens
On 04/11/16 22:31, Clemens Ladisch wrote:
Matt Flax wrote:
I have a sample rate converter IC, which is followed by a DAC. This kind of setup :
SoC chip -> Sample rate conv. chip -> DAC chip
What is the purpose of the converter? What problem does it solve?
It has a lower noise floor then libsamplerate.
How do you construct a machine driver for this setup ?
The original DAC driver will not work correctly, as far as sample rate settings are concerned.
Yes, I was expecting that. Tell me, even in the current ALSA version, is there any support for sample rate converter hardware chains ? Situations where we need to control standard codecs which a after sample rate converters.
Unfortunately the silicon only supports an older 3.14 kernel.
You mean, you paid for _no support_? And now are asking here instead? (Not that a newer kernel version would help ...)
It is the Nexell s5p6818 silicon, community only support at this point. Also I couldn't find any examples of sample rate converter hardware chains in linux/sound/soc ...
Well, if your goal isn't a proper driver for upstream, just hack the existing DAC driver to access the other I²C device, when needed.
Sure, I can do this. I can't find any examples on operating a codec within a codec. Would I export all function symbols and do it that way ?
Regards, Clemens
Matt Flax wrote:
On 04/11/16 22:31, Clemens Ladisch wrote:
Matt Flax wrote:
I have a sample rate converter IC, which is followed by a DAC. This kind of setup :
SoC chip -> Sample rate conv. chip -> DAC chip
What is the purpose of the converter? What problem does it solve?
It has a lower noise floor then libsamplerate.
Which chip is better than 145 dB?
How do you construct a machine driver for this setup ?
The original DAC driver will not work correctly, as far as sample rate settings are concerned.
Yes, I was expecting that. Tell me, even in the current ALSA version, is there any support for sample rate converter hardware chains ?
No.
Well, if your goal isn't a proper driver for upstream, just hack the existing DAC driver to access the other I²C device, when needed.
Sure, I can do this. I can't find any examples on operating a codec within a codec. Would I export all function symbols and do it that way ?
Export to where? You would just modify the existing DAC driver.
Regards, Clemens
On 06/11/16 22:21, Clemens Ladisch wrote:
Matt Flax wrote:
On 04/11/16 22:31, Clemens Ladisch wrote:
Matt Flax wrote:
I have a sample rate converter IC, which is followed by a DAC. This kind of setup :
SoC chip -> Sample rate conv. chip -> DAC chip
What is the purpose of the converter? What problem does it solve?
It has a lower noise floor then libsamplerate.
Which chip is better than 145 dB?
The AK4137EQ is better. However it also offloads the processing to hardware.
How do you construct a machine driver for this setup ?
The original DAC driver will not work correctly, as far as sample rate settings are concerned.
Yes, I was expecting that. Tell me, even in the current ALSA version, is there any support for sample rate converter hardware chains ?
No.
Well, if your goal isn't a proper driver for upstream, just hack the existing DAC driver to access the other I²C device, when needed.
Sure, I can do this. I can't find any examples on operating a codec within a codec. Would I export all function symbols and do it that way ?
Export to where? You would just modify the existing DAC driver.
OK, will do, thanks for the guidance.
Regards, Clemens
participants (2)
-
Clemens Ladisch
-
Matt Flax