SOURCES: btsco-kernel.patch - complete (now builds against kernel ...

blekot blekot at pld-linux.org
Thu Jul 12 22:15:42 CEST 2007


Author: blekot                       Date: Thu Jul 12 20:15:42 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- complete (now builds against kernel 2.6.21)

---- Files affected:
SOURCES:
   btsco-kernel.patch (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SOURCES/btsco-kernel.patch
diff -u SOURCES/btsco-kernel.patch:1.4 SOURCES/btsco-kernel.patch:1.5
--- SOURCES/btsco-kernel.patch:1.4	Tue Jun 26 23:49:04 2007
+++ SOURCES/btsco-kernel.patch	Thu Jul 12 22:15:37 2007
@@ -1,31 +1,51 @@
 --- btsco.old/kernel/btsco.c	2006-10-28 16:39:27.000000000 +0200
-+++ btsco-0.5/kernel/btsco.c	2007-06-26 23:46:48.000000000 +0200
-@@ -51,6 +51,7 @@
- #include <linux/time.h>
- #include <linux/wait.h>
- #include <linux/socket.h>
-+#include <linux/freezer.h>
++++ btsco-0.5/kernel/btsco.c	2007-07-12 22:13:13.000000000 +0200
+@@ -54,9 +54,18 @@
  #include <linux/file.h>
  #include <linux/completion.h>
  #include <linux/smp_lock.h>
-@@ -124,13 +125,13 @@
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19)
++#include <linux/freezer.h> 
++#endif
+ #include <net/sock.h>
+ #include <net/bluetooth/bluetooth.h>
+ 
++// this was ostensibly for newer kernels but fails on 2.6.19.2
++#if 0
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18)
++#include <sound/typedefs.h>
++#endif
++#endif
+ #include <sound/core.h>
+ #include <sound/control.h>
+ #include <sound/pcm.h>
+@@ -90,7 +99,7 @@
+ MODULE_LICENSE("GPL");
+ MODULE_SUPPORTED_DEVICE("{{ALSA,Bluetooth SCO Soundcard}}");
+ 
+-static char *mod_revision = "$Revision$";
++static char *mod_revision = "$Revision$";
+ 
+ static int index[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = -2}; /* Exclude the first card */
+ 
+@@ -124,13 +133,13 @@
  } snd_card_bt_sco_info_t;
  
  typedef struct snd_card_bt_sco {
 -	snd_card_t *card;
-+	struct snd_card_t *card;
++	struct snd_card *card;
  	spinlock_t mixer_lock;
  	int mixer_volume[MIXER_ADDR_LAST + 1];
  #ifdef DYNAMIC_COMPRESSION
 -	snd_kcontrol_t *mixer_controls[MIXER_ADDR_LAST + 2 + 1];	/* also loopback and agc */
-+	struct snd_kcontrol_t *mixer_controls[MIXER_ADDR_LAST + 2 + 1];	/* also loopback and agc */
++	struct snd_kcontrol *mixer_controls[MIXER_ADDR_LAST + 2 + 1];	/* also loopback and agc */
  #else
 -	snd_kcontrol_t *mixer_controls[MIXER_ADDR_LAST + 2 ];	/* also loopback */
-+	struct snd_kcontrol_t *mixer_controls[MIXER_ADDR_LAST + 2 ];	/* also loopback */
++	struct snd_kcontrol *mixer_controls[MIXER_ADDR_LAST + 2 ];	/* also loopback */
  #endif
  	volatile int loopback;
  #ifdef DYNAMIC_COMPRESSION
-@@ -168,15 +169,15 @@
+@@ -168,15 +177,15 @@
  	unsigned int pcm_bps;	/* bytes per second */
  	unsigned int pcm_irq_pos;	/* IRQ position */
  	unsigned int pcm_buf_pos;	/* position in buffer */
@@ -34,7 +54,7 @@
  } snd_card_bt_sco_pcm_t;
  
 -static snd_card_t *snd_bt_sco_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
-+static struct snd_card_t *snd_bt_sco_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
++static struct snd_card *snd_bt_sco_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
  
 -static int snd_card_bt_sco_playback_trigger(snd_pcm_substream_t *
 +static int snd_card_bt_sco_playback_trigger(struct snd_pcm_substream *
@@ -45,7 +65,7 @@
  	snd_card_bt_sco_pcm_t *bspcm = runtime->private_data;
  	snd_card_bt_sco_t *bt_sco = snd_pcm_substream_chip(substream);
  
-@@ -194,10 +195,10 @@
+@@ -194,10 +203,10 @@
  	return 0;
  }
  
@@ -58,7 +78,7 @@
  	snd_card_bt_sco_pcm_t *bspcm = runtime->private_data;
  	snd_card_bt_sco_t *bt_sco = snd_pcm_substream_chip(substream);
  
-@@ -215,9 +216,9 @@
+@@ -215,9 +224,9 @@
  	return 0;
  }
  
