* [Bluez-devel] kernel 2.6.21 btsco 0.50 patch
[not found] ` <1178260119.25425.12.camel@violet>
@ 2007-05-04 8:49 ` Tomasz Chiliński
2007-05-04 14:03 ` Brad Midgley
0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Chiliński @ 2007-05-04 8:49 UTC (permalink / raw)
To: bluez-devel
[-- Attachment #1: Type: text/plain, Size: 317 bytes --]
Hello.
There are minor problems with btsco kernel module with linux versions
above 2.6.20.x, for now with 2.6.21.x.
The attachment is a solution for all problems.
PS. I have also made diff with typedefs taken from kernel <=2.6.20.x,
but I think we should avoid include files dependencies...
Bests, Tomasz Chilinski
[-- Attachment #2: btsco-0.50-2.6.21-withouttypedefs.diff --]
[-- Type: application/octet-stream, Size: 12560 bytes --]
diff -uNr btsco-0.50.orig/kernel/btsco.c btsco-0.50/kernel/btsco.c
--- btsco-0.50.orig/kernel/btsco.c 2007-05-03 22:49:56.000000000 +0200
+++ btsco-0.50/kernel/btsco.c 2007-05-03 23:28:36.332990913 +0200
@@ -124,13 +128,13 @@
} snd_card_bt_sco_info_t;
typedef struct snd_card_bt_sco {
- 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 *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 *mixer_controls[MIXER_ADDR_LAST + 2 ]; /* also loopback */
#endif
volatile int loopback;
#ifdef DYNAMIC_COMPRESSION
@@ -168,15 +172,15 @@
unsigned int pcm_bps; /* bytes per second */
unsigned int pcm_irq_pos; /* IRQ position */
unsigned int pcm_buf_pos; /* position in buffer */
- snd_pcm_substream_t *substream;
+ struct snd_pcm_substream *substream;
} snd_card_bt_sco_pcm_t;
-static 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 *
substream, int cmd)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_card_bt_sco_pcm_t *bspcm = runtime->private_data;
snd_card_bt_sco_t *bt_sco = snd_pcm_substream_chip(substream);
@@ -194,10 +198,10 @@
return 0;
}
-static int snd_card_bt_sco_capture_trigger(snd_pcm_substream_t *
+static int snd_card_bt_sco_capture_trigger(struct snd_pcm_substream *
substream, int cmd)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_card_bt_sco_pcm_t *bspcm = runtime->private_data;
snd_card_bt_sco_t *bt_sco = snd_pcm_substream_chip(substream);
@@ -215,9 +219,9 @@
return 0;
}
-static int snd_card_bt_sco_pcm_prepare(snd_pcm_substream_t * substream)
+static int snd_card_bt_sco_pcm_prepare(struct snd_pcm_substream * substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_card_bt_sco_pcm_t *bspcm = runtime->private_data;
unsigned int bps;
@@ -236,12 +240,12 @@
return 0;
}
-static int snd_card_bt_sco_playback_prepare(snd_pcm_substream_t * substream)
+static int snd_card_bt_sco_playback_prepare(struct snd_pcm_substream * substream)
{
return snd_card_bt_sco_pcm_prepare(substream);
}
-static int snd_card_bt_sco_capture_prepare(snd_pcm_substream_t * substream)
+static int snd_card_bt_sco_capture_prepare(struct snd_pcm_substream * substream)
{
dprintk("capture_prepare\n");
return snd_card_bt_sco_pcm_prepare(substream);
@@ -311,24 +315,24 @@
}
static snd_pcm_uframes_t
-snd_card_bt_sco_playback_pointer(snd_pcm_substream_t * substream)
+snd_card_bt_sco_playback_pointer(struct snd_pcm_substream * substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_card_bt_sco_pcm_t *bspcm = runtime->private_data;
return bytes_to_frames(runtime, bspcm->pcm_buf_pos);
}
static snd_pcm_uframes_t
-snd_card_bt_sco_capture_pointer(snd_pcm_substream_t * substream)
+snd_card_bt_sco_capture_pointer(struct snd_pcm_substream * substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_card_bt_sco_pcm_t *bspcm = runtime->private_data;
return bytes_to_frames(runtime, bspcm->pcm_buf_pos);
}
-static snd_pcm_hardware_t snd_card_bt_sco_playback = {
+static struct snd_pcm_hardware snd_card_bt_sco_playback = {
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
.formats = SNDRV_PCM_FMTBIT_S16_LE,
@@ -345,7 +349,7 @@
.fifo_size = 0,
};
-static snd_pcm_hardware_t snd_card_bt_sco_capture = {
+static struct snd_pcm_hardware snd_card_bt_sco_capture = {
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_MMAP_VALID),
.formats = SNDRV_PCM_FMTBIT_S16_LE,
@@ -362,15 +366,15 @@
.fifo_size = 0,
};
-static void snd_card_bt_sco_runtime_free(snd_pcm_runtime_t * runtime)
+static void snd_card_bt_sco_runtime_free(struct snd_pcm_runtime * runtime)
{
snd_card_bt_sco_pcm_t *bspcm = runtime->private_data;
kfree(bspcm);
}
-static int snd_card_bt_sco_playback_open(snd_pcm_substream_t * substream)
+static int snd_card_bt_sco_playback_open(struct snd_pcm_substream * substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_card_bt_sco_pcm_t *bspcm;
snd_card_bt_sco_t *bt_sco = snd_pcm_substream_chip(substream);
@@ -401,9 +405,9 @@
return 0;
}
-static int snd_card_bt_sco_capture_open(snd_pcm_substream_t * substream)
+static int snd_card_bt_sco_capture_open(struct snd_pcm_substream * substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_card_bt_sco_pcm_t *bspcm;
snd_card_bt_sco_t *bt_sco = snd_pcm_substream_chip(substream);
@@ -435,9 +439,9 @@
return 0;
}
-static int snd_card_bt_sco_playback_close(snd_pcm_substream_t * substream)
+static int snd_card_bt_sco_playback_close(struct snd_pcm_substream * substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
snd_card_bt_sco_t *bt_sco = snd_pcm_substream_chip(substream);
snd_assert(bt_sco->playback == NULL,;
@@ -457,9 +461,9 @@
return 0;
}
-static int snd_card_bt_sco_capture_close(snd_pcm_substream_t * substream)
+static int snd_card_bt_sco_capture_close(struct snd_pcm_substream * substream)
{
- snd_pcm_runtime_t *runtime = substream->runtime;
+ struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_card_bt_sco *bt_sco =
(struct snd_card_bt_sco *)substream->private_data;
@@ -480,7 +484,7 @@
return 0;
}
-static snd_pcm_ops_t snd_card_bt_sco_playback_ops = {
+static struct snd_pcm_ops snd_card_bt_sco_playback_ops = {
.open = snd_card_bt_sco_playback_open,
.close = snd_card_bt_sco_playback_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -489,7 +493,7 @@
.pointer = snd_card_bt_sco_playback_pointer,
};
-static snd_pcm_ops_t snd_card_bt_sco_capture_ops = {
+static struct snd_pcm_ops snd_card_bt_sco_capture_ops = {
.open = snd_card_bt_sco_capture_open,
.close = snd_card_bt_sco_capture_close,
.ioctl = snd_pcm_lib_ioctl,
@@ -500,7 +504,7 @@
static int __init snd_card_bt_sco_pcm(snd_card_bt_sco_t * bt_sco)
{
- snd_pcm_t *pcm;
+ struct snd_pcm *pcm;
int err;
if ((err =
@@ -522,8 +526,8 @@
.get = snd_bt_sco_volume_get, .put = snd_bt_sco_volume_put, \
.private_value = addr }
-static int snd_bt_sco_volume_info(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_info_t * uinfo)
+static int snd_bt_sco_volume_info(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_info * uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->count = 1;
@@ -532,8 +536,8 @@
return 0;
}
-static int snd_bt_sco_volume_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_bt_sco_volume_get(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
unsigned long flags;
@@ -545,8 +549,8 @@
return 0;
}
-static int snd_bt_sco_volume_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_bt_sco_volume_put(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
unsigned long flags;
@@ -571,8 +575,8 @@
return changed;
}
-static int snd_bt_sco_boolean_info(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_info_t * uinfo)
+static int snd_bt_sco_boolean_info(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_info * uinfo)
{
uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
uinfo->count = 1;
@@ -581,8 +585,8 @@
return 0;
}
-static int snd_bt_sco_loopback_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_bt_sco_loopback_get(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
unsigned long flags;
@@ -593,8 +597,8 @@
return 0;
}
-static int snd_bt_sco_loopback_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_bt_sco_loopback_put(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
unsigned long flags;
@@ -611,8 +615,8 @@
}
#ifdef DYNAMIC_COMPRESSION
-static int snd_bt_sco_agc_get(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_bt_sco_agc_get(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
unsigned long flags;
@@ -623,8 +627,8 @@
return 0;
}
-static int snd_bt_sco_agc_put(snd_kcontrol_t * kcontrol,
- snd_ctl_elem_value_t * ucontrol)
+static int snd_bt_sco_agc_put(struct snd_kcontrol * kcontrol,
+ struct snd_ctl_elem_value * ucontrol)
{
snd_card_bt_sco_t *bt_sco = snd_kcontrol_chip(kcontrol);
unsigned long flags;
@@ -641,9 +645,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(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 +671,7 @@
int __init snd_card_bt_sco_new_mixer(snd_card_bt_sco_t * bt_sco)
{
- snd_card_t *card = bt_sco->card;
+ struct snd_card *card = bt_sco->card;
unsigned int idx;
int err;
@@ -686,17 +690,17 @@
return 0;
}
-static int snd_card_bt_open(snd_hwdep_t * hw, struct file *file)
+static int snd_card_bt_open(struct snd_hwdep * hw, struct file *file)
{
return 0;
}
-static int snd_card_bt_release(snd_hwdep_t * hw, struct file *file)
+static int snd_card_bt_release(struct snd_hwdep * hw, struct file *file)
{
return 0;
}
-static int snd_card_bt_ioctl(snd_hwdep_t * hw, struct file *file,
+static int snd_card_bt_ioctl(struct snd_hwdep * hw, struct file *file,
unsigned int cmd, unsigned long arg)
{
snd_card_bt_sco_t *bt_sco = hw->card->private_data;
@@ -750,7 +754,7 @@
return err;
}
-static long snd_card_bt_write(snd_hwdep_t * hw, const char *buf, long count,
+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;
@@ -785,7 +789,7 @@
return retval;
}
-static long snd_card_bt_read(snd_hwdep_t * hw, char *buf, long count,
+static long snd_card_bt_read(struct snd_hwdep * hw, char *buf, long count,
loff_t * offset)
{
snd_card_bt_sco_t *bt_sco = hw->card->private_data;
@@ -839,7 +843,7 @@
return retval;
}
-static unsigned int snd_card_bt_poll(snd_hwdep_t * hw,
+static unsigned int snd_card_bt_poll(struct snd_hwdep * hw,
struct file *file, poll_table * wait)
{
snd_card_bt_sco_t *bt_sco = hw->card->private_data;
@@ -863,7 +867,7 @@
static int snd_card_bt_sco_thread(void *data)
{
- snd_card_t *card = (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 +1121,7 @@
complete_and_exit(&bt_sco->thread_done, 0);
}
-static void snd_card_bt_private_free(snd_card_t * card)
+static void snd_card_bt_private_free(struct snd_card * card)
{
snd_card_bt_sco_t *bt_sco = card->private_data;
@@ -1139,10 +1143,10 @@
static int __init snd_card_bt_sco_probe(int dev)
{
- snd_card_t *card;
+ struct snd_card *card;
snd_card_bt_sco_t *bt_sco;
int err;
- snd_hwdep_t *hw;
+ struct snd_hwdep *hw;
card =
snd_card_new(index[dev], SNDRV_DEFAULT_STR1,
[-- Attachment #3: Type: text/plain, Size: 286 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
[-- Attachment #4: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bluez-devel] kernel 2.6.21 btsco 0.50 patch
2007-05-04 8:49 ` [Bluez-devel] kernel 2.6.21 btsco 0.50 patch Tomasz Chiliński
@ 2007-05-04 14:03 ` Brad Midgley
2007-05-04 14:12 ` Tomasz Chiliński
0 siblings, 1 reply; 3+ messages in thread
From: Brad Midgley @ 2007-05-04 14:03 UTC (permalink / raw)
To: BlueZ development
Tomasz
> There are minor problems with btsco kernel module with linux versions
> above 2.6.20.x, for now with 2.6.21.x.
> The attachment is a solution for all problems.
> PS. I have also made diff with typedefs taken from kernel <=2.6.20.x,
> but I think we should avoid include files dependencies...
this should still build and work with older kernels, right?
brad
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bluez-devel] kernel 2.6.21 btsco 0.50 patch
2007-05-04 14:03 ` Brad Midgley
@ 2007-05-04 14:12 ` Tomasz Chiliński
0 siblings, 0 replies; 3+ messages in thread
From: Tomasz Chiliński @ 2007-05-04 14:12 UTC (permalink / raw)
To: BlueZ development
On Fri, 04 May 2007 08:03:03 -0600, Brad Midgley wrote
> Tomasz
Brad
> > There are minor problems with btsco kernel module with linux versions
> > above 2.6.20.x, for now with 2.6.21.x.
> > The attachment is a solution for all problems.
> > PS. I have also made diff with typedefs taken from kernel <=2.6.20.x,
> > but I think we should avoid include files dependencies...
>
> this should still build and work with older kernels, right?
Yes.
> brad
Tomasz.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-05-04 14:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20070503214340.M20676@chilan.com>
[not found] ` <1178260119.25425.12.camel@violet>
2007-05-04 8:49 ` [Bluez-devel] kernel 2.6.21 btsco 0.50 patch Tomasz Chiliński
2007-05-04 14:03 ` Brad Midgley
2007-05-04 14:12 ` Tomasz Chiliński
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.