[Kde-hardware-devel] Audio- / Mixer-Interface ( KMix )

Kevin Ottens ervin at kde.org
Sat Jul 8 13:26:47 CEST 2006


Le vendredi 7 juillet 2006 20:13, Christian Esken a écrit :
> Hello,

Hello,

> I joined this list a couple of weeks ago, because I was wondering how I
> could include Solid in KMix. Does doing so sound like a sensible idea?

For discovering the available devices it definitely makes sense.

> I made the follwowing lists (questions getting more sophisticated from
> point to point):
>
> 1) Solid should be able to support mixer devices. Does Solid support Mixers
> already? Hint: For ALSA the devices will be the same as the Audio device
> (e.g. "hw:0"), but for OSS, Solaris, HPUX and others this will differ (e.g.
> "/dev/mixer" vs. "/dev/dsp").

It has been designed in order to also cover Phonon needs. So you'll get the 
necessary information through the AudioIface capability of the device.

> 2a) Can Solid provide coldplugging 
> information? Or in other words: When KMix starts, can Solid provide a list
> of Mixer devices.

Yes.

> 2b) Can Solid provide hotplugging information? Or in other words:
>     Can Solid notify KMix on runtime about appearing / disappearing
> devices.

Yes.

> 2c) How do I start (coding)? I read the solidhardwarebrowser 
> sourcecode without avail. Any help is appreciated here.

We currently miss some documentation and the API dox is not generated, that's 
something to fix ASAP. You'll unfortunately have to look at the header files 
in kdehw/solid to see what's available.

In your case you'll surely want to use:

Solid::DeviceManager::findDevicesFromQuery(QString(), 
Solid::Capability::AudioIface);
Which will give you all the relevant devices.

And to interact with the device:
Device::as<Solid::AudioIface*>()

> 3) Can Solid deliver a unique persistent identifier for each device?
>    That means, if an device is unplugged and replugged or the computer
> rebooted, can Solid deliver the same identifier each time ?

It's dependent on the underlying backend. It's generally difficult to have 
really a unique identifier. That said if HAL is used you should be safe for 
your needs.

> 4) Can Solid provide both ALSA and OSS? If yes, can Solid match OSS and
> ALSA device? Reason for this question: You don't want devices to show up
> two times (ALSA native device and ALSA's OSS emulation).

Yes, but currently we don't provide the OSS emulation information. That might 
be something to improve indeed.

> I am not sure whether the next questions are "Solid" questions at all:
> 5) How could KMix be notified about system wide setting, e.g. the preferred
> audio card? Is this a Solid or more likely a Phonon task?

This kind of settings belong to Phonon. It's already there afaik.

> 6) Does Solid support mapping "audio output device" to the corresponding
> "mixer device"? Reason for this question: For tuning the Surround volumes
> with KMix, I would like to play sounds on the corresponding "audio output
> device".
>    Is the mapping a Solid or more likely a Phonon task?

Hm, good question. I've no real answer to this for the moment. It's 
unsupported in Solid, I've no idea if it's done in Phonon. As for knowing if 
it's a Solid or a Phonon task it's and open question to me.

I hope it helps you at least a bit, feel free to ask other questions if you 
need more information.

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20060708/eb52e570/attachment.pgp 


More information about the Kde-hardware-devel mailing list