@@ -70,7 +90,7 @@
  	snd_card_bt_sco_pcm_t *bspcm = runtime->private_data;
  	unsigned int bps;
  
-@@ -236,12 +237,12 @@
+@@ -236,12 +245,12 @@
  	return 0;
  }
  
@@ -85,7 +105,7 @@
  {
  	dprintk("capture_prepare\n");
  	return snd_card_bt_sco_pcm_prepare(substream);
-@@ -311,24 +312,24 @@
+@@ -311,24 +320,24 @@
  }
  
  static snd_pcm_uframes_t
@@ -115,7 +135,7 @@
  	.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
  		 SNDRV_PCM_INFO_MMAP_VALID),
  	.formats = SNDRV_PCM_FMTBIT_S16_LE,
-@@ -345,7 +346,7 @@
+@@ -345,7 +354,7 @@
  	.fifo_size = 0,
  };
  
@@ -124,7 +144,7 @@
  	.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
  		 SNDRV_PCM_INFO_MMAP_VALID),
  	.formats = SNDRV_PCM_FMTBIT_S16_LE,
-@@ -362,15 +363,15 @@
+@@ -362,15 +371,15 @@
  	.fifo_size = 0,
  };
  
@@ -143,7 +163,7 @@
  	snd_card_bt_sco_pcm_t *bspcm;
  	snd_card_bt_sco_t *bt_sco = snd_pcm_substream_chip(substream);
  
-@@ -401,9 +402,9 @@
+@@ -401,9 +410,9 @@
  	return 0;
  }
  
@@ -155,7 +175,7 @@
  	snd_card_bt_sco_pcm_t *bspcm;
  	snd_card_bt_sco_t *bt_sco = snd_pcm_substream_chip(substream);
  
-@@ -435,9 +436,9 @@
+@@ -435,9 +444,9 @@
  	return 0;
  }
  
@@ -167,7 +187,7 @@
  	snd_card_bt_sco_t *bt_sco = snd_pcm_substream_chip(substream);
  
  	snd_assert(bt_sco->playback == NULL,;
-@@ -457,9 +458,9 @@
+@@ -457,9 +466,9 @@
  	return 0;
  }
  
@@ -179,7 +199,7 @@
  	struct snd_card_bt_sco *bt_sco =
  	    (struct snd_card_bt_sco *)substream->private_data;
  
-@@ -480,7 +481,7 @@
+@@ -480,7 +489,7 @@
  	return 0;
  }
  
@@ -188,7 +208,7 @@
  	.open = snd_card_bt_sco_playback_open,
  	.close = snd_card_bt_sco_playback_close,
  	.ioctl = snd_pcm_lib_ioctl,
-@@ -489,7 +490,7 @@
+@@ -489,7 +498,7 @@
  	.pointer = snd_card_bt_sco_playback_pointer,
  };
  
@@ -197,7 +217,7 @@
  	.open = snd_card_bt_sco_capture_open,
  	.close = snd_card_bt_sco_capture_close,
  	.ioctl = snd_pcm_lib_ioctl,
