[oss-devel] Added jack color support to ossxmix
Hannu Savolainen
hannu at opensound.com
Fri Mar 21 12:53:40 EET 2008
Yair K. wrote:
> On Friday 21 March 2008 01:32:27 Hannu Savolainen wrote:
>
>> Hi,
>>
>>
> [snip]
>
>> Note that the rgbcolor field is only present in the latest v4.1 version
>> of OSS (OSS_VERSION >= 0x040004). It will not be available in the 4.0
>> version. Also at this moment only drivers for AC97 based cards (and few
>> other drivers using the legavy OSS3 mixer API) have full support for
>> this feature. Also the hdaudio driver adds rgbcolor info for some
>> controls (but not for all of them).
>>
>
> It would be nice if the area was ifdef'd to OSS_VERSION >= 0x040004. Also the
> _modify_{bg/fg} functions are not available in GTK1.
> The attached patch adds ifdefs, a poll for number of mixers (so if a new
> mixer is added to the system, ossxmix displays it automatically), and a bit
> of cleanup.
>
>
Ok. Now in the hg version.
Btw, you may also periodically (every 5-10 sec) check state of the
SNDCTL_MIXERINFO->enabled field for all existing mixers. This field will
change to false when an USB (or whatever) mixer is unplugged and back to
true when the device gets replugged. If the mixer is not enabled then
the tab for it could be disabled.
However this probably makes things far too complicated. The program will
probably call some mixer ioctl before next poll and just exit because
the call returned ENXIO. Another approach is to check availability of a
mixer device if any ioctl call suddenly returns ENXIO.
>> Next future development might be adding tooltip support to the mixer
>> API. In this way the driver can return a tooltip string that describes
>> the function performed by the control.
>>
>>
>
> (a naming note:) I suggest the mixer API shouldn't be tied too much to the way
> the mixer program should display the controls. Maybe someone will want to
> write a curses-based mixer? Such a program could not use tooltips, but it
> could use a status bar. We could call this "description support" or something
> like that.
>
That might be a good idea.
Best regards,
Hannu
More information about the oss-devel
mailing list