patch for cs46xx driver on 2.5.47 to fix compilation error
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
Signature · 4 lines
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: [email protected]
sound/pci/cs46xx/cs46xx_lib.c +4 -1
@@ -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 ; } }