All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: re-order AC97 codec ID table.
@ 2008-07-15  1:23 Rene Herman
  2008-07-15 13:14 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Rene Herman @ 2008-07-15  1:23 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: ALSA devel

[-- Attachment #1: Type: text/plain, Size: 115 bytes --]

Hi Takashi.

Feel free to drop if considered pointless churn but keeping it ordered 
makes checking easier.

Rene.

[-- Attachment #2: 0002-ALSA-re-order-AC97-codec-ID-table.patch --]
[-- Type: text/plain, Size: 5281 bytes --]

>From 389e02fd488d8ffdaabd6cc10cf788792258916d Mon Sep 17 00:00:00 2001
From: Rene Herman <rene.herman@gmail.com>
Date: Tue, 15 Jul 2008 03:13:01 +0200
Subject: [PATCH] ALSA: re-order AC97 codec ID table.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
---
 sound/pci/ac97/ac97_codec.c |   34 +++++++++++++++++-----------------
 1 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 8c49a00..f1e3a47 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -67,8 +67,8 @@ struct ac97_codec_id {
 };
 
 static const struct ac97_codec_id snd_ac97_codec_id_vendors[] = {
-{ 0x414b4d00, 0xffffff00, "Asahi Kasei",	NULL,	NULL },
 { 0x41445300, 0xffffff00, "Analog Devices",	NULL,	NULL },
+{ 0x414b4d00, 0xffffff00, "Asahi Kasei",	NULL,	NULL },
 { 0x414c4300, 0xffffff00, "Realtek",		NULL,	NULL },
 { 0x414c4700, 0xffffff00, "Realtek",		NULL,	NULL },
 { 0x434d4900, 0xffffff00, "C-Media Electronics", NULL,	NULL },
@@ -94,11 +94,6 @@ static const struct ac97_codec_id snd_ac97_codec_id_vendors[] = {
 };
 
 static const struct ac97_codec_id snd_ac97_codec_ids[] = {
-{ 0x414b4d00, 0xffffffff, "AK4540",		NULL,		NULL },
-{ 0x414b4d01, 0xffffffff, "AK4542",		NULL,		NULL },
-{ 0x414b4d02, 0xffffffff, "AK4543",		NULL,		NULL },
-{ 0x414b4d06, 0xffffffff, "AK4544A",		NULL,		NULL },
-{ 0x414b4d07, 0xffffffff, "AK4545",		NULL,		NULL },
 { 0x41445303, 0xffffffff, "AD1819",		patch_ad1819,	NULL },
 { 0x41445340, 0xffffffff, "AD1881",		patch_ad1881,	NULL },
 { 0x41445348, 0xffffffff, "AD1881A",		patch_ad1881,	NULL },
@@ -112,20 +107,25 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
 { 0x41445374, 0xffffffff, "AD1981B",		patch_ad1981b,	NULL },
 { 0x41445375, 0xffffffff, "AD1985",		patch_ad1985,	NULL },
 { 0x41445378, 0xffffffff, "AD1986",		patch_ad1986,	NULL },
+{ 0x414b4d00, 0xffffffff, "AK4540",		NULL,		NULL },
+{ 0x414b4d01, 0xffffffff, "AK4542",		NULL,		NULL },
+{ 0x414b4d02, 0xffffffff, "AK4543",		NULL,		NULL },
+{ 0x414b4d06, 0xffffffff, "AK4544A",		NULL,		NULL },
+{ 0x414b4d07, 0xffffffff, "AK4545",		NULL,		NULL },
 { 0x414c4300, 0xffffff00, "ALC100,100P", 	NULL,		NULL },
 { 0x414c4710, 0xfffffff0, "ALC200,200P",	NULL,		NULL },
+{ 0x414c4720, 0xfffffff0, "ALC650",		patch_alc650,	NULL },
 { 0x414c4721, 0xffffffff, "ALC650D",		NULL,	NULL }, /* already patched */
 { 0x414c4722, 0xffffffff, "ALC650E",		NULL,	NULL }, /* already patched */
 { 0x414c4723, 0xffffffff, "ALC650F",		NULL,	NULL }, /* already patched */
-{ 0x414c4720, 0xfffffff0, "ALC650",		patch_alc650,	NULL },
-{ 0x414c4760, 0xfffffff0, "ALC655",		patch_alc655,	NULL },
-{ 0x414c4781, 0xffffffff, "ALC658D",		NULL,	NULL }, /* already patched */
-{ 0x414c4780, 0xfffffff0, "ALC658",		patch_alc655,	NULL },
-{ 0x414c4790, 0xfffffff0, "ALC850",		patch_alc850,	NULL },
 { 0x414c4730, 0xffffffff, "ALC101",		NULL,		NULL },
 { 0x414c4740, 0xfffffff0, "ALC202",		NULL,		NULL },
 { 0x414c4750, 0xfffffff0, "ALC250",		NULL,		NULL },
+{ 0x414c4760, 0xfffffff0, "ALC655",		patch_alc655,	NULL },
 { 0x414c4770, 0xfffffff0, "ALC203",		NULL,		NULL },
+{ 0x414c4780, 0xfffffff0, "ALC658",		patch_alc655,	NULL },
+{ 0x414c4781, 0xffffffff, "ALC658D",		NULL,	NULL }, /* already patched */
+{ 0x414c4790, 0xfffffff0, "ALC850",		patch_alc850,	NULL },
 { 0x434d4941, 0xffffffff, "CMI9738",		patch_cm9738,	NULL },
 { 0x434d4961, 0xffffffff, "CMI9739",		patch_cm9739,	NULL },
 { 0x434d4969, 0xffffffff, "CMI9780",		patch_cm9780,	NULL },
@@ -143,7 +143,7 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
 { 0x43525970, 0xfffffff8, "CS4202",		NULL,		NULL },
 { 0x43585421, 0xffffffff, "HSD11246",		NULL,		NULL },	// SmartMC II
 { 0x43585428, 0xfffffff8, "Cx20468",		patch_conexant,	NULL }, // SmartAMC fixme: the mask might be different
-{ 0x43585431, 0xffffffff, "Cx20551",           patch_cx20551,  NULL },
+{ 0x43585431, 0xffffffff, "Cx20551",		patch_cx20551,  NULL },
 { 0x44543031, 0xfffffff0, "DT0398",		NULL,		NULL },
 { 0x454d4328, 0xffffffff, "EM28028",		NULL,		NULL },  // same as TR28028?
 { 0x45838308, 0xffffffff, "ESS1988",		NULL,		NULL },
@@ -171,11 +171,11 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
 { 0x56494182, 0xffffffff, "VIA1618",		NULL,		NULL },
 { 0x57454301, 0xffffffff, "W83971D",		NULL,		NULL },
 { 0x574d4c00, 0xffffffff, "WM9701,WM9701A",	NULL,		NULL },
-{ 0x574d4C03, 0xffffffff, "WM9703,WM9707,WM9708,WM9717", patch_wolfson03, NULL},
-{ 0x574d4C04, 0xffffffff, "WM9704M,WM9704Q",	patch_wolfson04, NULL},
-{ 0x574d4C05, 0xffffffff, "WM9705,WM9710",	patch_wolfson05, NULL},
-{ 0x574d4C09, 0xffffffff, "WM9709",		NULL,		NULL},
-{ 0x574d4C12, 0xffffffff, "WM9711,WM9712",	patch_wolfson11, NULL},
+{ 0x574d4c03, 0xffffffff, "WM9703,WM9707,WM9708,WM9717", patch_wolfson03, NULL},
+{ 0x574d4c04, 0xffffffff, "WM9704M,WM9704Q",	patch_wolfson04, NULL},
+{ 0x574d4c05, 0xffffffff, "WM9705,WM9710",	patch_wolfson05, NULL},
+{ 0x574d4c09, 0xffffffff, "WM9709",		NULL,		NULL},
+{ 0x574d4c12, 0xffffffff, "WM9711,WM9712",	patch_wolfson11, NULL},
 { 0x574d4c13, 0xffffffff, "WM9713,WM9714",	patch_wolfson13, NULL, AC97_DEFAULT_POWER_OFF},
 { 0x594d4800, 0xffffffff, "YMF743",		patch_yamaha_ymf743,	NULL },
 { 0x594d4802, 0xffffffff, "YMF752",		NULL,		NULL },
-- 
1.5.5


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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [PATCH] ALSA: re-order AC97 codec ID table.
  2008-07-15  1:23 [PATCH] ALSA: re-order AC97 codec ID table Rene Herman
@ 2008-07-15 13:14 ` Takashi Iwai
  2008-07-15 14:17   ` Rene Herman
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2008-07-15 13:14 UTC (permalink / raw)
  To: Rene Herman; +Cc: ALSA devel

At Tue, 15 Jul 2008 03:23:55 +0200,
Rene Herman wrote:
> 
> Hi Takashi.
> 
> Feel free to drop if considered pointless churn but keeping it ordered 
> makes checking easier.

The idea is fine, but this breaks the current code...

> @@ -112,20 +107,25 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
>  { 0x41445374, 0xffffffff, "AD1981B",		patch_ad1981b,	NULL },
>  { 0x41445375, 0xffffffff, "AD1985",		patch_ad1985,	NULL },
>  { 0x41445378, 0xffffffff, "AD1986",		patch_ad1986,	NULL },
> +{ 0x414b4d00, 0xffffffff, "AK4540",		NULL,		NULL },
> +{ 0x414b4d01, 0xffffffff, "AK4542",		NULL,		NULL },
> +{ 0x414b4d02, 0xffffffff, "AK4543",		NULL,		NULL },
> +{ 0x414b4d06, 0xffffffff, "AK4544A",		NULL,		NULL },
> +{ 0x414b4d07, 0xffffffff, "AK4545",		NULL,		NULL },
>  { 0x414c4300, 0xffffff00, "ALC100,100P", 	NULL,		NULL },
>  { 0x414c4710, 0xfffffff0, "ALC200,200P",	NULL,		NULL },
> +{ 0x414c4720, 0xfffffff0, "ALC650",		patch_alc650,	NULL },

This entry would win over ALC650* below

>  { 0x414c4721, 0xffffffff, "ALC650D",		NULL,	NULL }, /* already patched */
>  { 0x414c4722, 0xffffffff, "ALC650E",		NULL,	NULL }, /* already patched */
>  { 0x414c4723, 0xffffffff, "ALC650F",		NULL,	NULL }, /* already patched */

... these ones because of the bitmask (the second field).

> -{ 0x414c4720, 0xfffffff0, "ALC650",		patch_alc650,	NULL },
> -{ 0x414c4760, 0xfffffff0, "ALC655",		patch_alc655,	NULL },
> -{ 0x414c4781, 0xffffffff, "ALC658D",		NULL,	NULL }, /* already patched */
> -{ 0x414c4780, 0xfffffff0, "ALC658",		patch_alc655,	NULL },
> -{ 0x414c4790, 0xfffffff0, "ALC850",		patch_alc850,	NULL },
>  { 0x414c4730, 0xffffffff, "ALC101",		NULL,		NULL },
>  { 0x414c4740, 0xfffffff0, "ALC202",		NULL,		NULL },
>  { 0x414c4750, 0xfffffff0, "ALC250",		NULL,		NULL },
> +{ 0x414c4760, 0xfffffff0, "ALC655",		patch_alc655,	NULL },
>  { 0x414c4770, 0xfffffff0, "ALC203",		NULL,		NULL },
> +{ 0x414c4780, 0xfffffff0, "ALC658",		patch_alc655,	NULL },
> +{ 0x414c4781, 0xffffffff, "ALC658D",		NULL,	NULL }, /* already patched */

Ditto for the above two.

Could you fix and repost?


Thanks,

Takashi

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

* Re: [PATCH] ALSA: re-order AC97 codec ID table.
  2008-07-15 13:14 ` Takashi Iwai
@ 2008-07-15 14:17   ` Rene Herman
  2008-07-15 14:29     ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Rene Herman @ 2008-07-15 14:17 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: ALSA devel

[-- Attachment #1: Type: text/plain, Size: 728 bytes --]

On 15-07-08 15:14, Takashi Iwai wrote:

> At Tue, 15 Jul 2008 03:23:55 +0200,
> Rene Herman wrote:
>> Hi Takashi.
>>
>> Feel free to drop if considered pointless churn but keeping it ordered 
>> makes checking easier.
> 
> The idea is fine, but this breaks the current code...

Ah crap, sorry, completely failed to notice. Updated version attached, 
also with the other trivial (whitespace and 'c' instead of 'C') changes 
left out.

Perhaps to avoid another person helpfully screwing this up, it could be 
somewhat useful to order the table down instead of up? In that case, the 
order is just by ID without reference to the mask. If you feel that's 
actually worth it, I'll go and shuffle the entire table around... :)

Rene.

[-- Attachment #2: 0001-ALSA-re-order-AC97-codec-ID-table.patch --]
[-- Type: text/plain, Size: 3438 bytes --]

>From be4db30e1406c3c4e82c124e04bc9bea19e64322 Mon Sep 17 00:00:00 2001
From: Rene Herman <rene.herman@gmail.com>
Date: Tue, 15 Jul 2008 03:00:21 +0200
Subject: [PATCH] ALSA: re-order AC97 codec ID table.

Signed-off-by: Rene Herman <rene.herman@gmail.com>
---
 sound/pci/ac97/ac97_codec.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/sound/pci/ac97/ac97_codec.c b/sound/pci/ac97/ac97_codec.c
index 8c49a00..f6a7d72 100644
--- a/sound/pci/ac97/ac97_codec.c
+++ b/sound/pci/ac97/ac97_codec.c
@@ -67,8 +67,8 @@ struct ac97_codec_id {
 };
 
 static const struct ac97_codec_id snd_ac97_codec_id_vendors[] = {
-{ 0x414b4d00, 0xffffff00, "Asahi Kasei",	NULL,	NULL },
 { 0x41445300, 0xffffff00, "Analog Devices",	NULL,	NULL },
+{ 0x414b4d00, 0xffffff00, "Asahi Kasei",	NULL,	NULL },
 { 0x414c4300, 0xffffff00, "Realtek",		NULL,	NULL },
 { 0x414c4700, 0xffffff00, "Realtek",		NULL,	NULL },
 { 0x434d4900, 0xffffff00, "C-Media Electronics", NULL,	NULL },
@@ -94,11 +94,6 @@ static const struct ac97_codec_id snd_ac97_codec_id_vendors[] = {
 };
 
 static const struct ac97_codec_id snd_ac97_codec_ids[] = {
-{ 0x414b4d00, 0xffffffff, "AK4540",		NULL,		NULL },
-{ 0x414b4d01, 0xffffffff, "AK4542",		NULL,		NULL },
-{ 0x414b4d02, 0xffffffff, "AK4543",		NULL,		NULL },
-{ 0x414b4d06, 0xffffffff, "AK4544A",		NULL,		NULL },
-{ 0x414b4d07, 0xffffffff, "AK4545",		NULL,		NULL },
 { 0x41445303, 0xffffffff, "AD1819",		patch_ad1819,	NULL },
 { 0x41445340, 0xffffffff, "AD1881",		patch_ad1881,	NULL },
 { 0x41445348, 0xffffffff, "AD1881A",		patch_ad1881,	NULL },
@@ -112,20 +107,25 @@ static const struct ac97_codec_id snd_ac97_codec_ids[] = {
 { 0x41445374, 0xffffffff, "AD1981B",		patch_ad1981b,	NULL },
 { 0x41445375, 0xffffffff, "AD1985",		patch_ad1985,	NULL },
 { 0x41445378, 0xffffffff, "AD1986",		patch_ad1986,	NULL },
+{ 0x414b4d00, 0xffffffff, "AK4540",		NULL,		NULL },
+{ 0x414b4d01, 0xffffffff, "AK4542",		NULL,		NULL },
+{ 0x414b4d02, 0xffffffff, "AK4543",		NULL,		NULL },
+{ 0x414b4d06, 0xffffffff, "AK4544A",		NULL,		NULL },
+{ 0x414b4d07, 0xffffffff, "AK4545",		NULL,		NULL },
 { 0x414c4300, 0xffffff00, "ALC100,100P", 	NULL,		NULL },
 { 0x414c4710, 0xfffffff0, "ALC200,200P",	NULL,		NULL },
 { 0x414c4721, 0xffffffff, "ALC650D",		NULL,	NULL }, /* already patched */
 { 0x414c4722, 0xffffffff, "ALC650E",		NULL,	NULL }, /* already patched */
 { 0x414c4723, 0xffffffff, "ALC650F",		NULL,	NULL }, /* already patched */
 { 0x414c4720, 0xfffffff0, "ALC650",		patch_alc650,	NULL },
-{ 0x414c4760, 0xfffffff0, "ALC655",		patch_alc655,	NULL },
-{ 0x414c4781, 0xffffffff, "ALC658D",		NULL,	NULL }, /* already patched */
-{ 0x414c4780, 0xfffffff0, "ALC658",		patch_alc655,	NULL },
-{ 0x414c4790, 0xfffffff0, "ALC850",		patch_alc850,	NULL },
 { 0x414c4730, 0xffffffff, "ALC101",		NULL,		NULL },
 { 0x414c4740, 0xfffffff0, "ALC202",		NULL,		NULL },
 { 0x414c4750, 0xfffffff0, "ALC250",		NULL,		NULL },
+{ 0x414c4760, 0xfffffff0, "ALC655",		patch_alc655,	NULL },
 { 0x414c4770, 0xfffffff0, "ALC203",		NULL,		NULL },
+{ 0x414c4781, 0xffffffff, "ALC658D",		NULL,	NULL }, /* already patched */
+{ 0x414c4780, 0xfffffff0, "ALC658",		patch_alc655,	NULL },
+{ 0x414c4790, 0xfffffff0, "ALC850",		patch_alc850,	NULL },
 { 0x434d4941, 0xffffffff, "CMI9738",		patch_cm9738,	NULL },
 { 0x434d4961, 0xffffffff, "CMI9739",		patch_cm9739,	NULL },
 { 0x434d4969, 0xffffffff, "CMI9780",		patch_cm9780,	NULL },
-- 
1.5.5


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

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: [PATCH] ALSA: re-order AC97 codec ID table.
  2008-07-15 14:17   ` Rene Herman
@ 2008-07-15 14:29     ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2008-07-15 14:29 UTC (permalink / raw)
  To: Rene Herman; +Cc: ALSA devel

At Tue, 15 Jul 2008 16:17:32 +0200,
Rene Herman wrote:
> 
> On 15-07-08 15:14, Takashi Iwai wrote:
> 
> > At Tue, 15 Jul 2008 03:23:55 +0200,
> > Rene Herman wrote:
> >> Hi Takashi.
> >>
> >> Feel free to drop if considered pointless churn but keeping it ordered 
> >> makes checking easier.
> > 
> > The idea is fine, but this breaks the current code...
> 
> Ah crap, sorry, completely failed to notice. Updated version attached, 
> also with the other trivial (whitespace and 'c' instead of 'C') changes 
> left out.
> 
> Perhaps to avoid another person helpfully screwing this up, it could be 
> somewhat useful to order the table down instead of up? In that case, the 
> order is just by ID without reference to the mask. If you feel that's 
> actually worth it, I'll go and shuffle the entire table around... :)

Well, I think it's enough to add comments appropriately.
Anyway, I applied this patch as is.  If you have more changes, please
post an incremental one.


thanks,

Takashi

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

end of thread, other threads:[~2008-07-15 14:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-15  1:23 [PATCH] ALSA: re-order AC97 codec ID table Rene Herman
2008-07-15 13:14 ` Takashi Iwai
2008-07-15 14:17   ` Rene Herman
2008-07-15 14:29     ` Takashi Iwai

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.