Re: doesn anybody actually ever assign to snd_ac97.indep_surround?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Thu, 22 Feb 2007 16:12:50 -0800,
John Utz wrote:
> 
> It seems to me that this is something that one might want to fill out on a per card/
> motherboar basis, because it appears that there functions that try to make decisions
> based on it's status:
> 
> /* system has shared jacks with surround out enabled */
> static inline int is_shared_surrout(struct snd_ac97 *ac97)
> {
>         return !ac97->indep_surround && is_surround_on(ac97);
> }
> 
> /* system has shared jacks with center/lfe out enabled */
> static inline int is_shared_clfeout(struct snd_ac97 *ac97)
> {
>         return !ac97->indep_surround && is_clfe_on(ac97);
> }
> 
> /* system has shared jacks with line in enabled */
> static inline int is_shared_linein(struct snd_ac97 *ac97)
> {
>         return !ac97->indep_surround && !is_surround_on(ac97);
> }
> 
> /* system has shared jacks with mic in enabled */
> static inline int is_shared_micin(struct snd_ac97 *ac97)
> {
>         return !ac97->indep_surround && !is_clfe_on(ac97);
> }
> 
> so, where do i set this thing? how do i distinguish between a chip installed on a
> board/card with 3 bidirection plugs vs a board with several dedicated ins and outs?
> 
> or, is this whole thing an idea that is in the code but not actively utilized?

The basic idea behind this implementation is that you set up the
surround setting dynamically.  There are two switches to play
important roles that are created usually:

1. Surround Jack Mode
	enum: Shared / Independent
2. Channel Mode
	enum: 2ch / 4ch / 6ch

When "Shared" is selected, the ac97 patch should set up the codec chip
for the bidirectional pins.  Inputs are turned to be surround outputs
according to the the current status of channel mode (2, 4, 6ch).
OTOH, when "Independent" is selected, it means that the board has
separate surround jacks, so the inputs are always inputs.
You should have update_jacks callback to update the jack status
appropriately.  This callback is called when the above mixer switches
are changed.  In the update_jacks callback, you can use helper
function is_shared_surrout() and is_shared_clfeout() that tell you
whether the line-in and mic-in jacks should be handled as output or
not.


Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux