All of lore.kernel.org
 help / color / mirror / Atom feed
* patch: ac97_patch.c - enable 'Smart 5.1' on VIA vt1617a ac97 codec
@ 2007-02-24  0:44 John Utz
  2007-02-26 14:49 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: John Utz @ 2007-02-24  0:44 UTC (permalink / raw)
  To: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 864 bytes --]


This patch allows via vt1617a end users to configure what via calls Smart 5.1 - a mechanism for controlling the 3 bi-directional analog connectors that some OEM's use instead of a larger collection of dedicated analog input and output connectors.

As outlined in previous discussion on this list, the outcome matrix for togging these bits is somewhat arcane and seemingly lacking in cohesion, but with only 3 bits, it's reasonable to expect that a motivated end user will be able to eventually configure their own personal setup to their needs.

Note that in some instances (such as an epia C7) it is also required to disable 'alternate surround out' to get surround to work properly.

Note that this is my first ever alsa patch and after review by wiser craniums it may need fixin'. ;-)

plz dont hesitate to ask for such corrections!

tnx!

johnu

[-- Attachment #1.2: Type: text/html, Size: 1328 bytes --]

[-- Attachment #2: ac97_patch_c-1617aSmart51.patch --]
[-- Type: application/octet-stream, Size: 1395 bytes --]

diff -r 29b0b4245d06 pci/ac97/ac97_patch.c
--- a/pci/ac97/ac97_patch.c	Thu Feb 22 16:07:21 2007 +0100
+++ b/pci/ac97/ac97_patch.c	Fri Feb 23 16:23:36 2007 -0800
@@ -3273,8 +3273,28 @@ static int patch_vt1616(struct snd_ac97 
 /*
  * VT1617A codec
  */
+
+static const struct snd_kcontrol_new snd_ac97_controls_vt1617a[] = {
+  AC97_SINGLE("Center/LFE Exchange",   0x5a,  8, 1, 0),
+  /*
+   * These are used to enable/disable surround sound on motherboards
+   * that have 3 bidirectional analog jacks
+   */
+  AC97_SINGLE("Smart 5.1 Control A", 0x20,  8, 1, 0),
+  AC97_SINGLE("Smart 5.1 Control B", 0x7a, 15, 1, 0),
+  AC97_SINGLE("Smart 5.1 Control C", 0x7a, 14, 1, 0)
+};
+
 static int patch_vt1617a(struct snd_ac97 * ac97)
 {
+        /* instantiate our specific controls, we choose to continue in the event of failure
+	   because we wish to allow the other actions to continue */
+
+	int err = 0;
+
+	err = patch_build_controls(ac97, &snd_ac97_controls_vt1617a[0],
+				   ARRAY_SIZE(snd_ac97_controls_vt1617a));
+
 	/* bring analog power consumption to normal, like WinXP driver
 	 * for EPIA SP
 	 */
@@ -3282,7 +3302,7 @@ static int patch_vt1617a(struct snd_ac97
 	ac97->ext_id |= AC97_EI_SPDIF;	/* force the detection of spdif */
 	ac97->rates[AC97_RATES_SPDIF] = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000;
 	ac97->build_ops = &patch_vt1616_ops;
-	return 0;
+	return err;
 }
 
 /*

[-- Attachment #3: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #4: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: patch: ac97_patch.c - enable 'Smart 5.1' on VIA vt1617a ac97 codec
  2007-02-24  0:44 patch: ac97_patch.c - enable 'Smart 5.1' on VIA vt1617a ac97 codec John Utz
@ 2007-02-26 14:49 ` Takashi Iwai
  2007-02-26 18:25   ` John Utz
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2007-02-26 14:49 UTC (permalink / raw)
  To: John Utz; +Cc: alsa-devel

At Fri, 23 Feb 2007 16:44:33 -0800,
John Utz wrote:
> 
> This patch allows via vt1617a end users to configure what via calls Smart 5.1 - a
> mechanism for controlling the 3 bi-directional analog connectors that some OEM's use
> instead of a larger collection of dedicated analog input and output connectors.
> 
> As outlined in previous discussion on this list, the outcome matrix for togging these
> bits is somewhat arcane and seemingly lacking in cohesion, but with only 3 bits, it's
> reasonable to expect that a motivated end user will be able to eventually configure
> their own personal setup to their needs.
> 
> Note that in some instances (such as an epia C7) it is also required to disable
> 'alternate surround out' to get surround to work properly.
> 
> Note that this is my first ever alsa patch and after review by wiser craniums it may
> need fixin'. ;-)
> 
> plz dont hesitate to ask for such corrections!

Well, I still think that these Smart 5.1 controls are too cryptic.
...and with this patch, you'll have even three such switches!

IMO, it'd be (a little bit) better to have a single control to set up
these things.  For example, you can give an enum control that has 8
entries for SM51A,B,C setups.


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: patch: ac97_patch.c - enable 'Smart 5.1' on VIA vt1617a ac97 codec
  2007-02-26 14:49 ` Takashi Iwai
@ 2007-02-26 18:25   ` John Utz
  0 siblings, 0 replies; 3+ messages in thread
From: John Utz @ 2007-02-26 18:25 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 1730 bytes --]




-----Original Message-----
From: Takashi Iwai [mailto:tiwai@suse.de]
Sent: Mon 2/26/2007 6:49 AM
To: John Utz
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: [Alsa-devel] patch: ac97_patch.c - enable 'Smart 5.1' on VIA vt1617a ac97 codec
 
At Fri, 23 Feb 2007 16:44:33 -0800,
John Utz wrote:
> 
> This patch allows via vt1617a end users to configure what via calls Smart 5.1 - a
> mechanism for controlling the 3 bi-directional analog connectors that some OEM's use
> instead of a larger collection of dedicated analog input and output connectors.
> 
> As outlined in previous discussion on this list, the outcome matrix for togging these
> bits is somewhat arcane and seemingly lacking in cohesion, but with only 3 bits, it's
> reasonable to expect that a motivated end user will be able to eventually configure
> their own personal setup to their needs.
> 
> Note that in some instances (such as an epia C7) it is also required to disable
> 'alternate surround out' to get surround to work properly.
> 
> Note that this is my first ever alsa patch and after review by wiser craniums it may
> need fixin'. ;-)
> 
> plz dont hesitate to ask for such corrections!
*
* Well, I still think that these Smart 5.1 controls are too cryptic.
* ...and with this patch, you'll have even three such switches!

Honestly, it's actually 4, because if the alt output thingy isnt turned off, then surround routes off to nowhere...

* IMO, it'd be (a little bit) better to have a single control to set up
* these things.  For example, you can give an enum control that has 8
* entries for SM51A,B,C setups.

Happy to oblige, I'll study up on AC97_ENUM_* and try to make this possible.

* Takashi



[-- Attachment #1.2: Type: text/html, Size: 2417 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 161 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-26 18:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-24  0:44 patch: ac97_patch.c - enable 'Smart 5.1' on VIA vt1617a ac97 codec John Utz
2007-02-26 14:49 ` Takashi Iwai
2007-02-26 18:25   ` John Utz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.