[oss-devel] ossxmix patch to ignore empty mixer groups

Clive Wright clive_wright at ntlworld.com
Thu Jun 5 01:14:58 EEST 2008


Zakhar Levchenko wrote:
> 
> 
<snip>
> 
> Hi,
> 
> I want add some notes about this patch. This patch is incorrect and 
> causes troubles because some controls are not shown at all. For example, 
> rate, sync and some other controls are not shown for my sound card. The 
> same problem is reported by Temujin on the forum. The criterion used to 
> ignore some groups is weird. I think that group may be ignored if no 
> other mixer control uses it as a parent (this requires however checking 
> all mixer controls in a loop). This however is not checked at all. 
> Instead strange comparison of parents of adjacent controls is used. 
> Maybe this works for some hdaudio drivers mentioned by Clive but causes 
> troubles in general. So this patch should be revised and rewritten. I 
> probably can do it myself, but I have no problems with empty groups so I 
> can't check if any my changes solve the initial problem described by Clive.
> 
> Regards,
>             Zakhar Levchenko
> 
> 
Hi,
I have attached the output of ossmix -D to show the problem that my 
patch was written to overcome.

Item #44 is an empty group which ideally should never be produced by the 
  oss_hdaudio driver. Item #45 (ie i+1) is a group with the same parent 
so my criterion is satisfied and the group is suppressed.

I had assumed that irrespective of the driver used, groups would be 
created before the controls they contain (1) and that controls would be 
created in sequence (2) so as to be correctly placed within their parent 
group. This is true for hdaudio but from the problems you describe may 
not be true for the mixers produced by other drivers.

I guess control #70 shows my assumption to be wrong as it has a parent 
of #0 yet follows group #69 but it does not cause a problem.

To re-read the whole mixer layout each time a group is found would add a 
large (and I would say unacceptable) processing overhead especially as 
this is not a one off initialisation event but will be repeated each 
time the mixer is reloaded.

Provided my assumption 1. is true a "for loop" would only need to check 
between "i + 1" and "n" for controls with parent equal to "i" and could 
be terminated as soon as a match is discovered which would reduce the 
processing load significantly although how to determine whether this 
would be acceptable eludes me.

Zakhar & Temüjin,

Could you send me the output of ossmix -D for the mixers that are 
adversely effected by my patch.

Kind regards,
Clive
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ossmix.txt
Url: http://mailman.opensound.com/pipermail/oss-devel/attachments/20080604/e4ca1179/attachment.txt 


More information about the oss-devel mailing list