* IEC958 / SPDIF raw capture
@ 2010-02-10 23:14 Donald Tournier
2010-02-11 7:26 ` Clemens Ladisch
2010-02-11 7:36 ` Jaroslav Kysela
0 siblings, 2 replies; 5+ messages in thread
From: Donald Tournier @ 2010-02-10 23:14 UTC (permalink / raw)
To: alsa-devel
Hi,
We have an application in our institute that will require recording of
a digital signal via an optical cable. We have to be able to guarantee
perfect bitwise reproduction of the signal (the odd bit error is not a
problem). We're thinking of using SPDIF and ALSA to capture the signal
(obviously we'll have to make sure the signal is properly encoded to
begin with).
However, after some initial attempts, it's becoming clear that ALSA
can't necessarily guarantee bitwise perfect capture. ALSA might change
the format, or resample the signal after capture (although I've heard
that can be turned off with "snd_pcm_hw_params_set_rate_resample
(capture_handle, hw_params, 0)"). Also, the card that we've been
playing with so far (SB Audigy2 ZS) apparently performs some low-pass
digital filtering on the input stream anyway, and is therefore no use
to us.
So my question is: can this be done? Is there a way of setting up ALSA
to produce an unaltered version of the SPDIF input stream? This will
undoubtedly require a particular combination of hardware and driver.
If so, which card/driver would be recommended? Ideally, we would like
to capture the raw SPDIF subframes. Is that possible, and if so, how?
Any help would be greatly appreciated!
Thanks,
Donald.
--
Jacques-Donald Tournier (PhD)
Brain Research Institute, Melbourne, Australia
Tel: +61 (0)3 9496 4078
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IEC958 / SPDIF raw capture
2010-02-10 23:14 IEC958 / SPDIF raw capture Donald Tournier
@ 2010-02-11 7:26 ` Clemens Ladisch
2010-02-12 3:44 ` Donald Tournier
2010-02-11 7:36 ` Jaroslav Kysela
1 sibling, 1 reply; 5+ messages in thread
From: Clemens Ladisch @ 2010-02-11 7:26 UTC (permalink / raw)
To: Donald Tournier; +Cc: alsa-devel
Donald Tournier wrote:
> We have an application in our institute that will require recording of
> a digital signal via an optical cable. We have to be able to guarantee
> perfect bitwise reproduction of the signal (the odd bit error is not a
> problem). We're thinking of using SPDIF and ALSA to capture the signal
> (obviously we'll have to make sure the signal is properly encoded to
> begin with).
>
> However, after some initial attempts, it's becoming clear that ALSA
> can't necessarily guarantee bitwise perfect capture. ALSA might change
> the format, or resample the signal after capture (although I've heard
> that can be turned off with "snd_pcm_hw_params_set_rate_resample
> (capture_handle, hw_params, 0)").
If you open the device as "hw:x", ALSA will not do any conversions and
will give you the data exactly as it comes from the sound card.
> can this be done? If so, which card/driver would be recommended?
PCI(-E) cards based on C-Media chips (CMI87x8, CMI8770, AV200) are known
to allow bit-perfect digital capture.
> Ideally, we would like to capture the raw SPDIF subframes.
Some very old revisions of the CMI8738 did this, because proper decoding
of subframes wasn't implemented, but these aren't sold anymore.
HTH
Clemens
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IEC958 / SPDIF raw capture
2010-02-10 23:14 IEC958 / SPDIF raw capture Donald Tournier
2010-02-11 7:26 ` Clemens Ladisch
@ 2010-02-11 7:36 ` Jaroslav Kysela
1 sibling, 0 replies; 5+ messages in thread
From: Jaroslav Kysela @ 2010-02-11 7:36 UTC (permalink / raw)
To: Donald Tournier; +Cc: alsa-devel
On Thu, 11 Feb 2010, Donald Tournier wrote:
> Hi,
>
> We have an application in our institute that will require recording of
> a digital signal via an optical cable. We have to be able to guarantee
> perfect bitwise reproduction of the signal (the odd bit error is not a
> problem). We're thinking of using SPDIF and ALSA to capture the signal
> (obviously we'll have to make sure the signal is properly encoded to
> begin with).
>
> However, after some initial attempts, it's becoming clear that ALSA
> can't necessarily guarantee bitwise perfect capture. ALSA might change
> the format, or resample the signal after capture (although I've heard
> that can be turned off with "snd_pcm_hw_params_set_rate_resample
> (capture_handle, hw_params, 0)"). Also, the card that we've been
> playing with so far (SB Audigy2 ZS) apparently performs some low-pass
> digital filtering on the input stream anyway, and is therefore no use
> to us.
Getting raw S/PDIF stream for EMU chips is not so easy. They operates
internally at 48kHz and everything is resampled to this frequency.
Jaroslav
-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IEC958 / SPDIF raw capture
2010-02-11 7:26 ` Clemens Ladisch
@ 2010-02-12 3:44 ` Donald Tournier
2010-02-12 7:03 ` Jaroslav Kysela
0 siblings, 1 reply; 5+ messages in thread
From: Donald Tournier @ 2010-02-12 3:44 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel
Thanks Clemens, that very helpful. We'll try to source one of these
C-Media cards as soon as possible.
Also nice to know about the "hw:x" trick, although I'm not too sure
how to use that in practice. I've just tried this command, with no
success:
$ arecord -D hw:x -t raw output.raw
ALSA lib pcm_hw.c:1435:(_snd_pcm_hw_open) Invalid value for card
arecord: main:608: audio open error: No such device
How exactly should this be used?
Thanks,
Donald.
On 11 February 2010 18:26, Clemens Ladisch <clemens@ladisch.de> wrote:
> Donald Tournier wrote:
>> We have an application in our institute that will require recording of
>> a digital signal via an optical cable. We have to be able to guarantee
>> perfect bitwise reproduction of the signal (the odd bit error is not a
>> problem). We're thinking of using SPDIF and ALSA to capture the signal
>> (obviously we'll have to make sure the signal is properly encoded to
>> begin with).
>>
>> However, after some initial attempts, it's becoming clear that ALSA
>> can't necessarily guarantee bitwise perfect capture. ALSA might change
>> the format, or resample the signal after capture (although I've heard
>> that can be turned off with "snd_pcm_hw_params_set_rate_resample
>> (capture_handle, hw_params, 0)").
>
> If you open the device as "hw:x", ALSA will not do any conversions and
> will give you the data exactly as it comes from the sound card.
>
>> can this be done? If so, which card/driver would be recommended?
>
> PCI(-E) cards based on C-Media chips (CMI87x8, CMI8770, AV200) are known
> to allow bit-perfect digital capture.
>
>> Ideally, we would like to capture the raw SPDIF subframes.
>
> Some very old revisions of the CMI8738 did this, because proper decoding
> of subframes wasn't implemented, but these aren't sold anymore.
>
>
> HTH
> Clemens
>
--
Jacques-Donald Tournier (PhD)
Brain Research Institute, Melbourne, Australia
Tel: +61 (0)3 9496 4078
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: IEC958 / SPDIF raw capture
2010-02-12 3:44 ` Donald Tournier
@ 2010-02-12 7:03 ` Jaroslav Kysela
0 siblings, 0 replies; 5+ messages in thread
From: Jaroslav Kysela @ 2010-02-12 7:03 UTC (permalink / raw)
To: Donald Tournier; +Cc: alsa-devel, Clemens Ladisch
On Fri, 12 Feb 2010, Donald Tournier wrote:
> Thanks Clemens, that very helpful. We'll try to source one of these
> C-Media cards as soon as possible.
>
> Also nice to know about the "hw:x" trick, although I'm not too sure
> how to use that in practice. I've just tried this command, with no
> success:
>
> $ arecord -D hw:x -t raw output.raw
> ALSA lib pcm_hw.c:1435:(_snd_pcm_hw_open) Invalid value for card
> arecord: main:608: audio open error: No such device
>
> How exactly should this be used?
Note that 'x' means card number or name. Just use 0 if you have only one
card in system or use 'arecord -l' to list cards.
Jaroslav
-----
Jaroslav Kysela <perex@perex.cz>
Linux Kernel Sound Maintainer
ALSA Project, Red Hat, Inc.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-02-12 7:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-10 23:14 IEC958 / SPDIF raw capture Donald Tournier
2010-02-11 7:26 ` Clemens Ladisch
2010-02-12 3:44 ` Donald Tournier
2010-02-12 7:03 ` Jaroslav Kysela
2010-02-11 7:36 ` 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.