[alsa-devel] [PATCH] ALSA: Support Media Vision Jazz16 chips

Rask Ingemann Lambertsen rask at sygehus.dk
Thu Mar 29 01:20:40 CEST 2007


On Wed, Mar 28, 2007 at 10:03:30PM +0200, Rask Ingemann Lambertsen wrote:
> 
>    It is clearly only half-duplex when the DSP is in high-speed mode. It is
> less clear what will happen in low-speed mode if one tries to capture during
> playback or vice versa. I don't know if the Jazz16 needs high-speed mode at
> all, so I'll do some testing.

   It plays fine in low-speed mode even at 45454 Hz and in stereo.

>    Note that my board is rather anonymous. For all I know, it could be an
> OEM one.

   FCC-ID KRN3261 leads me to KTL Research Limited, Hong Kong.

[8-bit playback through 16-bit DMA channel]
>    Playback sounds normal except for a click for each "pointer ..." message.
> Any ideas? /proc/interrupts increments by 11.

   This additional patch fixes it:

--- linux-2.6.20/sound/isa/sb/sb8_main.c~	2007-03-29 00:48:56.000000000 +0200
+++ linux-2.6.20/sound/isa/sb/sb8_main.c	2007-03-29 00:48:56.000000000 +0200
@@ -228,6 +228,8 @@ static int snd_sb8_playback_prepare(stru
 		snd_sbdsp_command(chip, 256 - runtime->rate_den);
 	}
 	if (chip->playback_format != SB_DSP_OUTPUT) {
+		if (dma > 3)
+			count /= 2;
 		count--;
 		snd_sbdsp_command(chip, SB_DSP_BLOCK_SIZE);
 		snd_sbdsp_command(chip, count & 0xff);
@@ -350,6 +352,8 @@ static int snd_sb8_capture_prepare(struc
 		snd_sbdsp_command(chip, 256 - runtime->rate_den);
 	}
 	if (chip->capture_format != SB_DSP_OUTPUT) {
+		if (dma > 3)
+			count /= 2;
 		count--;
 		snd_sbdsp_command(chip, SB_DSP_BLOCK_SIZE);
 		snd_sbdsp_command(chip, count & 0xff);
@@ -553,6 +557,12 @@ static int snd_sb8_open(struct snd_pcm_s
 	}
 	snd_pcm_hw_constraint_ratnums(runtime, 0, SNDRV_PCM_HW_PARAM_RATE,
 				      &hw_constraints_clock);
+	if (chip->dma8 > 3) {
+		snd_pcm_hw_constraint_step(runtime, 0,
+					   SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 2);
+		snd_pcm_hw_constraint_step(runtime, 0,
+					   SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 2);
+	}
 	return 0;	
 }
 
-- 
Rask Ingemann Lambertsen


More information about the Alsa-devel mailing list