Clive Wright kirjoitti:
> [EMAIL PROTECTED] wrote:
>   
>> Hi all,
>>
>> I'm currently hacking around in kmix to add at least basic OSS4 support. 
>> I've 
>> got an usb device with a output.vol control with a value range of 0 - 37. I 
>> of course get values much higher than that when reading from the mixer 
>> device. The normal procedure as shown in the doc and in the ossmix source is 
>> to clamp (is that the right word?) with a bitmask. 
>>
>> According to the documentation the value is a 31 bit positive integer, 
>> therefore the bitmask should be 0xFFFFFFFE - but that would be wrong, 
>> because 
>> I'd get values of about 9k, whereas I need 0 - 37, which I get when using 
>> the 
>> bitmask 0xFF and AND the value with it. 
>> What's wrong here, me or the documentation?
>>
>>     
>
> If control is graduated in centibels required range is probably 0 to 370
> whereas kmix is probably 0 to 100 so you will have to apply a scaling 
> factor (kmix * 37 / 10 = ossmix). Ideally mixer should read max. value 
> and scale accordingly.
>   
The driver should return maxvalue=370 in that case. The value returned 
for a any of the channels should never be higher than the maximum value.

Best regards,

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

Reply via email to