Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Revell <rlrevell@joe-job.com>
To: alsa-devel <alsa-devel@lists.sourceforge.net>
Cc: perex@suse.cz, tiwai@suse.de
Subject: [PATCH] emu10k1: minor send routing cleanup
Date: Tue, 16 Nov 2004 17:55:45 -0500	[thread overview]
Message-ID: <1100645745.17573.6.camel@krustophenia.net> (raw)

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

Signed-Off-By: Lee Revell <rlrevell@joe-job.com>

diff -Nru alsa-multi/alsa-kernel/include/emu10k1.h alsa-dev/alsa-kernel/include/emu10k1.h
--- alsa-multi/alsa-kernel/include/emu10k1.h	2004-11-16 17:44:27.000000000 -0500
+++ alsa-dev/alsa-kernel/include/emu10k1.h	2004-11-16 17:31:39.000000000 -0500
@@ -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];
diff -Nru alsa-multi/alsa-kernel/pci/emu10k1/emupcm.c alsa-dev/alsa-kernel/pci/emu10k1/emupcm.c
--- alsa-multi/alsa-kernel/pci/emu10k1/emupcm.c	2004-11-16 17:44:25.000000000 -0500
+++ alsa-dev/alsa-kernel/pci/emu10k1/emupcm.c	2004-11-16 17:31:30.000000000 -0500
@@ -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

             reply	other threads:[~2004-11-16 22:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-16 22:55 Lee Revell [this message]
2004-11-17 13:38 ` [PATCH] emu10k1: minor send routing cleanup Takashi Iwai
2004-11-20 23:29   ` Lee Revell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1100645745.17573.6.camel@krustophenia.net \
    --to=rlrevell@joe-job.com \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=perex@suse.cz \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox