[PATCH] wss: fix capture formats limitations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Krzysztof Helt <krzysztof.h1@xxxxx>

Fix copy-paste error with Interwave instead of ad1848
chip condition.
Limit opti93x cards capture formats to only linear ones.

Signed-off-by: Krzysztof Helt <krzysztof.h1@xxxxx>
---

Thank you Rene for collecting, testing and reviewing my
patches. I found one mistake in the series and this patch
fixes it.

I have also limited capture formats for opti93x chips because
the opti93x manual states that it supports mu-law, a-law and 
ADPCM decompression. The word "decompression" probably 
suggest that compression (recording) is not possible as its
manufacturer could just state the card supported mu-law, a-law 
and ADPCM.

Regards,
Krzysztof

diff -urp linux-alsa/sound/isa/wss/wss_lib.c linux-mm/sound/isa/wss/wss_lib.c
--- linux-alsa/sound/isa/wss/wss_lib.c	2008-07-18 22:47:02.056943647 +0200
+++ linux-mm/sound/isa/wss/wss_lib.c	2008-07-18 22:56:38.200949874 +0200
@@ -1460,14 +1460,16 @@ static int snd_wss_capture_open(struct s
 	runtime->hw = snd_wss_capture;
 
 	/* hardware limitation of older chipsets */
-	if (chip->hardware == WSS_HW_INTERWAVE && chip->dma1 > 3)
+	if (chip->hardware & WSS_HW_AD1848_MASK)
 		runtime->hw.formats &= ~(SNDRV_PCM_FMTBIT_IMA_ADPCM |
 					 SNDRV_PCM_FMTBIT_S16_BE);
 
 	/* hardware limitation of cheap chips */
 	if (chip->hardware == WSS_HW_CS4235 ||
-	    chip->hardware == WSS_HW_CS4239)
-		runtime->hw.formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE;
+	    chip->hardware == WSS_HW_CS4239 ||
+	    chip->hardware == WSS_HW_OPTI93X)
+		runtime->hw.formats = SNDRV_PCM_FMTBIT_U8 |
+				      SNDRV_PCM_FMTBIT_S16_LE;
 
 	snd_pcm_limit_isa_dma_size(chip->dma2, &runtime->hw.buffer_bytes_max);
 	snd_pcm_limit_isa_dma_size(chip->dma2, &runtime->hw.period_bytes_max);

----------------------------------------------------------------------
W kosciele tez zdarzaja sie wpadki!
Smieszny filmik >>> http://link.interia.pl/f1e61

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux