mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Friesen <cfriesen@nortelnetworks.com>
To: perez@suze.cz
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: patch for cs46xx driver on 2.5.47 to fix compilation error
Date: Mon, 11 Nov 2002 02:38:05 -0500	[thread overview]
Message-ID: <3DCF5E5D.3030808@nortelnetworks.com> (raw)

[-- 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;
 		}
 	}

                 reply	other threads:[~2002-11-11  7:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DCF5E5D.3030808@nortelnetworks.com \
    --to=cfriesen@nortelnetworks.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perez@suze.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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