On Sunday 03 February 2008 19:04:33 Hannu Savolainen wrote:
> Hi,
>
> > Hi,
> >
> >   Most mixers contain "rec" buttons which let the user select recording
> > source. Some mixers let multiple recording sources be selected.
> >
> > A. When setting the on/off value with SNDCTL_MIX_WRITE on a rec button,
> > val.value is always returned as 1. Shouldn't it be 0 or 1 according to
> > whether the source is selected?
>
> Right. This is a bug. It will be fixed in the next version.
>

On a more general complaint, there's a problem with the MIXT_ONOFF type - the 
mixer application can't tell what they do. Let us examine a not uncommon use 
case: A mixer application wants to make sure a certain control is muted[0].

Well, we could set the control to zero.
Except that according to the manual[1], this may not be enough, there may a 
separate mute control.
We can reasonably assume it's a control with type MIXT_ONOFF in the group 
assigned to the control we want to mute (even though the manual doesn't say 
that).
But there may be more than one MIXT_ONOFF control (let's say it can be used as 
a recording source, so we have a "rec" button). Which one is the mute button? 
We can check for the name. It may labeled "mute", but it can also be labeled 
as "silence", or "quiet", etc. So we don't have any way of actually being 
sure.

 Now, there are far too many device-specific options for everything to be 
standardized, but currently, too little is standard, and it harms some use 
cases[2]. I think the recording source selection and channel muting in 
particular are affected.

IMHO, There are two possible solutions:
  1. Gurantee "mute" name for mute buttons, "rec" for recording source 
selection, etc.
  2. Use the flags field to tell what the button does. mute buttons can have 
MIXF_*VOL for example, since they do control the volume in a way. Not sure 
about "rec" buttons.

[0] Like a tv-recording app which wants to make sure "line" is muted, so that 
the user won't hear the recording while it's being made. Making it call ossmix 
doesn't solve anything, since the question simply become "what commands do we 
send to ossmix?" rather than "what ioctls do we send to /dev/mixer?".
[1] http://manuals.opensound.com/developer/mixer_value_scaling.html
[2] Maybe we want to place "rec" buttons below the slider, but "mute" buttons 
above, like kmix does.

Yours,
        Yair K.
_______________________________________________
oss-devel mailing list
oss-devel@mailman.opensound.com
http://mailman.opensound.com/mailman/listinfo/oss-devel

Reply via email to