* patch for cs46xx driver on 2.5.47 to fix compilation error
@ 2002-11-11 7:38 Chris Friesen
0 siblings, 0 replies; only message in thread
From: Chris Friesen @ 2002-11-11 7:38 UTC (permalink / raw)
To: perez; +Cc: Linux Kernel Mailing List
[-- Attachment #1: Type: text/plain, Size: 564 bytes --]
The attached patch fixes compilation when the CONFIG_SND_CS46XX_NEW_DSP
option is not enabled.
The patch wraps _cs46xx_adjust_sample_rate() in #ifdefs since it is only
used when the above option is defined, and moves an up() call back to
the procedure that did the down() where it conceptually belongs.
Chris
--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: cfriesen@nortelnetworks.com
[-- Attachment #2: soundcard.patch --]
[-- Type: text/plain, Size: 1128 bytes --]
diff -Nur linus-2.5/sound/pci/cs46xx/cs46xx_lib.c localtree/sound/pci/cs46xx/cs46xx_lib.c
--- linus-2.5/sound/pci/cs46xx/cs46xx_lib.c 2002-11-11 02:30:03.000000000 -0500
+++ localtree/sound/pci/cs46xx/cs46xx_lib.c 2002-11-11 02:23:16.000000000 -0500
@@ -1023,6 +1023,7 @@
return result;
}
+#ifdef CONFIG_SND_CS46XX_NEW_DSP
static int _cs46xx_adjust_sample_rate (cs46xx_t *chip, cs46xx_pcm_t *cpcm,
int sample_rate)
{
@@ -1051,7 +1052,6 @@
cpcm->hw_addr,
cpcm->pcm_channel->pcm_channel_id)) == NULL) {
snd_printk(KERN_ERR "cs46xx: failed to re-create virtual PCM channel\n");
- up (&chip->spos_mutex);
return -ENXIO;
}
@@ -1061,6 +1061,8 @@
return 0;
}
+#endif
+
static int snd_cs46xx_playback_hw_params(snd_pcm_substream_t * substream,
snd_pcm_hw_params_t * hw_params)
{
@@ -1083,6 +1085,7 @@
if (cpcm->pcm_channel->pcm_channel_id != DSP_IEC958_CHANNEL ||
!(chip->dsp_spos_instance->spdif_status_out & DSP_SPDIF_STATUS_AC3_MODE)) {
if (_cs46xx_adjust_sample_rate (chip,cpcm,sample_rate)) {
+ up (&chip->spos_mutex);
return -ENXIO;
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-11-11 7:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-11-11 7:38 patch for cs46xx driver on 2.5.47 to fix compilation error Chris Friesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome