* iec958 and 24-bit audio
@ 2010-11-01 19:14 pl bossart
2010-11-01 19:18 ` Jaroslav Kysela
0 siblings, 1 reply; 4+ messages in thread
From: pl bossart @ 2010-11-01 19:14 UTC (permalink / raw)
To: alsa-devel
When I try playing 24-bit audio files on my SPDIF output, I get this
[alsa-lib]$ aplay -Diec958 file24bits.wav
aplay: set_params:1059: Sample format non available
Available formats:
- S16_LE
- S32_LE
Is there an built-in assumption that the iec958 device can only take
as input what the slave hardware device supports? The IEC subframes
can convey 24 bit audio, and it's possible to insert the 24 bits
starting from bit 4 when adding the preambles and status bits. What am
I missing?
Thanks,
-Poerre
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iec958 and 24-bit audio
2010-11-01 19:14 iec958 and 24-bit audio pl bossart
@ 2010-11-01 19:18 ` Jaroslav Kysela
2010-11-01 20:03 ` pl bossart
0 siblings, 1 reply; 4+ messages in thread
From: Jaroslav Kysela @ 2010-11-01 19:18 UTC (permalink / raw)
To: pl bossart; +Cc: alsa-devel
On Mon, 1 Nov 2010, pl bossart wrote:
> When I try playing 24-bit audio files on my SPDIF output, I get this
>
> [alsa-lib]$ aplay -Diec958 file24bits.wav
> aplay: set_params:1059: Sample format non available
> Available formats:
> - S16_LE
> - S32_LE
>
> Is there an built-in assumption that the iec958 device can only take
> as input what the slave hardware device supports?
Use 'plug:iec958' device if you want to do the format conversion (from
24-bit to 32-bit format).
Jaroslav
-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iec958 and 24-bit audio
2010-11-01 19:18 ` Jaroslav Kysela
@ 2010-11-01 20:03 ` pl bossart
2010-11-01 20:24 ` Jaroslav Kysela
0 siblings, 1 reply; 4+ messages in thread
From: pl bossart @ 2010-11-01 20:03 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: alsa-devel
>> [alsa-lib]$ aplay -Diec958 file24bits.wav
>> aplay: set_params:1059: Sample format non available
>> Available formats:
>> - S16_LE
>> - S32_LE
>>
>> Is there an built-in assumption that the iec958 device can only take
>> as input what the slave hardware device supports?
>
> Use 'plug:iec958' device if you want to do the format conversion (from
> 24-bit to 32-bit format).
That seems to work, but what I was asking is if there's a direct path
without conversion? With plug:iec958 there's a conversion to 32-bits
and then you drop the lsb.
Also PulseAudio seems to rely on iec958 and when it doesn't work it
tries with plug:iec958. What's the recommended way of using this
device? Should we always open plug:iec958?
Thanks
-Pierre
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iec958 and 24-bit audio
2010-11-01 20:03 ` pl bossart
@ 2010-11-01 20:24 ` Jaroslav Kysela
0 siblings, 0 replies; 4+ messages in thread
From: Jaroslav Kysela @ 2010-11-01 20:24 UTC (permalink / raw)
To: pl bossart; +Cc: alsa-devel
On Mon, 1 Nov 2010, pl bossart wrote:
>>> [alsa-lib]$ aplay -Diec958 file24bits.wav
>>> aplay: set_params:1059: Sample format non available
>>> Available formats:
>>> - S16_LE
>>> - S32_LE
>>>
>>> Is there an built-in assumption that the iec958 device can only take
>>> as input what the slave hardware device supports?
>>
>> Use 'plug:iec958' device if you want to do the format conversion (from
>> 24-bit to 32-bit format).
>
> That seems to work, but what I was asking is if there's a direct path
> without conversion? With plug:iec958 there's a conversion to 32-bits
> and then you drop the lsb.
Almost all sound bridge chips works with 16-bit or 32-bit samples because
it's more compatible with analog converters and the handling is more
simple than for 3-byte formats. The conversion from the 32-bit format to
the 32-bit S/PDIF frame is done inside hw (dropping the LSB, add S/PDIF
frame status bits). Some hardware also supports raw S/PDIF frames
directly.
> Also PulseAudio seems to rely on iec958 and when it doesn't work it
> tries with plug:iec958. What's the recommended way of using this
> device? Should we always open plug:iec958?
You can detect which formats are supported (like aplay does) and use the
appropriate format to avoid using the plug layer in alsa-lib.
Jaroslav
-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-11-01 20:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-01 19:14 iec958 and 24-bit audio pl bossart
2010-11-01 19:18 ` Jaroslav Kysela
2010-11-01 20:03 ` pl bossart
2010-11-01 20:24 ` Jaroslav Kysela
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.