All of lore.kernel.org
 help / color / mirror / Atom feed
* spdif-trough and snd_ctl_elem_*
@ 2002-07-13 15:19 joy
  2002-07-17 12:25 ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: joy @ 2002-07-13 15:19 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-07-20  7:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-13 15:19 spdif-trough and snd_ctl_elem_* joy
2002-07-17 12:25 ` Takashi Iwai
2002-07-17 22:31   ` joy
2002-07-19 18:03     ` Takashi Iwai
2002-07-20  7:11       ` 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.