At Thu, 26 Sep 2002 14:37:24 -0700,
David Shust wrote:
> 
> I have a problem with which type of mixer control I should use.
> 
> For S/PDIF output, there is the choice of selecting no output pin,
> (YMF753 default behaviour), or pin 43 or 48. 
> It is also possible to select the mapping of input to S/PDIF output,
> as coming from the 'AC-link' or A/D converter'.
> 
> Is is better to use the values 0, 1, 2 for output pin, such that one
> can use alsamixer to see the control, or the more meaningful
> enumerated control type as seen by amixer, with the enumerations
> 'Unselected', 'Pin 43', and 'Pin 48'?  

don't worry, the new alsamixer on cvs can control enumerated items.
it's no problem at all to use enum elements.

> For the input mapping, should I use the enumerations 'AC-link' and
> 'A/D converter', or the numbers 0 and 1, or just a switch.
> 
> For example, the control 'IEC958 Playback AC97-SPSA' gives no
> indication of what the values 0 through 3 actually mean. Unless you
> read the code and understand the AC '97 spec, the values are
> meaningless. The only advantage I see in using integers here is that
> the control will show up in alsamixer. 
> 
> Which policy should I adopt? As it is, I've rewritten my patch to use enumerations:
> 
> numid=40,iface=MIXER,name='IEC958 Playback Source'
>   ; type=ENUMERATED,access=rw---,values=1,items=2
>   ; Item #0 'AC-Link'
>   ; Item #1 'A/D Converter'
>   : values=0
> 
> numid=41,iface=MIXER,name='IEC958 Playback Output Pin'
>   ; type=ENUMERATED,access=rw---,values=1,items=3
>   ; Item #0 'Unselected'
>   ; Item #1 'Pin 43'
>   ; Item #2 'Pin 48'
>   : values=1
> 
> How do you feel about this?

i feel 'Disabled' better than 'Unselected', but it's a matter of
taste.  perhaps a native english speaker would decide it better.

anyway, agreed to use enum items.


> Another point is the S/PDIF startup delay, added after DAC startup
> in order to avoid missing the first bit of audio. This is not YMF753
> specific from what I can tell. I am assuming it is relevant for all
> AC '97 chips, and therefore have added to the ac97 struct the field
> spdif_startup_delay, and a control to diddle it in the form: 
> 
> numid=37,iface=MIXER,name='IEC958 Playback Startup Delay'
>   ; type=INTEGER,access=rw---,values=1,min=0,max=99,step=0
>   : values=14
> 
> Is this OK?
 
is this delay really necessary?

for this parameter, the control api doesn't play a role properly,
because this delay is necessary at the start up, isn't it?

i think it's enough to put a standard delay (only if this spdif
support is found).  how long is needed as minimum?

or, put the value into ac97_t struct and let each card-driver
initialize it.  i think only few cards are equipped with YMF codec and
SPDIF, anyway.  which card are you using?

also, this delay should be necessary in the resume routine.
and please note that in the resume you cannot use schedule() but only
a busy-loop such like udelay() or mdelay().


> Another point is specifying the speaker type to the YMF753:
> 
> numid=33,iface=MIXER,name='3D Control - Speaker'
>   ; type=ENUMERATED,access=rw---,values=1,items=4
>   ; Item #0 'Standard'
>   ; Item #1 'Standard'
>   ; Item #2 'Small'
>   ; Item #3 'Smaller'
>   : values=3
> 
> Once again, it seems to me more useful to use
> enumerations. Otherwise, how is the user supposed to know what the
> numbers mean? By looking it up somewhere? 
 
let's use enum here, too.  btw, items #0 and #1 are identical?


ciao,

Takashi


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to