All of lore.kernel.org
 help / color / mirror / Atom feed
* Hotplug plugin
@ 2007-12-31 14:18 Erik Slagter
  2007-12-31 14:42 ` Lennart Poettering
  0 siblings, 1 reply; 5+ messages in thread
From: Erik Slagter @ 2007-12-31 14:18 UTC (permalink / raw)
  To: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 2383 bytes --]

Sorry for crossposting, but this is a problem I am not quite sure might
be solved by users or developers. Also I am not too lazy to do a little
development myself, if that appears to be necessary.

This is my setup:

- internal snd-hda soundcard connected to speakers in the bathroom
playing 24x7 music;
- jvc amplifier in living room with integrated USB sound device.

The USB sound device in the amplifier vanishes when the amplifier is
powered down.

So... this is my problem. I want to have 24x7 music on the internal
soundcard and on the amplifier. When the amplifier is switched off, no
audio should be send there (of course) but playback should resume as
soon as the amplifier is switched on and the USB device re-appears.

I created a "tee" construction using asound.conf which adresses both
soundcards, this works. At least... until the amplifer is switched off
and the USB device disappears. Then the sound playing application gets
an error and quits.

I tried these approaches for a solution:

 - pulseaudio, using hal-detection and "combined" device: doesn't work
because a removed device is never reinserted into the combined device;
 - alsa extplug: easy to create, no worries about the "slave" device,
you get it for free, but I abandoned the idea as there is probably no
way to recreate the slave pcm while the "owner" remains active.
 - alsa ioplug, attempt 1: there is probably no way to to address and
recreate the "slave" (which I open myself in the plugin using
snd_pcm_open) in such a way that it is completely transparent to the
application that it is talking to the "slave" (not a "real" alsa slave)
instead of the ioplug plugin
- alsa ioplug, attempt 2: I tried to make the callback functions of the
ioplug call the callbacks of the "slave" directly, but that probably
isn't going to work either (too much callbacks in the pcm struct that
have no equivalent in the ioplug struct)
- alsa ioplug, attempt 3: open and write to the hardware devices
directly. Abonded it as well because this cannot practically be done, as
you'd need parts copies of header files from the kernel and alsalib for
hidden data structures.


Anyone ideas to solve this in a neat way? (preferrably using an alsa
plugin; for the moment I am using a self-made external program that alsa
dumps it sound to (file plugin) and uses two alsa-player processes to
get the audio to the devices)

[-- Attachment #1.2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 3315 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

end of thread, other threads:[~2008-01-12 23:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-31 14:18 Hotplug plugin Erik Slagter
2007-12-31 14:42 ` Lennart Poettering
2008-01-01 11:29   ` Erik Slagter
2008-01-01 18:26   ` [alsa-devel] " Erik Slagter
2008-01-12 23:57     ` Lennart Poettering

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.