* ASOC, SPDIF and AC97
@ 2008-05-27 18:16 Jon Smirl
2008-05-28 10:14 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Jon Smirl @ 2008-05-27 18:16 UTC (permalink / raw)
To: ALSA-devel
I'm back to working on an ASOC driver for the STAC9766 used in the
MPC5200 based Efika.
I'm having trouble with SPDIF. I can make two devices like this in the
codec file. But how do I get the SPDIF device hooked up to the right
AC97 slot, 10/11? Are any of the ASOC codecs implementing SPDIF?
I also see that the STAC9766 is missing an ac97_patch. From my reading
of the datasheet it needs somethings fixed up.
Does the ac97 support belong in the PCI directory? It took me a while
to locate it while working on ASOC. With a model more like ASOC
codecs, the AC97 patches could be pushed into the codec files.
static struct snd_soc_dai stac9766_dai[] = {
{
.name = "STAC9766-Analog",
.id = 0,
/* stream cababilities */
.playback = {
.stream_name = "STAC9766 Analog",
.channels_min = 1,
.channels_max = 6,
.rates = STAC9766_RATES,
.formats = SNDRV_PCM_FMTBIT_S16,
},
.capture = {
.stream_name = "STAC9766 Analog",
.channels_min = 1,
.channels_max = 2,
.rates = STAC9766_RATES,
.formats = SNDRV_PCM_FMTBIT_S16,
},
/* alsa ops */
.prepare = ac97_analog_prepare,
},
{
.name = "stac9766-S/PDIF",
.id = 1,
/* stream cababilities */
.playback = {
.stream_name = "STAC9766 Digital",
.channels_min = 1,
.channels_max = 2,
.rates = STAC9766_RATES,
.formats = SNDRV_PCM_FMTBIT_S16,
},
/* alsa ops */
.prepare = ac97_digital_prepare,
}};
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ASOC, SPDIF and AC97
2008-05-27 18:16 ASOC, SPDIF and AC97 Jon Smirl
@ 2008-05-28 10:14 ` Mark Brown
2008-05-28 13:40 ` Jon Smirl
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2008-05-28 10:14 UTC (permalink / raw)
To: Jon Smirl; +Cc: ALSA-devel
On Tue, May 27, 2008 at 02:16:54PM -0400, Jon Smirl wrote:
> I'm having trouble with SPDIF. I can make two devices like this in the
> codec file. But how do I get the SPDIF device hooked up to the right
> AC97 slot, 10/11? Are any of the ASOC codecs implementing SPDIF?
None that I know of implementing SPDIF (or at least, none with driver
support for it) but it might be worth taking a look at the PXA2xx AC97
controller support - it implements supports for AC97 timeslots beyond
the base playback and record channels.
Briefly, the approach is to provide a DAI in the AC97 controller driver
which handles the relevant AC97 timeslots and a DAI in the CODEC driver
which does the CODEC side of things then match the two together.
> I also see that the STAC9766 is missing an ac97_patch. From my reading
> of the datasheet it needs somethings fixed up.
> Does the ac97 support belong in the PCI directory? It took me a while
> to locate it while working on ASOC. With a model more like ASOC
> codecs, the AC97 patches could be pushed into the codec files.
The ASoC AC97 support doesn't use the AC97 patch infrastructure at all -
it's completely independent so things are pretty much as you describe,
everything is in the CODEC drivers.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ASOC, SPDIF and AC97
2008-05-28 10:14 ` Mark Brown
@ 2008-05-28 13:40 ` Jon Smirl
2008-05-28 16:10 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Jon Smirl @ 2008-05-28 13:40 UTC (permalink / raw)
To: ALSA-devel
On 5/28/08, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> On Tue, May 27, 2008 at 02:16:54PM -0400, Jon Smirl wrote:
>
> > I'm having trouble with SPDIF. I can make two devices like this in the
> > codec file. But how do I get the SPDIF device hooked up to the right
> > AC97 slot, 10/11? Are any of the ASOC codecs implementing SPDIF?
>
>
> None that I know of implementing SPDIF (or at least, none with driver
> support for it) but it might be worth taking a look at the PXA2xx AC97
> controller support - it implements supports for AC97 timeslots beyond
> the base playback and record channels.
I'll look at PXA2xx. I had assumed that some of the SOC codecs were
implementing SPDIF and that wrongly led me into the pci code.
I'm practicing on the Efika while I wait on our own hardware. The
Efika hardware can support simultaneous independent playback on analog
and spdif. I see now that it is too hard to jump straight to
independent playback, instead I'll work on getting them both to play
standalone.
For independent playback I need to interleave the data from two
buffers and DMA it into the PSC. I believe the Bestcomm DMA controller
can do this. Does ALSA hand me the two buffers simultaneously? I
haven't located any code yet supporting independent playback.
>
> Briefly, the approach is to provide a DAI in the AC97 controller driver
> which handles the relevant AC97 timeslots and a DAI in the CODEC driver
> which does the CODEC side of things then match the two together.
>
>
> > I also see that the STAC9766 is missing an ac97_patch. From my reading
> > of the datasheet it needs somethings fixed up.
>
> > Does the ac97 support belong in the PCI directory? It took me a while
> > to locate it while working on ASOC. With a model more like ASOC
> > codecs, the AC97 patches could be pushed into the codec files.
>
>
> The ASoC AC97 support doesn't use the AC97 patch infrastructure at all -
> it's completely independent so things are pretty much as you describe,
> everything is in the CODEC drivers.
I've figured out now that the pci codec code is independent of the
asoc code. Are there plans to unify this in the future?
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ASOC, SPDIF and AC97
2008-05-28 13:40 ` Jon Smirl
@ 2008-05-28 16:10 ` Mark Brown
2008-05-28 20:15 ` Jon Smirl
0 siblings, 1 reply; 6+ messages in thread
From: Mark Brown @ 2008-05-28 16:10 UTC (permalink / raw)
To: Jon Smirl; +Cc: ALSA-devel
On Wed, May 28, 2008 at 09:40:13AM -0400, Jon Smirl wrote:
> can do this. Does ALSA hand me the two buffers simultaneously? I
> haven't located any code yet supporting independent playback.
It shouldn't be fundamentally different to multiple independent records
which the PXA code does support. If you present them as separate PCMs
then ALSA won't synchronise them for you.
> > The ASoC AC97 support doesn't use the AC97 patch infrastructure at all -
> > it's completely independent so things are pretty much as you describe,
> > everything is in the CODEC drivers.
> I've figured out now that the pci codec code is independent of the
> asoc code. Are there plans to unify this in the future?
I'm not aware of anyone working on doing so.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ASOC, SPDIF and AC97
2008-05-28 16:10 ` Mark Brown
@ 2008-05-28 20:15 ` Jon Smirl
2008-05-29 18:50 ` Mark Brown
0 siblings, 1 reply; 6+ messages in thread
From: Jon Smirl @ 2008-05-28 20:15 UTC (permalink / raw)
To: broonie, ALSA-devel
On 5/28/08, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> On Wed, May 28, 2008 at 09:40:13AM -0400, Jon Smirl wrote:
>
> > can do this. Does ALSA hand me the two buffers simultaneously? I
> > haven't located any code yet supporting independent playback.
>
>
> It shouldn't be fundamentally different to multiple independent records
> which the PXA code does support. If you present them as separate PCMs
> then ALSA won't synchronize them for you.
Any words of wisdom on how to synchronize?
> > > The ASoC AC97 support doesn't use the AC97 patch infrastructure at all -
> > > it's completely independent so things are pretty much as you describe,
> > > everything is in the CODEC drivers.
>
> > I've figured out now that the pci codec code is independent of the
> > asoc code. Are there plans to unify this in the future?
>
>
> I'm not aware of anyone working on doing so.
>
--
Jon Smirl
jonsmirl@gmail.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ASOC, SPDIF and AC97
2008-05-28 20:15 ` Jon Smirl
@ 2008-05-29 18:50 ` Mark Brown
0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2008-05-29 18:50 UTC (permalink / raw)
To: Jon Smirl; +Cc: ALSA-devel
On Wed, May 28, 2008 at 04:15:40PM -0400, Jon Smirl wrote:
> On 5/28/08, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> > It shouldn't be fundamentally different to multiple independent records
> > which the PXA code does support. If you present them as separate PCMs
> > then ALSA won't synchronize them for you.
> Any words of wisdom on how to synchronize?
It's not a situation I've run into myself. I'd try something like
having the DMA driver delay the application starting the second stream
but I've no idea if that'd work or do what you need.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-05-29 18:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-27 18:16 ASOC, SPDIF and AC97 Jon Smirl
2008-05-28 10:14 ` Mark Brown
2008-05-28 13:40 ` Jon Smirl
2008-05-28 16:10 ` Mark Brown
2008-05-28 20:15 ` Jon Smirl
2008-05-29 18:50 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.