-@@ -500,7 +501,7 @@
+@@ -500,7 +509,7 @@
  
  static int __init snd_card_bt_sco_pcm(snd_card_bt_sco_t * bt_sco)
  {
@@ -206,7 +226,7 @@
  	int err;
  
  	if ((err =
-@@ -522,8 +523,8 @@
+@@ -522,8 +531,8 @@
                                  .get = snd_bt_sco_volume_get, .put = snd_bt_sco_volume_put, \
                                                                          .private_value = addr }
  
@@ -217,7 +237,7 @@
  {
  	uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
  	uinfo->count = 1;
-@@ -532,8 +533,8 @@
+@@ -532,8 +541,8 @@
  	return 0;
  }
  
@@ -228,7 +248,7 @@
  {
  	snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
  	unsigned long flags;
-@@ -545,8 +546,8 @@
+@@ -545,8 +554,8 @@
  	return 0;
  }
  
@@ -239,7 +259,7 @@
  {
  	snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
  	unsigned long flags;
-@@ -571,8 +572,8 @@
+@@ -571,8 +580,8 @@
  	return changed;
  }
  
@@ -250,7 +270,7 @@
  {
  	uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
  	uinfo->count = 1;
-@@ -581,8 +582,8 @@
+@@ -581,8 +590,8 @@
  	return 0;
  }
  
@@ -261,7 +281,7 @@
  {
  	snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
  	unsigned long flags;
-@@ -593,8 +594,8 @@
+@@ -593,8 +602,8 @@
  	return 0;
  }
  
@@ -272,7 +292,7 @@
  {
  	snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
  	unsigned long flags;
-@@ -611,8 +612,8 @@
+@@ -611,8 +620,8 @@
  }
  
  #ifdef DYNAMIC_COMPRESSION
@@ -283,7 +303,7 @@
  {
  	snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
  	unsigned long flags;
-@@ -623,8 +624,8 @@
+@@ -623,8 +632,8 @@
  	return 0;
  }
  
@@ -294,19 +314,19 @@
  {
  	snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
  	unsigned long flags;
-@@ -641,9 +642,9 @@
+@@ -641,9 +650,9 @@
  }
  #endif
  
 -#define BT_SCO_CONTROLS (sizeof(snd_bt_sco_controls)/sizeof(snd_kcontrol_new_t))
-+#define BT_SCO_CONTROLS (sizeof(snd_bt_sco_controls)/sizeof(snd_kcontrol_new))
++#define BT_SCO_CONTROLS (sizeof(snd_bt_sco_controls)/sizeof(struct snd_kcontrol_new))
  
 -static snd_kcontrol_new_t snd_bt_sco_controls[] = {
 +static struct snd_kcontrol_new snd_bt_sco_controls[] = {
  	BT_SCO_VOLUME("Master Volume", 0, MIXER_ADDR_MASTER),
  	BT_SCO_VOLUME("Mic Volume", 0, MIXER_ADDR_MIC),
  	{.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-@@ -667,7 +668,7 @@
+@@ -667,7 +676,7 @@
  
  int __init snd_card_bt_sco_new_mixer(snd_card_bt_sco_t * bt_sco)
  {
@@ -315,7 +335,7 @@
  
  	unsigned int idx;
  	int err;
-@@ -686,17 +687,17 @@
+@@ -686,17 +695,17 @@
  	return 0;
  }
  
@@ -336,7 +356,7 @@
  			     unsigned int cmd, unsigned long arg)
  {
  	snd_card_bt_sco_t *bt_sco = hw->card->private_data;
-@@ -750,10 +751,10 @@
+@@ -750,7 +759,7 @@
  	return err;
  }
  
@@ -344,12 +364,8 @@
 +static long snd_card_bt_write(struct snd_hwdep * hw, const char *buf, long count,
  			      loff_t * offset)
  {
--	snd_card_bt_sco_t *bt_sco = hw->card->private_data;
-+	struct snd_card_bt_sco *bt_sco = hw->card->private_data;
- 	int mixer_volume[MIXER_ADDR_LAST + 1];
- 	int retval;
- 	int i;
-@@ -785,7 +786,7 @@
+ 	snd_card_bt_sco_t *bt_sco = hw->card->private_data;
+@@ -785,7 +794,7 @@
  	return retval;
  }
  
@@ -358,7 +374,7 @@
  			     loff_t * offset)
  {
  	snd_card_bt_sco_t *bt_sco = hw->card->private_data;
-@@ -839,7 +840,7 @@
+@@ -839,7 +848,7 @@
  	return retval;
  }
  
@@ -367,16 +383,16 @@
  				     struct file *file, poll_table * wait)
  {
  	snd_card_bt_sco_t *bt_sco = hw->card->private_data;
-@@ -863,7 +864,7 @@
+@@ -863,7 +872,7 @@
  
  static int snd_card_bt_sco_thread(void *data)
  {
 -	snd_card_t *card = (snd_card_t *) data;
-+	struct snd_card_t *card = (struct snd_card_t *) data;
++	struct snd_card *card = (struct snd_card *) data;
  	snd_card_bt_sco_t *bt_sco = card->private_data;
  	struct socket *sock;
  	int len;
-@@ -1117,7 +1118,7 @@
+@@ -1117,7 +1126,7 @@
  	complete_and_exit(&bt_sco->thread_done, 0);
  }
  
@@ -385,7 +401,7 @@
  {
  	snd_card_bt_sco_t *bt_sco = card->private_data;
  
-@@ -1139,10 +1140,10 @@
+@@ -1139,10 +1148,10 @@
  
  static int __init snd_card_bt_sco_probe(int dev)
  {
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/btsco-kernel.patch?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list