public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] Patch for btsco kernel module (index parameter)
@ 2005-08-16 23:19 Whoopie
  0 siblings, 0 replies; only message in thread
From: Whoopie @ 2005-08-16 23:19 UTC (permalink / raw)
  To: bluez-devel

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

Hi,
I made a small patch for the btsco kernel module, so that it doesn't grep
the ALSA device 0. And you can specify any index parameter.
I think that it's important because the soundcard should be device 0. Now, I
can load the module in /etc/modules at startup.

It's based on the ALSA modem drivers, so it was just a copy&paste work.

Regards,
Whoopie

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: btsco.c.patch --]
[-- Type: text/x-patch; name="btsco.c.patch", Size: 725 bytes --]

--- btsco.c.orig	2005-08-16 23:12:56.000000000 +0200
+++ btsco.c	2005-08-17 00:19:59.000000000 +0200
@@ -63,6 +63,11 @@
 
 static char *mod_revision = "$Revision: 1.6 $";
 
+static int index[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -2}; /* Exclude the first card */
+
+module_param_array(index, int, NULL, 0444);
+MODULE_PARM_DESC(index, "Index value for Bluetooth SCO Headset Soundcard.");
+
 #undef dprintk
 #if 1
 #define dprintk(fmt...) printk(KERN_INFO "snd-bt-sco: " fmt)
@@ -964,7 +969,7 @@
 	snd_hwdep_t *hw;
 
 	card =
-	    snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
+	    snd_card_new(index[dev], SNDRV_DEFAULT_STR1,
 			 THIS_MODULE, 0);
 	if (card == NULL)
 		return -ENOMEM;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-08-16 23:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-16 23:19 [Bluez-devel] Patch for btsco kernel module (index parameter) Whoopie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox