Skip to contentSkip to conversation

hda/patch-realtek.c: minor bug?

DISCUSSION Jonathan Woithe 2 participants 4 messages Jan 19, 2006 – Jan 24, 2006 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi everyone

While looking through patch-realtek.c for a completely unrelated reason I noticed what I think is a small bug in the setup of the initialisation verbs. This is in 1.0.11rc1. I noticed the following fragment at line 2474 in the alc260_init_verbs definition:

        /* LINE-2 is used for line-out in rear */
        {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
        /* select line-out */
        {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},

Obviously the intention is to select the LOUT1 sum widget to be the source for the LINE-2 pin widget. However, the input selector for the LINE-2 pin widget isn't actually a part of the pin widget - it is a separate widget with its own NID (0x0e). This is apparent when looking at the "get/set connection select" sections of the ALC260 datasheet; NID 0x15 does not accept this verb, and NID 0x0e is described as the "LINE2 Selector". It would of course be helpful and clearer if the selector NIDs were mentioned on the block diagram of the datasheet.

Anyway, as far as my understanding goes, to select LOUT1 as the source for the LINE-2 pin widget, the correct AC_VERB_SET_CONNECT_SEL entry should be

        {0x0e, AC_VERB_SET_CONNECT_SEL, 0x00},

As it stands things still work: the LINE-2 widget ignores the verb and the default setting for the 0x0e selector is 0x00. However, perhaps the initialisation verb list in the driver should still be corrected for completeness?

Regards
jonathan

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

#2 lore raw

At Fri, 20 Jan 2006 10:06:20 +1030 (CST),

Quoted 25 lines · Jonathan Woithe

Hi everyone

While looking through patch-realtek.c for a completely unrelated reason I noticed what I think is a small bug in the setup of the initialisation verbs. This is in 1.0.11rc1. I noticed the following fragment at line 2474 in the alc260_init_verbs definition:

        /* LINE-2 is used for line-out in rear */
        {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
        /* select line-out */
        {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},

Obviously the intention is to select the LOUT1 sum widget to be the source for the LINE-2 pin widget. However, the input selector for the LINE-2 pin widget isn't actually a part of the pin widget - it is a separate widget with its own NID (0x0e). This is apparent when looking at the "get/set connection select" sections of the ALC260 datasheet; NID 0x15 does not accept this verb, and NID 0x0e is described as the "LINE2 Selector". It would of course be helpful and clearer if the selector NIDs were mentioned on the block diagram of the datasheet.

Anyway, as far as my understanding goes, to select LOUT1 as the source for the LINE-2 pin widget, the correct AC_VERB_SET_CONNECT_SEL entry should be

Quoted 6 lines
        {0x0e, AC_VERB_SET_CONNECT_SEL, 0x00},

As it stands things still work: the LINE-2 widget ignores the verb and the default setting for the 0x0e selector is 0x00. However, perhaps the initialisation verb list in the driver should still be corrected for completeness?

Yep, seems you're right. Could you create a patch to the latest ALSA version? It'd be greatly appreciated.

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

#3 lore raw

Hi Takashi

Quoted 24 lines
Quoted 24 lines

While looking through patch-realtek.c for a completely unrelated reason I noticed what I think is a small bug in the setup of the initialisation verbs. This is in 1.0.11rc1. I noticed the following fragment at line 2474 in the alc260_init_verbs definition:

        /* LINE-2 is used for line-out in rear */
        {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
        /* select line-out */
        {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},

Obviously the intention is to select the LOUT1 sum widget to be the source for the LINE-2 pin widget. However, the input selector for the LINE-2 pin widget isn't actually a part of the pin widget - it is a separate widget with its own NID (0x0e). This is apparent when looking at the "get/set connection select" sections of the ALC260 datasheet; NID 0x15 does not accept this verb, and NID 0x0e is described as the "LINE2 Selector". It would of course be helpful and clearer if the selector NIDs were mentioned on the block diagram of the datasheet.

Anyway, as far as my understanding goes, to select LOUT1 as the source for the LINE-2 pin widget, the correct AC_VERB_SET_CONNECT_SEL entry should be

        {0x0e, AC_VERB_SET_CONNECT_SEL, 0x00},
Quoted 7 lines
Quoted 4 lines

As it stands things still work: the LINE-2 widget ignores the verb and the default setting for the 0x0e selector is 0x00. However, perhaps the initialisation verb list in the driver should still be corrected for completeness?

Yep, seems you're right. Could you create a patch to the latest ALSA version? It'd be greatly appreciated.

Here's a patch against 1.0.11rc2. If this is insufficiently recent let me know and I'll drag a CVS version down.

patch_realtek.c renamed from patch_realtek.c-orig +1 -1
@@ -2475,7 +2475,7 @@
 	/* LINE-2 is used for line-out in rear */
 	{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 	/* select line-out */
-	{0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
+	{0x0e, AC_VERB_SET_CONNECT_SEL, 0x00},
 	/* LINE-OUT pin */
 	{0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 	/* enable HP */

Regards
jonathan

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

#4 lore raw

At Tue, 24 Jan 2006 10:06:07 +1030 (CST),

Quoted 32 lines · Jonathan Woithe

Hi Takashi

Quoted 29 lines
Quoted 28 lines

While looking through patch-realtek.c for a completely unrelated reason I noticed what I think is a small bug in the setup of the initialisation verbs. This is in 1.0.11rc1. I noticed the following fragment at line 2474 in the alc260_init_verbs definition:

        /* LINE-2 is used for line-out in rear */
        {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
        /* select line-out */
        {0x15, AC_VERB_SET_CONNECT_SEL, 0x00},

Obviously the intention is to select the LOUT1 sum widget to be the source for the LINE-2 pin widget. However, the input selector for the LINE-2 pin widget isn't actually a part of the pin widget - it is a separate widget with its own NID (0x0e). This is apparent when looking at the "get/set connection select" sections of the ALC260 datasheet; NID 0x15 does not accept this verb, and NID 0x0e is described as the "LINE2 Selector". It would of course be helpful and clearer if the selector NIDs were mentioned on the block diagram of the datasheet.

Anyway, as far as my understanding goes, to select LOUT1 as the source for the LINE-2 pin widget, the correct AC_VERB_SET_CONNECT_SEL entry should be

        {0x0e, AC_VERB_SET_CONNECT_SEL, 0x00},

As it stands things still work: the LINE-2 widget ignores the verb and the default setting for the 0x0e selector is 0x00. However, perhaps the initialisation verb list in the driver should still be corrected for completeness?

Quoted 5 lines
Quoted 2 lines

Yep, seems you're right. Could you create a patch to the latest ALSA version? It'd be greatly appreciated.

Here's a patch against 1.0.11rc2. If this is insufficiently recent let me know and I'll drag a CVS version down.

Thanks, I applied it now to CVS.

Takashi

Quoted 13 lines
patch_realtek.c renamed from patch_realtek.c-orig +1 -1
@@ -2475,7 +2475,7 @@
 	/* LINE-2 is used for line-out in rear */
 	{0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 	/* select line-out */
-	{0x15, AC_VERB_SET_CONNECT_SEL, 0x00},
+	{0x0e, AC_VERB_SET_CONNECT_SEL, 0x00},
 	/* LINE-OUT pin */
 	{0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
 	/* enable HP */
Quoted 3 lines

Regards
jonathan

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642