Skip to contentSkip to conversation

emu10k1: minor send routing cleanup

PATCH Applied Lee Revell 2 participants 3 messages Nov 16, 2004 – Nov 20, 2004

lore
Share & tools
lore

Lee Revell

author
#0 lore raw

PATCH 1/1 emu10k1: minor send routing cleanup

Use snd_emu10k1_compose_audigy_fxrt* macro where appropriate. Also add a few comments to explain send routing structure.

alsa-kernel/include/emu10k1.h +1 -0
diff -Nru alsa-multi/alsa-kernel/include/emu10k1.h alsa-dev/alsa-kernel/include/emu10k1.h
@@ -833,6 +833,7 @@
 };
 
 typedef struct {
+	/* mono, left, right x 8 sends (4 on emu10k1) */
 	unsigned char send_routing[3][8];
 	unsigned char send_volume[3][8];
 	unsigned short attn[3];
alsa-kernel/pci/emu10k1/emupcm.c +3 -8
diff -Nru alsa-multi/alsa-kernel/pci/emu10k1/emupcm.c alsa-dev/alsa-kernel/pci/emu10k1/emupcm.c
@@ -336,6 +336,7 @@
 		send_routing[3] = 3;
 		memset(send_amount, 0, sizeof(send_amount));
 	} else {
+		/* mono, left, right (master voice = left) */
 		tmp = stereo ? (master ? 1 : 2) : 0;
 		memcpy(send_routing, &mix->send_routing[tmp][0], 8);
 		memcpy(send_amount, &mix->send_volume[tmp][0], 8);
@@ -363,15 +364,9 @@
 	// setup routing
 	if (emu->audigy) {
 		snd_emu10k1_ptr_write(emu, A_FXRT1, voice,
-				      ((unsigned int)send_routing[3] << 24) |
-				      ((unsigned int)send_routing[2] << 16) |
-				      ((unsigned int)send_routing[1] << 8) |
-				      (unsigned int)send_routing[0]);
+				      snd_emu10k1_compose_audigy_fxrt1(send_routing));
 		snd_emu10k1_ptr_write(emu, A_FXRT2, voice,
-				      ((unsigned int)send_routing[7] << 24) |
-				      ((unsigned int)send_routing[6] << 16) |
-				      ((unsigned int)send_routing[5] << 8) |
-				      (unsigned int)send_routing[4]);
+				      snd_emu10k1_compose_audigy_fxrt2(send_routing));
 		snd_emu10k1_ptr_write(emu, A_SENDAMOUNTS, voice,
 				      ((unsigned int)send_amount[4] << 24) |
 				      ((unsigned int)send_amount[5] << 16) |

-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

Applied
#1 lore raw

At Tue, 16 Nov 2004 17:55:45 -0500,

Quoted 5 lines · Lee Revell

Use snd_emu10k1_compose_audigy_fxrt* macro where appropriate. Also add a few comments to explain send routing structure.

Thanks, applied to CVS.

Takashi

-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8

author
#2 lore raw
Quoted 8 lines · Takashi Iwai
Quoted 5 lines

Use snd_emu10k1_compose_audigy_fxrt* macro where appropriate. Also add a few comments to explain send routing structure.

Thanks, applied to CVS.

Sorry, please revert this one. It disables the right channel. The macro must not be correct.

Lee

-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE FREE OODBMS DOWNLOAD - A multidimensional database that combines robust object and relational technologies, making it a perfect match for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8