* Can ASoC support SPDIF AC3 passthrough playback (non linear PCM) ?
@ 2012-07-21 15:39 Sangsu Park
2012-07-22 18:42 ` Mark Brown
2012-07-23 1:03 ` Gabriel M. Beddingfield
0 siblings, 2 replies; 5+ messages in thread
From: Sangsu Park @ 2012-07-21 15:39 UTC (permalink / raw)
To: alsa-devel, android-platform; +Cc: Mark Brown
Hi,
We're developing a platform where we have SPDIF output.
And we want to SPDIF AC3 playback (non linear PCM).
Our CPU is a kind of ARM architecture one and it has a SPDIF that can
support AC3 passthrough playback.
I've already know that ALSA can support SPDIF AC3 passthrough playback
like follows,
http://www.mythtv.org/wiki/Configuring_Digital_Sound_with_AC3_and_SPDIF
But, I can't find that any ARM architecture CPU can be supportable for
SPDIF AC3 passthrough playback.
Are there anyone who have a SPDIF AC3 passthrough playback?
or anyone who know the clue about SPDIF AC3 passthrought playback
supportable on ASoC?
Our SPDIF already can support on linear PCM playback.
But we have no experience in SPDIF AC3 passthrough playback.
Just changing register setup from linear PCM playback to non-linear
PCM playback is enough?
Or any reference code on ASoC for SPDIF passthrough playback?
Any hint would be greatly appreciated.
Thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can ASoC support SPDIF AC3 passthrough playback (non linear PCM) ?
2012-07-21 15:39 Can ASoC support SPDIF AC3 passthrough playback (non linear PCM) ? Sangsu Park
@ 2012-07-22 18:42 ` Mark Brown
2012-07-23 1:03 ` Gabriel M. Beddingfield
1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2012-07-22 18:42 UTC (permalink / raw)
To: Sangsu Park; +Cc: android-platform, alsa-devel
[-- Attachment #1.1: Type: text/plain, Size: 384 bytes --]
On Sun, Jul 22, 2012 at 12:39:50AM +0900, Sangsu Park wrote:
> Are there anyone who have a SPDIF AC3 passthrough playback?
> or anyone who know the clue about SPDIF AC3 passthrought playback
> supportable on ASoC?
I don't know if anyone's tried but it should be pretty trivial to get it
working if the hardware can do it, ASoC itself doesn't pay much
attention to the data formats.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can ASoC support SPDIF AC3 passthrough playback (non linear PCM) ?
2012-07-21 15:39 Can ASoC support SPDIF AC3 passthrough playback (non linear PCM) ? Sangsu Park
2012-07-22 18:42 ` Mark Brown
@ 2012-07-23 1:03 ` Gabriel M. Beddingfield
2012-07-23 13:41 ` Sangsu Park
2012-07-23 19:36 ` Pierre-Louis Bossart
1 sibling, 2 replies; 5+ messages in thread
From: Gabriel M. Beddingfield @ 2012-07-23 1:03 UTC (permalink / raw)
To: alsa-devel, sangsu; +Cc: android-platform
On 07/21/2012 10:39 AM, Sangsu Park wrote:
> Hi,
> We're developing a platform where we have SPDIF output.
> And we want to SPDIF AC3 playback (non linear PCM).
> Our CPU is a kind of ARM architecture one and it has a SPDIF that can
> support AC3 passthrough playback.
>
> I've already know that ALSA can support SPDIF AC3 passthrough playback
> like follows,
> http://www.mythtv.org/wiki/Configuring_Digital_Sound_with_AC3_and_SPDIF
> But, I can't find that any ARM architecture CPU can be supportable for
> SPDIF AC3 passthrough playback.
>
> Are there anyone who have a SPDIF AC3 passthrough playback?
> or anyone who know the clue about SPDIF AC3 passthrought playback
> supportable on ASoC?
I'm currently working on a similar project -- and I'm learning about
this myself, too.
As I understand it, you have to package the AC-3 into IEC 61937 format
first. The S/PDIF driver will then encode it into the IEC 60958 (S/PDIF
protocol).
You probably need/want a copy of IEC 61937-3.[1] It looks pretty simple
(add 4 headers to the front and some zero-padding at the end to meet the
alignment requirements). I don't know of any software examples for
doing it[2] -- so if you find some, please share! :-)
As for feeding it to ALSA, I think that's what the
SNDRV_PCM_FORMAT_IEC958_SUBFRAME is intended for. However, in practice
I've heard that you can usually configure the PCM device to something
like an S16 format and things "just work." (IEC 61937-3's payload is
16-bit aligned.)
...and I think I've heard of some people shooting raw AC-3 and things
"just work." YMMV. :-)
-gabriel
[1] Digital Audio - Interface for non-linear PCM encoded audio
bitstreams applying IEC 60958 - Part-3: Non-linear PCM bitstreams
according to the AC-3 format.
[2] Nor do I know of anything in ALSA that will do it for you.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can ASoC support SPDIF AC3 passthrough playback (non linear PCM) ?
2012-07-23 1:03 ` Gabriel M. Beddingfield
@ 2012-07-23 13:41 ` Sangsu Park
2012-07-23 19:36 ` Pierre-Louis Bossart
1 sibling, 0 replies; 5+ messages in thread
From: Sangsu Park @ 2012-07-23 13:41 UTC (permalink / raw)
To: Gabriel M. Beddingfield, broonie; +Cc: android-platform, alsa-devel
Thanks for your answers.
They will be good helps :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Can ASoC support SPDIF AC3 passthrough playback (non linear PCM) ?
2012-07-23 1:03 ` Gabriel M. Beddingfield
2012-07-23 13:41 ` Sangsu Park
@ 2012-07-23 19:36 ` Pierre-Louis Bossart
1 sibling, 0 replies; 5+ messages in thread
From: Pierre-Louis Bossart @ 2012-07-23 19:36 UTC (permalink / raw)
To: alsa-devel
On 7/22/2012 8:03 PM, Gabriel M. Beddingfield wrote:
> On 07/21/2012 10:39 AM, Sangsu Park wrote:
>> Hi,
>> We're developing a platform where we have SPDIF output.
>> And we want to SPDIF AC3 playback (non linear PCM).
>> Our CPU is a kind of ARM architecture one and it has a SPDIF that can
>> support AC3 passthrough playback.
>>
>> I've already know that ALSA can support SPDIF AC3 passthrough playback
>> like follows,
>> http://www.mythtv.org/wiki/Configuring_Digital_Sound_with_AC3_and_SPDIF
>> But, I can't find that any ARM architecture CPU can be supportable for
>> SPDIF AC3 passthrough playback.
>>
>> Are there anyone who have a SPDIF AC3 passthrough playback?
>> or anyone who know the clue about SPDIF AC3 passthrought playback
>> supportable on ASoC?
>
> I'm currently working on a similar project -- and I'm learning about
> this myself, too.
>
> As I understand it, you have to package the AC-3 into IEC 61937 format
> first. The S/PDIF driver will then encode it into the IEC 60958
> (S/PDIF protocol).
>
> You probably need/want a copy of IEC 61937-3.[1] It looks pretty
> simple (add 4 headers to the front and some zero-padding at the end to
> meet the alignment requirements). I don't know of any software
> examples for doing it[2] -- so if you find some, please share! :-)
>
> As for feeding it to ALSA, I think that's what the
> SNDRV_PCM_FORMAT_IEC958_SUBFRAME is intended for. However, in
> practice I've heard that you can usually configure the PCM device to
> something like an S16 format and things "just work." (IEC 61937-3's
> payload is 16-bit aligned.)
>
> ...and I think I've heard of some people shooting raw AC-3 and things
> "just work." YMMV. :-)
There are two modes really
- one where you send 16-bit data with the 61937 format. somehow the
hardware add the preambles and CUVP bits
- one where you create the complete 32-bit frame using the iec958
alsa-lib plugin
Both work with my HDAudio output, the latter is more flexible if you
want to set the C/U bits
Note that this is all supported in PulseAudio, and gstreamer can package
AC3/DTS data for you. mplayer also does.
-Pierre
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-23 19:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-21 15:39 Can ASoC support SPDIF AC3 passthrough playback (non linear PCM) ? Sangsu Park
2012-07-22 18:42 ` Mark Brown
2012-07-23 1:03 ` Gabriel M. Beddingfield
2012-07-23 13:41 ` Sangsu Park
2012-07-23 19:36 ` Pierre-Louis Bossart
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.