All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] snd-sbxfi: implement support for 192khz playback/capture.
@ 2008-10-18 18:37 William Pitcock
  2008-10-18 21:32 ` James Courtier-Dutton
  2008-10-19  8:46 ` Takashi Iwai
  0 siblings, 2 replies; 4+ messages in thread
From: William Pitcock @ 2008-10-18 18:37 UTC (permalink / raw)
  To: alsa-devel

Implements support for 192khz initialization for playback and capture.

Signed-off-by: William Pitcock <nenolod@sacredspiral.co.uk>
---
 sound/pci/sbxfi/sbxfi.c |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/sound/pci/sbxfi/sbxfi.c b/sound/pci/sbxfi/sbxfi.c
index 4c65125..d64d462 100644
--- a/sound/pci/sbxfi/sbxfi.c
+++ b/sound/pci/sbxfi/sbxfi.c
@@ -514,7 +514,7 @@ static void sbxfi_write_amop(struct sbxfi *chip,
 static void sbxfi_playback_start(struct sbxfi *chip, struct sbxfi_port *port)
 {
 	unsigned int start, loop;
-	unsigned int ctrl, ratec;
+	unsigned int ctrl, ratec = 0;
 	struct snd_pcm_runtime *runtime;
 
 	if (port->tlb_index < 0)
@@ -523,12 +523,19 @@ static void sbxfi_playback_start(struct sbxfi *chip, struct sbxfi_port *port)
 	start = port->tlb_index * SBXFI_PAGE_SIZE;
 	loop = start + frames_to_bytes(runtime, runtime->buffer_size);
 
+	/*
+	 * ratec is the rate selection mode, 0x4c = 48000hz, 0x5c = 96000hz,
+	 * 0x6c = 192000hz.
+	 */
 	switch (runtime->rate) {
 	case 48000:
-		ratec = 0x4c; /* XXX what meaning? */
+		ratec = 0x4c;
 		break;
 	case 96000:
-		ratec = 0x5c; /* XXX what meaning? */
+		ratec = 0x5c;
+		break;
+	case 192000:
+		ratec = 0x6c;
 		break;
 	}
 	ctrl = ratec;
@@ -559,7 +566,7 @@ static void sbxfi_playback_stop(struct sbxfi *chip, struct sbxfi_port *port)
 static void sbxfi_capture_start(struct sbxfi *chip, struct sbxfi_port *port)
 {
 	unsigned int start, loop;
-	unsigned int ctrl, ratec;
+	unsigned int ctrl, ratec = 0;
 	struct snd_pcm_runtime *runtime;
 
 	if (port->tlb_index < 0)
@@ -575,6 +582,9 @@ static void sbxfi_capture_start(struct sbxfi *chip, struct sbxfi_port *port)
 	case 96000:
 		ratec = 0x5d | SRCCTL_RUN_STATE;
 		break;
+	case 192000:
+		ratec = 0x6d | SRCCTL_RUN_STATE;
+		break;
 	}
 
 	ctrl = ratec;
-- 
1.5.5.4

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

end of thread, other threads:[~2008-10-19  8:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-18 18:37 [PATCH] snd-sbxfi: implement support for 192khz playback/capture William Pitcock
2008-10-18 21:32 ` James Courtier-Dutton
2008-10-19  8:47   ` Takashi Iwai
2008-10-19  8:46 ` 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.