On 6/5/08, Clive Wright <[EMAIL PROTECTED]> wrote:
>
> 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
>
>  0:
> Device root 'oss_hdaudio0' / High Definition Audio ALC880
>  1: ******* Extension entries ********
>  2: Group: 'jack', parent=0
>  3: Group: 'green', parent=2
>  4: Enumerated control: 'mode' (jack.green.mode), parent=3, flags=3,
> mask=0003  Current value=0
>  5: On/off switch: 'mute' (jack.green.mute), parent=3, flags=3  Current
> value=0 (OFF)
>  6: On/off switch: 'front-mute' (jack.green.front-mute), parent=3, flags=3
>  Current value=0 (OFF)
>  7: On/off switch: 'inputmix-mute' (jack.green.inputmix-mute), parent=3,
> flags=3  Current value=0 (OFF)
>  8: Stereo slider: 'front' (jack.green.front), parent=3, max=649, flags=103
>  Current value=0x027f027f
>  9: Group: 'black', parent=2
> 10: Enumerated control: 'mode' (jack.black.mode), parent=9, flags=3,
> mask=0003  Current value=0
> 11: On/off switch: 'mute' (jack.black.mute), parent=9, flags=3  Current
> value=0 (OFF)
> 12: On/off switch: 'rear-mute' (jack.black.rear-mute), parent=9, flags=3
>  Current value=0 (OFF)
> 13: On/off switch: 'inputmix-mute' (jack.black.inputmix-mute), parent=9,
> flags=3  Current value=0 (OFF)
> 14: Stereo slider: 'rear' (jack.black.rear), parent=9, max=649, flags=103
>  Current value=0x02430243
> 15: Group: 'orange', parent=2
> 16: Enumerated control: 'mode' (jack.orange.mode), parent=15, flags=3,
> mask=0003  Current value=0
> 17: On/off switch: 'mute' (jack.orange.mute), parent=15, flags=3  Current
> value=0 (OFF)
> 18: On/off switch: 'center/LFE-mute' (jack.orange.center/lfe-mute),
> parent=15, flags=3  Current value=0 (OFF)
> 19: On/off switch: 'inputmix-mute' (jack.orange.inputmix-mute), parent=15,
> flags=3  Current value=0 (OFF)
> 20: Stereo slider: 'center/LFE' (jack.orange.center/lfe), parent=15,
> max=649, flags=103  Current value=0x02430243
> 21: Group: 'gray', parent=2
> 22: Enumerated control: 'mode' (jack.gray.mode), parent=21, flags=3,
> mask=0003  Current value=0
> 23: On/off switch: 'mute' (jack.gray.mute), parent=21, flags=3  Current
> value=0 (OFF)
> 24: On/off switch: 'side-mute' (jack.gray.side-mute), parent=21, flags=3
>  Current value=0 (OFF)
> 25: On/off switch: 'inputmix-mute' (jack.gray.inputmix-mute), parent=21,
> flags=3  Current value=0 (OFF)
> 26: Stereo slider: 'side' (jack.gray.side), parent=21, max=649, flags=103
>  Current value=0x02430243
> 27: Group: 'jack', parent=0
> 28: Group: 'pink', parent=27
> 29: Enumerated control: 'mode' (jack.pink.mode), parent=28, flags=3,
> mask=0003  Current value=0
> 30: On/off switch: 'mute' (jack.pink.mute), parent=28, flags=3  Current
> value=0 (OFF)
> 31: Enumerated control: 'source-a' (jack.pink.source-a), parent=28,
> flags=3, mask=000f  Current value=0
> 32: Group: 'fp-pink', parent=27
> 33: Enumerated control: 'mode' (jack.fp-pink.mode), parent=32, flags=3,
> mask=0003  Current value=0
> 34: On/off switch: 'mute' (jack.fp-pink.mute), parent=32, flags=3  Current
> value=0 (OFF)
> 35: Enumerated control: 'source-b' (jack.fp-pink.source-b), parent=32,
> flags=3, mask=000f  Current value=0
> 36: Group: 'blue', parent=27
> 37: Enumerated control: 'mode' (jack.blue.mode), parent=36, flags=3,
> mask=0003  Current value=0
> 38: On/off switch: 'mute' (jack.blue.mute), parent=36, flags=3  Current
> value=0 (OFF)
> 39: Enumerated control: 'source-c' (jack.blue.source-c), parent=36,
> flags=3, mask=000f  Current value=0
> 40: Group: 'fp-green', parent=27
> 41: Enumerated control: 'mode' (jack.fp-green.mode), parent=40, flags=3,
> mask=0003  Current value=0
> 42: On/off switch: 'mute' (jack.fp-green.mute), parent=40, flags=3  Current
> value=0 (OFF)
> 43: Enumerated control: 'source-d' (jack.fp-green.source-d), parent=40,
> flags=3, mask=000f  Current value=0
> 44: Group: 'jack', parent=0
> 45: Group: 'record', parent=0
> 46: Group: 'rec1', parent=45
> 47: Stereo slider: '-' (record.rec1), parent=46, max=359, flags=103
>  Current value=0x013f013f
> 48: Enumerated control: 'rec1' (record.rec1.rec1), parent=46, flags=3,
> mask=0017  Current value=0
> 49: Group: 'rec2', parent=45
> 50: Stereo slider: '-' (record.rec2), parent=49, max=359, flags=103
>  Current value=0x013f013f
> 51: Enumerated control: 'rec2' (record.rec2.rec2), parent=49, flags=3,
> mask=0017  Current value=2
> 52: Group: 'rec3', parent=45
> 53: Stereo slider: '-' (record.rec3), parent=52, max=359, flags=103
>  Current value=0x013f013f
> 54: Enumerated control: 'rec3' (record.rec3.rec3), parent=52, flags=3,
> mask=0037  Current value=4
> 55: Group: 'misc', parent=0
> 56: Stereo slider: 'source-a' (misc.source-a), parent=55, max=659,
> flags=103  Current value=0x024d024d
> 57: Stereo slider: 'source-b' (misc.source-b), parent=55, max=659,
> flags=103  Current value=0x024d024d
> 58: Stereo slider: 'source-c' (misc.source-c), parent=55, max=659,
> flags=103  Current value=0x024d024d
> 59: Stereo slider: 'source-d' (misc.source-d), parent=55, max=659,
> flags=103  Current value=0x024d024d
> 60: Stereo slider: 'int-cd' (misc.int-cd), parent=55, max=659, flags=103
>  Current value=0x024d024d
> 61: Stereo slider: 'int-linein' (misc.int-linein), parent=55, max=659,
> flags=103  Current value=0x024d024d
> 62: Stereo slider: 'front' (misc.front), parent=55, max=659, flags=103
>  Current value=0x024d024d
> 63: Stereo slider: 'rear' (misc.rear), parent=55, max=659, flags=103
>  Current value=0x024d024d
> 64: Enumerated control: 'inputmix' (misc.inputmix), parent=55, flags=3,
> mask=0037  Current value=0
> 65: Enumerated control: 'vmix0-channels' (vmix0-channels), parent=0,
> flags=3, mask=ffff  Current value=0
> 66: Enumerated control: 'vmix0-src' (vmix0-src), parent=0, flags=8003,
> mask=ffff  Current value=0
> 67: Mono slider: 'vmix0-vol' (vmix0-vol), parent=0, max=250, flags=903
>  Current value=0xfa00fa
> 68: Stereo peak meter: 'vmix0-out' (vmix0-out1), parent=0, max=144,
> flags=205  Current value=0x0000
> 69: Group: 'vmix0-out', parent=0
> 70: Stereo peak meter: 'vmix0-in' (vmix0-in), parent=0, max=144, flags=205
>  Current value=0x0000
> 71: Stereo slider: '@pcm8' (vmix0-out.pcm8), parent=69, max=250, flags=903
>  Current value=0x00fa00fa
> 72: Stereo peak meter: '' (vmix0-out2), parent=69, max=144, flags=205
>  Current value=0x0000
> 73: Stereo slider: '@pcm9' (vmix0-out.pcm9), parent=69, max=250, flags=903
>  Current value=0x00fa00fa
> 74: Stereo peak meter: '' (vmix0-out3), parent=69, max=144, flags=205
>  Current value=0x0000
> 75: Stereo slider: '@pcm10' (vmix0-out.pcm10), parent=69, max=250,
> flags=903  Current value=0x00fa00fa
> 76: Stereo peak meter: '' (vmix0-out4), parent=69, max=144, flags=205
>  Current value=0x0000
> 77: Stereo slider: '@pcm11' (vmix0-out.pcm11), parent=69, max=250,
> flags=903  Current value=0x00fa00fa
> 78: Stereo peak meter: '' (vmix0-out5), parent=69, max=144, flags=205
>  Current value=0x0000
>
> _______________________________________________
> oss-devel mailing list
> oss-devel@mailman.opensound.com
> http://mailman.opensound.com/mailman/listinfo/oss-devel
>
>
>
Hi Clive,

I've attached output of ossmix -D. Group 2 is definitely affected by your
patch. As you can see group 3 follows this group and they have the same
parent (0), so group 2 is ignored. On the other hand group 2 is the parent
of such controls as ENVY24_RATE, ENVY24_SYNC etc.

I also have attached my own patch to ossxmix that should ignore empty groups
correctly. Could you please try it and see if it solves problems with empty
groups and does not cause any other troubles? It works fine for me, that is
all controls are shown, but I can't check if it ignores empty groups in
practice (though theoretically it should).

Regards,
           Zakhar Levchenko

Attachment: ossmix_output
Description: Binary data

Attachment: ossxmix_empty_groups.diff
Description: Binary data

_______________________________________________
oss-devel mailing list
oss-devel@mailman.opensound.com
http://mailman.opensound.com/mailman/listinfo/oss-devel

Reply via email to