Skip to contentSkip to conversation

Add Voice Codec support for DaVinci platforms

PATCH In review Miguel Aguilar 3 participants 6 messages Jan 21, 2010 – Jan 25, 2010 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

cover Add Voice Codec support for DaVinci platforms

Hi,

The following patch series adds support for the Voice Codec in the Davinci platform and in this particular case for the DM365 EVM.

The DM365 EVM has two codecs the AIC3x and the Voice Codec, however at this point is not possible to have both enabled simultaneously since the soc-core doesn't support that, so a patch for enable both simultaneously will be sent when this support is available in the soc-core.

Regards,

Signature · 4 lines
Miguel Angel Aguilar Ulloa
Embedded Software Engineer
RidgeRun Embedded Solutions
[email protected]
#2 lore raw
In reply to a message not in the archive
Quoted 9 lines · Miguel Aguilar

Hi,

The following patch series adds support for the Voice Codec in the Davinci platform and in this particular case for the DM365 EVM.

The DM365 EVM has two codecs the AIC3x and the Voice Codec, however at this point is not possible to have both enabled simultaneously since the soc-core doesn't support that, so a patch for enable both simultaneously will be sent when this support is available in the soc-core.

I thought, perhaps incorrectly, that soc-core already has the ability to support multiple codecs. When I worked on ALSA soc support for DM6467, one of the McASP was connected to AIC3x and the other is SPDIF output. Both interface can work at the same time. I just assumed that if we have two McASP (or other audio controllers) connected to two codecs. They would both just work under ALSA soc. Please let me know if I'm mistaken.

Thanks,

Steve

#3 lore raw

Steve,

I'm not sure that this is the same case, please take a look into this thread between Mark and me, where I pointed the problem in the machine driver for handling the two codecs:

Quoted 38 lines

Hi Mark,

I have a specific doubt about the codec_dev element snd_soc_device struct of the DM365 EVM.

Since I have two codecs on the EVM, I have two snd_soc_codec_device structures:

* AIC3x

struct snd_soc_codec_device soc_codec_dev_aic3x = {
.probe = aic3x_probe,
.remove = aic3x_remove,
.suspend = aic3x_suspend,
.resume = aic3x_resume,
};

* Voice Codec

struct snd_soc_codec_device soc_codec_dev_cq93vc = {
.probe = cq93vc_probe,
.remove = cq93vc_remove,
.suspend = cq93vc_suspend,
.resume = cq93vc_resume,
};

But I can set only one at a time in the dm365_evm_snd_devdata:

/* evm audio subsystem */

static struct snd_soc_device dm365_evm_snd_devdata = {
   .card = &dm365_snd_soc_card_evm,

***
.codec_dev = &soc_codec_dev_aic3x,
or
.codec_dev = &soc_codec_dev_cq93vc,
***
.codec_data = &aic3x_setup,
};

Quoted 5 lines

So in case what is the proper way to do this?

Thanks,

Miguel Aguilar

Mark's answer:

Quoted 4 lines · Miguel Aguilar
Quoted 3 lines

But I can set only one at a time in the dm365_evm_snd_devdata:

...

Quoted 8 lines
Quoted 1 line

So in case what is the proper way to do this?

For now use an ifdef in the machine driver. There's some work due to begin fairly shortly (I've CCed in my co-maintainer Liam who's actually going to be doing the work) to allow multiple CODECs to work simultaneously, if you put the ifdef in the machine driver now then it should be straightforward to update the machine driver to make use of this new feature when it's ready.

Regards,
Miguel Aguilar

Quoted 23 lines · Steve Chen
Quoted 9 lines · Miguel Aguilar

Hi,

The following patch series adds support for the Voice Codec in the Davinci platform and in this particular case for the DM365 EVM.

The DM365 EVM has two codecs the AIC3x and the Voice Codec, however at this point is not possible to have both enabled simultaneously since the soc-core doesn't support that, so a patch for enable both simultaneously will be sent when this support is available in the soc-core.

I thought, perhaps incorrectly, that soc-core already has the ability to support multiple codecs. When I worked on ALSA soc support for DM6467, one of the McASP was connected to AIC3x and the other is SPDIF output. Both interface can work at the same time. I just assumed that if we have two McASP (or other audio controllers) connected to two codecs. They would both just work under ALSA soc. Please let me know if I'm mistaken.

Thanks,

Steve

#4 lore raw
In reply to Steve Chen
Quoted 15 lines · Steve Chen
Quoted 6 lines · Miguel Aguilar

Hi,

The following patch series adds support for the Voice Codec in the Davinci
platform and in this particular case for the DM365 EVM.

Quoted 7 lines

The DM365 EVM has two codecs the AIC3x and the Voice Codec, however at this
point is not possible to have both enabled simultaneously since the soc-core
doesn't support that, so a patch for enable both simultaneously will be sent
when this support is available in the soc-core.

Quoted 9 lines

I thought, perhaps incorrectly, that soc-core already has the ability to
support multiple codecs. When I worked on ALSA soc support for DM6467,
one of the McASP was connected to AIC3x and the other is SPDIF output. Both interface can work at the same time. I just assumed that if we have two McASP (or other audio controllers) connected to two codecs. They would both just work under ALSA soc. Please let me know if I'm mistaken.

It can only cope with one CODEC with registers. That S/PDIF interface has no registers so could be made to work.

#6 lore raw
In reply to a message not in the archive
Quoted 27 lines · Mark Brown
Quoted 15 lines · Steve Chen
Quoted 6 lines · Miguel Aguilar

Hi,

The following patch series adds support for the Voice Codec in the Davinci
platform and in this particular case for the DM365 EVM.

Quoted 7 lines

The DM365 EVM has two codecs the AIC3x and the Voice Codec, however at this
point is not possible to have both enabled simultaneously since the soc-core
doesn't support that, so a patch for enable both simultaneously will be sent
when this support is available in the soc-core.

Quoted 9 lines

I thought, perhaps incorrectly, that soc-core already has the ability to
support multiple codecs. When I worked on ALSA soc support for DM6467,
one of the McASP was connected to AIC3x and the other is SPDIF output. Both interface can work at the same time. I just assumed that if we have two McASP (or other audio controllers) connected to two codecs. They would both just work under ALSA soc. Please let me know if I'm mistaken.

Quoted 2 lines

It can only cope with one CODEC with registers. That S/PDIF interface has no registers so could be made to work.

I just pull up the code and looked at it again. You are right. Sorry about the noise.

Steve

#7 lore raw
In reply to Miguel Aguilar
Quoted 2 lines · Miguel Aguilar

The following patch series adds support for the Voice Codec in the Davinci platform and in this particular case for the DM365 EVM.

All the other patches for this look good.