[alsa-devel] [PATCH] wss: fix capture formats limitations
From: Krzysztof Helt krzysztof.h1@wp.pl
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@wp.pl ---
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
On 20-07-08 20:14, Krzysztof Helt wrote:
From: Krzysztof Helt krzysztof.h1@wp.pl
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@wp.pl
Added: http://members.home.nl/rene.herman/wss/
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.
That sounds likely... will look.
Rene.
On 20-07-08 20:30, Rene Herman wrote:
On 20-07-08 20:14, Krzysztof Helt wrote:
From: Krzysztof Helt krzysztof.h1@wp.pl
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@wp.pl
The codec->irq fix was by the way already commited by Takashi and also in your patches so this clashed. I regenerated the series as found at the above location with only that change so that it applies cleanly onto Takashi's current devel branch.
(with git, "git am wss/*" is all you need to apply them)
Rene.
participants (2)
-
Krzysztof Helt
-
Rene Herman