]> git.pld-linux.org Git - packages/btsco.git/commitdiff
- complete (now builds against kernel 2.6.21)
authorblekot <blekot@pld-linux.org>
Thu, 12 Jul 2007 20:15:37 +0000 (20:15 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    btsco-kernel.patch -> 1.5

btsco-kernel.patch

index 199fe3d855d46c991c4193e612ee975ae349d549..34e60772c8ac4fd0070d5a75546beb265036f168 100644 (file)
@@ -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;
  }
  
  {
        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
        .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,
  };
  
        .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,
  };
  
        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;
  }
  
        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;
  }
  
        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;
  }
  
        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;
  }
  
        .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,
  };
  
        .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)
  {
        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 }
  
  {
        uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
        uinfo->count = 1;
-@@ -532,8 +533,8 @@
+@@ -532,8 +541,8 @@
        return 0;
  }
  
  {
        snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
        unsigned long flags;
-@@ -545,8 +546,8 @@
+@@ -545,8 +554,8 @@
        return 0;
  }
  
  {
        snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
        unsigned long flags;
-@@ -571,8 +572,8 @@
+@@ -571,8 +580,8 @@
        return changed;
  }
  
  {
        uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
        uinfo->count = 1;
-@@ -581,8 +582,8 @@
+@@ -581,8 +590,8 @@
        return 0;
  }
  
  {
        snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
        unsigned long flags;
-@@ -593,8 +594,8 @@
+@@ -593,8 +602,8 @@
        return 0;
  }
  
  {
        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
  {
        snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
        unsigned long flags;
-@@ -623,8 +624,8 @@
+@@ -623,8 +632,8 @@
        return 0;
  }
  
  {
        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)
  {
  
        unsigned int idx;
        int err;
-@@ -686,17 +687,17 @@
+@@ -686,17 +695,17 @@
        return 0;
  }
  
                             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;
  }
  
 +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;
  }
  
                             loff_t * offset)
  {
        snd_card_bt_sco_t *bt_sco = hw->card->private_data;
-@@ -839,7 +840,7 @@
+@@ -839,7 +848,7 @@
        return retval;
  }
  
                                     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);
  }
  
  {
        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)
  {
This page took 0.085507 seconds and 4 git commands to generate.