From: joy <joy@pingfm.org>
To: alsa-devel@lists.sourceforge.net
Subject: spdif-trough and snd_ctl_elem_*
Date: Sat, 13 Jul 2002 17:19:36 +0200 [thread overview]
Message-ID: <20020713151936.GA4711@pingfm.org> (raw)
hi,
i actually want to set spdif-trough automagically from inside an application
when its needed but it seems there are differences from hardware to
hardware or/and changes in the alsa-lib-api, but im not sure.
i have an old-code fragment which dosn't work for me (ens1371).
it does not work also on the SB Live Player 5.1.
...
snd_ctl_elem_value_alloca(&ctl);
snd_ctl_elem_value_set_interface(ctl, SND_CTL_ELEM_IFACE_PCM);
snd_ctl_elem_value_set_device(ctl, snd_pcm_info_get_device(info));
snd_ctl_elem_value_set_subdevice(ctl, snd_pcm_info_get_subdevice(info));
snd_ctl_elem_value_set_name(ctl,SND_CTL_NAME_IEC958("", PLAYBACK, PCM_STREAM));
snd_ctl_elem_value_set_iec958(ctl, &spdif);
...
snd_ctl_elem_write(ctl_handler, ctl);
i got always "file or directory not found"-error with this and it's no
wonder cause i have no pcm-iface like above.
i changed now iface to SND_CTL_ELEM_IFACE_MIXER and _set_name to:
snd_ctl_elem_value_set_name(ctl,SND_CTL_NAME_IEC958("", PLAYBACK, SWITCH));
it seems to work for me but im not sure if its work on the sbLive. the
switch or whatever on the sblive is called 'IEC958 Optical Raw'.
are the switches different from hadware/mixer to hardware or im wrong?
and if yes is there an 'easy way' to get the default
spdif-through-switch?
any enlightment in this appreciated.
--
thanx and regards
____-
joy
________/\---------%%%___________-----------
webcast every sunday 2000 cest at pingfm.org
pgp key at: x-hkp://wwwkeys.de.pgp.net
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
next reply other threads:[~2002-07-13 15:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-13 15:19 joy [this message]
2002-07-17 12:25 ` spdif-trough and snd_ctl_elem_* Takashi Iwai
2002-07-17 22:31 ` joy
2002-07-19 18:03 ` Takashi Iwai
2002-07-20 7:11 ` Jaroslav Kysela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020713151936.GA4711@pingfm.org \
--to=joy@pingfm.org \
--cc=alsa-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.