* IEC958 plugin and Rate plugin programming
@ 2006-02-11 9:30 Luca Piccioni
2006-02-13 8:17 ` Clemens Ladisch
0 siblings, 1 reply; 6+ messages in thread
From: Luca Piccioni @ 2006-02-11 9:30 UTC (permalink / raw)
To: alsa-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
My challenge now is to output a stereo 16 bit (LE) @ any Hz to the
S/PDIF digital output.
Opening the hardware digital output device (for me is "hw:0,4") this
don't work: probably
because I can't send linear PCM to this device, right?
Ok, I've seen a IEC958 plugin... it does conversion between linear PCM
to IEC958 Subframes, right?
(tell me if I'm wrong!!!). So I open with snd_pcm_open the device
"hw:0,4" (or it's alias iec958/spdif),
the uses the iec958 plugin using snd_pcm_iec958_open, using as slave
the hardware device opened
before. Now, the hardware device (the slave) should be not touched,
right? To setup hardware
parameters and software parameters I use the returned pcm handle by
snd_pcm_iec958_open... right?
So, if I've understood, writing simple linear PCM stereo data to such
device, audio will be converted
into IEC958 frames and sent to the hardware device "hw:0,4"!!!
Actually this works (my application doesn't report any error or
warning), but at the moment I can't test
this solution bacause an amplificator is missing to me!!! (but it will
in some day :-) ).
I would ask if this is the correct way to use plugin.
Another question is: I can create a more complex plugin chain? Say my
IEC958 device only setup to 48000
Hz: I would like to performe a sample rate conversion (to 48000)
before converting to IEC958 frames...
is it possible? How to organize/initialize ALSA plugins?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFD7a6cKK3BAIBUkxERAvlSAJ41MmOkx++wvxzFMFp6zUv0rqUXzwCfQyQ1
TzoZbZcNxW8La/qApnoiDrQ=
=hrdX
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: IEC958 plugin and Rate plugin programming
2006-02-11 9:30 IEC958 plugin and Rate plugin programming Luca Piccioni
@ 2006-02-13 8:17 ` Clemens Ladisch
2006-02-13 15:13 ` Luca Piccioni
0 siblings, 1 reply; 6+ messages in thread
From: Clemens Ladisch @ 2006-02-13 8:17 UTC (permalink / raw)
To: Luca Piccioni; +Cc: alsa-devel
Luca Piccioni wrote:
> My challenge now is to output a stereo 16 bit (LE) @ any Hz to the
> S/PDIF digital output. Opening the hardware digital output device
> (for me is "hw:0,4") this don't work: probably because I can't send
> linear PCM to this device, right?
Wrong; you can send PCM to this device. But you better use "iec958:0"
instead of "hw:0,4" because many AC'97 codecs require some mixer
controls to be set for S/PDIF to work, and using hw doesn't do this
automatically.
> Ok, I've seen a IEC958 plugin... it does conversion between linear PCM
> to IEC958 Subframes, right?
Right. But you'd need this only for sound cards that cannot put PCM
data into subframes by themselves. Such stupid chips are made by CMI
and ATI, but my crystall ball says you're using snd-intel8x0.
What is the actual problem?
HTH
Clemens
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: IEC958 plugin and Rate plugin programming
2006-02-13 8:17 ` Clemens Ladisch
@ 2006-02-13 15:13 ` Luca Piccioni
2006-02-13 16:02 ` Clemens Ladisch
0 siblings, 1 reply; 6+ messages in thread
From: Luca Piccioni @ 2006-02-13 15:13 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Clemens Ladisch wrote:
> What is the actual problem?
Well... no sound! I've used "aplay" to test the S/PDIF output. The
soundcard seems to
work well, because the ampli recognize PCM / Digital, so I suppose the
connection between
PC and ampli is correct.
So first I tried "aplay -Dhw:0,4" test.wav", but no sound. Then I've
tried also "iec958" and "spdif",
but nothing is outputted!
Application work without reporting any error (only a warning if I'm
not using a 48 kHz PCM, eliminable
using "plug:iec958" as device).
For the moment I haven't tried to use "iec958:0" as device because I
don't have the amplifier to test
audio. Any suggestion to know if any PCM data is outputted to a
particoular device?
My soundcard is a Realtek ALC850 (reported by alsamixer), and I'm
using the intel8x0 ALSA module. I'm
also programming a multimedia application, so I've tried to use the
snd_pcm_iec958_open... I thought this
was the solution! :-/ As I've understood, this plug (iec958) it's used
automatically when I setup i linear
PCM to the spdif device? While I have to create this plug
(programming) whenever the soundcard can't
do this task?
About mixers (sorry for the stupid question, but for me it's quite
new!): what mixers I should enable
to output to digital?
Thanks for all your help!
Luca
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFD8KI2KK3BAIBUkxERAuPzAKCu2d6+IeR04Nvl3hLeux9ukMWaqACg6vdD
ymBaYb01GB1kCtLhX8BtFpo=
=+bvZ
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: IEC958 plugin and Rate plugin programming
2006-02-13 15:13 ` Luca Piccioni
@ 2006-02-13 16:02 ` Clemens Ladisch
2006-02-14 10:22 ` Luca Piccioni
0 siblings, 1 reply; 6+ messages in thread
From: Clemens Ladisch @ 2006-02-13 16:02 UTC (permalink / raw)
To: Luca Piccioni; +Cc: alsa-devel
Luca Piccioni wrote:
> Clemens Ladisch wrote:
> > What is the actual problem?
>
> Well... no sound!
>
> So first I tried "aplay -Dhw:0,4" test.wav", but no sound. Then I've
> tried also "iec958" and "spdif", but nothing is outputted!
>
> For the moment I haven't tried to use "iec958:0" as device because I
> don't have the amplifier to test audio.
":0" is the default anyway.
> Any suggestion to know if any PCM data is outputted to a particoular
> device?
Check with a device that has a SPDIF input that is known to work ...
> My soundcard is a Realtek ALC850 (reported by alsamixer), and I'm
> using the intel8x0 ALSA module. I'm also programming a multimedia
> application, so I've tried to use the snd_pcm_iec958_open... I thought
> this was the solution! :-/ As I've understood, this plug (iec958) it's
> used automatically when I setup i linear PCM to the spdif device?
No, AC'97 codecs generate SPDIF frames in hardware; the iec958 plugin
isn't needed.
> While I have to create this plug (programming) whenever the soundcard
> can't do this task?
The card-specific configuration files automatically use the iec958
plugin for the iec958 device when needed.
> what mixers I should enable to output to digital?
Those that are set when using the iec958 device; see at the end of
/usr/share/alsa/cards/ICH4.conf.
What is the output of "iecset"?
Regards,
Clemens
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: IEC958 plugin and Rate plugin programming
2006-02-13 16:02 ` Clemens Ladisch
@ 2006-02-14 10:22 ` Luca Piccioni
2006-02-14 14:30 ` Clemens Ladisch
0 siblings, 1 reply; 6+ messages in thread
From: Luca Piccioni @ 2006-02-14 10:22 UTC (permalink / raw)
To: Clemens Ladisch; +Cc: alsa-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Clemens Ladisch wrote:
> What is the output of "iecset"?
$iecset
Mode: consumer
Data: audio
Rate: 48000 Hz
Copyright: permitted
Emphasis: none
Category: PCM coder
Original: original
Clock: 1000 ppm
$iecset -x
AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x02
I don't understand many thing... first "professional" and "consumer"
modes: how they influence my applications?
What are that parameters AES*? I've seen some sources setting to some
constant, but I have no pointers
to a good documentation (even using developers point of view) :-(
I don't believe in a ALSA driver/library bug, but in a my
mis-configuration. I don't know what's wrong!!! However
I must say that ALSA it's very powerfull and configurable...
impressioning!
- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFD8NsIKK3BAIBUkxERAgpHAJwLkRnXq44GVdBYReqw8W9uOXfWnQCfaG+I
m1hEp0q1PEODWQkzBHXRXtU=
=PdAv
- -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFD8a97KK3BAIBUkxERAhxxAKCaNd3i0QJ4PIevfZ/eM31Hdh5PPACgk+Xu
NpnijVxIAe1TrtGWDeF0eTM=
=74yt
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: IEC958 plugin and Rate plugin programming
2006-02-14 10:22 ` Luca Piccioni
@ 2006-02-14 14:30 ` Clemens Ladisch
0 siblings, 0 replies; 6+ messages in thread
From: Clemens Ladisch @ 2006-02-14 14:30 UTC (permalink / raw)
To: Luca Piccioni; +Cc: alsa-devel
Luca Piccioni wrote:
>
> Clemens Ladisch wrote:
>
> > What is the output of "iecset"?
>
> $iecset
> Mode: consumer
> Data: audio
> Rate: 48000 Hz
> Copyright: permitted
> Emphasis: none
> Category: PCM coder
> Original: original
> Clock: 1000 ppm
>
> $iecset -x
> AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x02
Try playing to the device
"plug:iec958:AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x02".
> I don't understand many thing... first "professional" and "consumer"
> modes: how they influence my applications?
It's a different setting of the status bits in the SPDIF frames.
Professional mode is for people that don't want to be bothered by the
simple copy protection scheme (disallow copying when the copyright bit
is set), but most consumer devices don't support it.
The default should work just fine.
> What are that parameters AES*?
The same parameters, only in a format that the computer can understand
them.
Regards,
Clemens
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-02-14 14:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-11 9:30 IEC958 plugin and Rate plugin programming Luca Piccioni
2006-02-13 8:17 ` Clemens Ladisch
2006-02-13 15:13 ` Luca Piccioni
2006-02-13 16:02 ` Clemens Ladisch
2006-02-14 10:22 ` Luca Piccioni
2006-02-14 14:30 ` Clemens Ladisch
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.