View previous topic :: View next topic |
Author |
Message |
erikderzweite Tux's lil' helper
Joined: 25 Feb 2006 Posts: 143
|
Posted: Sun May 03, 2009 8:27 am Post subject: |
|
|
Yes it is. I even had a patch for 2.6.29 somewhere... But it's getting bigger and uglier all the time
Code: | --- include/sound/typedefs.h.orig 2008-12-17 00:15:10.000000000 +0100
+++ include/sound/typedefs.h 2008-12-16 23:46:03.000000000 +0100
@@ -0,0 +1,173 @@
+/*
+ * Typedef's for backward compatibility (for out-of-kernel drivers)
+ *
+ * This file will be removed soon in future
+ */
+
+/* core stuff */
+typedef struct snd_card snd_card_t;
+typedef struct snd_device snd_device_t;
+typedef struct snd_device_ops snd_device_ops_t;
+typedef enum snd_card_type snd_card_type_t;
+typedef struct snd_minor snd_minor_t;
+
+/* info */
+typedef struct snd_info_entry snd_info_entry_t;
+typedef struct snd_info_buffer snd_info_buffer_t;
+
+/* control */
+typedef struct snd_ctl_file snd_ctl_file_t;
+typedef struct snd_kcontrol snd_kcontrol_t;
+typedef struct snd_kcontrol_new snd_kcontrol_new_t;
+typedef struct snd_kcontrol_volatile snd_kcontrol_volatile_t;
+typedef struct snd_kctl_event snd_kctl_event_t;
+typedef struct snd_aes_iec958 snd_aes_iec958_t;
+typedef struct snd_ctl_card_info snd_ctl_card_info_t;
+typedef struct snd_ctl_elem_id snd_ctl_elem_id_t;
+typedef struct snd_ctl_elem_list snd_ctl_elem_list_t;
+typedef struct snd_ctl_elem_info snd_ctl_elem_info_t;
+typedef struct snd_ctl_elem_value snd_ctl_elem_value_t;
+typedef struct snd_ctl_event snd_ctl_event_t;
+#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
+typedef struct snd_mixer_oss snd_mixer_oss_t;
+#endif
+
+/* timer */
+typedef struct snd_timer snd_timer_t;
+typedef struct snd_timer_instance snd_timer_instance_t;
+typedef struct snd_timer_id snd_timer_id_t;
+typedef struct snd_timer_ginfo snd_timer_ginfo_t;
+typedef struct snd_timer_gparams snd_timer_gparams_t;
+typedef struct snd_timer_gstatus snd_timer_gstatus_t;
+typedef struct snd_timer_select snd_timer_select_t;
+typedef struct snd_timer_info snd_timer_info_t;
+typedef struct snd_timer_params snd_timer_params_t;
+typedef struct snd_timer_status snd_timer_status_t;
+typedef struct snd_timer_read snd_timer_read_t;
+typedef struct snd_timer_tread snd_timer_tread_t;
+
+/* PCM */
+typedef struct snd_pcm snd_pcm_t;
+typedef struct snd_pcm_str snd_pcm_str_t;
+typedef struct snd_pcm_substream snd_pcm_substream_t;
+typedef struct snd_pcm_info snd_pcm_info_t;
+typedef struct snd_pcm_hw_params snd_pcm_hw_params_t;
+typedef struct snd_pcm_sw_params snd_pcm_sw_params_t;
+typedef struct snd_pcm_channel_info snd_pcm_channel_info_t;
+typedef struct snd_pcm_status snd_pcm_status_t;
+typedef struct snd_pcm_mmap_status snd_pcm_mmap_status_t;
+typedef struct snd_pcm_mmap_control snd_pcm_mmap_control_t;
+typedef struct snd_mask snd_mask_t;
+typedef struct snd_sg_buf snd_pcm_sgbuf_t;
+
+typedef struct snd_interval snd_interval_t;
+typedef struct snd_xferi snd_xferi_t;
+typedef struct snd_xfern snd_xfern_t;
+typedef struct snd_xferv snd_xferv_t;
+
+typedef struct snd_pcm_file snd_pcm_file_t;
+typedef struct snd_pcm_runtime snd_pcm_runtime_t;
+typedef struct snd_pcm_hardware snd_pcm_hardware_t;
+typedef struct snd_pcm_ops snd_pcm_ops_t;
+typedef struct snd_pcm_hw_rule snd_pcm_hw_rule_t;
+typedef struct snd_pcm_hw_constraints snd_pcm_hw_constraints_t;
+typedef struct snd_ratnum ratnum_t;
+typedef struct snd_ratden ratden_t;
+typedef struct snd_pcm_hw_constraint_ratnums snd_pcm_hw_constraint_ratnums_t;
+typedef struct snd_pcm_hw_constraint_ratdens snd_pcm_hw_constraint_ratdens_t;
+typedef struct snd_pcm_hw_constraint_list snd_pcm_hw_constraint_list_t;
+typedef struct snd_pcm_group snd_pcm_group_t;
+typedef struct snd_pcm_notify snd_pcm_notify_t;
+
+/* rawmidi */
+typedef struct snd_rawmidi snd_rawmidi_t;
+typedef struct snd_rawmidi_info snd_rawmidi_info_t;
+typedef struct snd_rawmidi_params snd_rawmidi_params_t;
+typedef struct snd_rawmidi_status snd_rawmidi_status_t;
+typedef struct snd_rawmidi_runtime snd_rawmidi_runtime_t;
+typedef struct snd_rawmidi_substream snd_rawmidi_substream_t;
+typedef struct snd_rawmidi_str snd_rawmidi_str_t;
+typedef struct snd_rawmidi_ops snd_rawmidi_ops_t;
+typedef struct snd_rawmidi_global_ops snd_rawmidi_global_ops_t;
+typedef struct snd_rawmidi_file snd_rawmidi_file_t;
+
+/* hwdep */
+typedef struct snd_hwdep snd_hwdep_t;
+typedef struct snd_hwdep_info snd_hwdep_info_t;
+typedef struct snd_hwdep_dsp_status snd_hwdep_dsp_status_t;
+typedef struct snd_hwdep_dsp_image snd_hwdep_dsp_image_t;
+typedef struct snd_hwdep_ops snd_hwdep_ops_t;
+
+/* sequencer */
+typedef struct snd_seq_port_info snd_seq_port_info_t;
+typedef struct snd_seq_port_subscribe snd_seq_port_subscribe_t;
+typedef struct snd_seq_event snd_seq_event_t;
+typedef struct snd_seq_addr snd_seq_addr_t;
+typedef struct snd_seq_ev_volume snd_seq_ev_volume_t;
+typedef struct snd_seq_ev_loop snd_seq_ev_loop_t;
+typedef struct snd_seq_remove_events snd_seq_remove_events_t;
+typedef struct snd_seq_query_subs snd_seq_query_subs_t;
+typedef struct snd_seq_system_info snd_seq_system_info_t;
+typedef struct snd_seq_client_info snd_seq_client_info_t;
+typedef struct snd_seq_queue_info snd_seq_queue_info_t;
+typedef struct snd_seq_queue_status snd_seq_queue_status_t;
+typedef struct snd_seq_queue_tempo snd_seq_queue_tempo_t;
+typedef struct snd_seq_queue_owner snd_seq_queue_owner_t;
+typedef struct snd_seq_queue_timer snd_seq_queue_timer_t;
+typedef struct snd_seq_queue_client snd_seq_queue_client_t;
+typedef struct snd_seq_client_pool snd_seq_client_pool_t;
+typedef struct snd_seq_instr snd_seq_instr_t;
+typedef struct snd_seq_instr_data snd_seq_instr_data_t;
+typedef struct snd_seq_instr_header snd_seq_instr_header_t;
+
+typedef struct snd_seq_user_client user_client_t;
+typedef struct snd_seq_kernel_client kernel_client_t;
+typedef struct snd_seq_client client_t;
+typedef struct snd_seq_queue queue_t;
+
+/* seq_device */
+typedef struct snd_seq_device snd_seq_device_t;
+typedef struct snd_seq_dev_ops snd_seq_dev_ops_t;
+
+/* seq_midi */
+typedef struct snd_midi_event snd_midi_event_t;
+
+/* seq_midi_emul */
+typedef struct snd_midi_channel snd_midi_channel_t;
+typedef struct snd_midi_channel_set snd_midi_channel_set_t;
+typedef struct snd_midi_op snd_midi_op_t;
+
+/* seq_oss */
+typedef struct snd_seq_oss_arg snd_seq_oss_arg_t;
+typedef struct snd_seq_oss_callback snd_seq_oss_callback_t;
+typedef struct snd_seq_oss_reg snd_seq_oss_reg_t;
+
+/* virmidi */
+typedef struct snd_virmidi_dev snd_virmidi_dev_t;
+typedef struct snd_virmidi snd_virmidi_t;
+
+/* seq_instr */
+typedef struct snd_seq_kcluster snd_seq_kcluster_t;
+typedef struct snd_seq_kinstr_ops snd_seq_kinstr_ops_t;
+typedef struct snd_seq_kinstr snd_seq_kinstr_t;
+typedef struct snd_seq_kinstr_list snd_seq_kinstr_list_t;
+
+/* ac97 */
+typedef struct snd_ac97_bus ac97_bus_t;
+typedef struct snd_ac97_bus_ops ac97_bus_ops_t;
+typedef struct snd_ac97_template ac97_template_t;
+typedef struct snd_ac97 ac97_t;
+
+/* opl3/4 */
+typedef struct snd_opl3 opl3_t;
+typedef struct snd_opl4 opl4_t;
+
+/* mpu401 */
+typedef struct snd_mpu401 mpu401_t;
+
+/* i2c */
+typedef struct snd_i2c_device snd_i2c_device_t;
+typedef struct snd_i2c_bus snd_i2c_bus_t;
+
+typedef struct snd_ak4531 ak4531_t;
+
--- include/linux/pid.h.orig 2008-12-17 01:33:29.000000000 +0100
+++ include/linux/pid.h 2008-12-17 01:40:10.000000000 +0100
@@ -111,6 +111,7 @@
*/
extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns);
extern struct pid *find_vpid(int nr);
+extern struct pid *find_pid(int nr);
/*
* Lookup a PID in the hash table, and return with it's count elevated.
--- kernel/pid.c.orig 2008-12-17 01:33:52.000000000 +0100
+++ kernel/pid.c 2008-12-17 01:36:41.000000000 +0100
@@ -309,6 +309,12 @@
}
EXPORT_SYMBOL_GPL(find_vpid);
+struct pid *find_pid(int nr)
+{
+ return find_pid_ns(nr, &init_pid_ns);
+}
+EXPORT_SYMBOL_GPL(find_pid);
+
/*
* attach_pid() must be called with the tasklist_lock write-held.
*/
--- include/linux/sched.h.orig 2008-12-17 00:10:02.000000000 +0100
+++ include/linux/sched.h 2008-12-17 00:10:57.000000000 +0100
@@ -1893,6 +1893,7 @@
extern void force_sig_specific(int, struct task_struct *);
extern int send_sig(int, struct task_struct *, int);
extern void zap_other_threads(struct task_struct *p);
+extern int kill_proc(pid_t, int, int);
extern struct sigqueue *sigqueue_alloc(void);
extern void sigqueue_free(struct sigqueue *);
extern int send_sigqueue(struct sigqueue *, struct task_struct *, int group);
--- kernel/signal.c.orig 2008-12-17 01:43:48.000000000 +0100
+++ kernel/signal.c 2008-12-17 01:29:40.000000000 +0100
@@ -1262,6 +1262,17 @@
}
EXPORT_SYMBOL(kill_pid);
+int
+kill_proc(pid_t pid, int sig, int priv)
+{
+ int ret;
+
+ rcu_read_lock();
+ ret = kill_pid_info(sig, __si_special(priv), find_pid(pid));
+ rcu_read_unlock();
+ return ret;
+}
+
/*
* These functions support sending signals using preallocated sigqueue
* structures. This is needed "because realtime applications cannot
@@ -1960,6 +1971,7 @@
EXPORT_SYMBOL_GPL(dequeue_signal);
EXPORT_SYMBOL(flush_signals);
EXPORT_SYMBOL(force_sig);
+EXPORT_SYMBOL(kill_proc);
EXPORT_SYMBOL(send_sig);
EXPORT_SYMBOL(send_sig_info);
EXPORT_SYMBOL(sigprocmask);
--- include/sound/core.h.orig 2008-12-16 23:31:29.000000000 +0100
+++ include/sound/core.h 2008-12-17 00:04:50.000000000 +0100
@@ -29,6 +29,7 @@
#include <linux/pm.h> /* pm_message_t */
#include <linux/device.h>
#include <linux/stringify.h>
+#include "typedefs.h"
/* number of supported soundcards */
#ifdef CONFIG_SND_DYNAMIC_MINORS
@@ -381,6 +382,23 @@
#endif
/**
+ * snd_assert - run-time assertion macro
+ * @expr: expression
+ *
+ * This macro checks the expression in run-time and invokes the commands
+ * given in the rest arguments if the assertion is failed.
+ * When CONFIG_SND_DEBUG is not set, the expression is executed but
+ * not checked.
+ */
+#define snd_assert(expr, args...) do { \
+ if (unlikely(!(expr))) { \
+ snd_printk(KERN_ERR "BUG? (%s)\n", __ASTRING__(expr)); \
+ dump_stack(); \
+ args; \
+ }
+} while (0)
+
+/**
* snd_BUG - give a BUG warning message and stack trace
*
* Calls WARN() if CONFIG_SND_DEBUG is set.
@@ -408,6 +426,7 @@
#else /* !CONFIG_SND_DEBUG */
#define snd_printd(fmt, args...) do { } while (0)
+#define snd_assert(expr, args...) (void)(expr)
#define snd_BUG() do { } while (0)
static inline int __snd_bug_on(int cond)
{
|
|
|
Back to top |
|
|
erikderzweite Tux's lil' helper
Joined: 25 Feb 2006 Posts: 143
|
Posted: Sun May 03, 2009 8:51 am Post subject: A more elegant solution: bluez4 + pulseaudio |
|
|
Here is a solution of getting headset work on my Gentoo installation I currently use.
Caution: doesn't work with skype on 64-bit system (at least on my system it doesn't).
As seen on pulseaudio's mailing list: https://tango.0pointer.de/pipermail/pulseaudio-discuss/2009-April/003531.html
You can safely use net-wireless/blueman instead of gnome-bluetooth though. If you're a hardcore KDE fan, net-wireless/kdebluetooth4 from kde-testing overlay works too. You need to unmask it along with bluez-4* and put a modified version of pulseaudio ebuild to your local overlay as the in-tree-ebuild requires bluez-libs and bluez-utils instead of bluez package.
Code: |
--- /usr/portage/media-sound/pulseaudio/pulseaudio-0.9.15.ebuild 2009-04-17 14:08:49.000000000 +0200
+++ /usr/local/portage/media-sound/pulseaudio/pulseaudio-0.9.15.ebuild 2009-04-26 21:12:50.192746598 +0200
@@ -39,7 +39,7 @@
)
app-admin/eselect-esd
bluetooth? (
- >=net-wireless/bluez-libs-3
+ >=net-wireless/bluez-4
>=sys-apps/dbus-1.0.0
)
policykit? ( sys-auth/policykit )
@@ -64,7 +64,7 @@
sys-apps/openrc
gnome-extra/gnome-audio
alsa? ( media-sound/alsa-utils )
- bluetooth? ( >=net-wireless/bluez-utils-3 )"
+ bluetooth? ( >=net-wireless/bluez-4 )"
pkg_setup() {
enewgroup audio 18 # Just make sure it exists |
Kernel patch mentioned in the mailing list has to be applied manually, of course. Follow gentoo's pulseaudio HOWTO to set the whole thing up and enjoy! Works pretty stable and reliable for me, headset is detected as both source and sink automatically upon connection. |
|
Back to top |
|
|
fbcyborg Advocate
Joined: 16 Oct 2005 Posts: 3056 Location: ROMA
|
Posted: Sun May 03, 2009 8:54 am Post subject: |
|
|
Hello,
I tried that patch on my 2.6.29 gentoo sources but I get the following:
Code: | patching file include/sound/typedefs.h
patching file include/linux/pid.h
Hunk #1 FAILED at 111.
1 out of 1 hunk FAILED -- saving rejects to file include/linux/pid.h.rej
patching file kernel/pid.c
Hunk #1 FAILED at 309.
1 out of 1 hunk FAILED -- saving rejects to file kernel/pid.c.rej
patching file include/linux/sched.h
Hunk #1 FAILED at 1893.
1 out of 1 hunk FAILED -- saving rejects to file include/linux/sched.h.rej
patching file kernel/signal.c
Hunk #1 FAILED at 1262.
Hunk #2 FAILED at 1971.
2 out of 2 hunks FAILED -- saving rejects to file kernel/signal.c.rej
patching file include/sound/core.h
Hunk #1 FAILED at 29.
Hunk #2 FAILED at 382.
Hunk #3 FAILED at 426.
3 out of 3 hunks FAILED -- saving rejects to file include/sound/core.h.rej
|
_________________ [HOWTO] Come criptare la /home usando cryptsetup e luks
[HOWTO] Abilitare il supporto al dom0 XEN su kernel 3.X
Help answer the unanswered |
|
Back to top |
|
|
erikderzweite Tux's lil' helper
Joined: 25 Feb 2006 Posts: 143
|
Posted: Sun May 03, 2009 9:13 am Post subject: formatting |
|
|
forgot about the formatting issue, add --ignore-whitespace to your patch options. |
|
Back to top |
|
|
fbcyborg Advocate
Joined: 16 Oct 2005 Posts: 3056 Location: ROMA
|
|
Back to top |
|
|
sushyad n00b
Joined: 29 Jul 2003 Posts: 22
|
Posted: Sun Jun 21, 2009 9:16 am Post subject: Able to record, but not able to playback through headset |
|
|
Hi erikderzweite,
I am using bluez-4.39 with gentoo-sources-2.6.28-r1 kernel. I am able to record using two different headsets, but aplay fails. The logs are full of
Code: |
hci_scodata_packet: hci0 SCO packet for unknown connection handle 0
bluetoothd[6156]: No matching connection found for handle 1 |
hciconfig -a produces:
Code: | hci0: Type: USB
BD Address: 00:16:38:CA:0D:AF ACL MTU: 1017:8 SCO MTU: 64:0
UP RUNNING PSCAN
RX bytes:53702 acl:237 sco:852 events:329 errors:5
TX bytes:5617 acl:216 sco:0 commands:150 errors:0
Features: 0xff 0xff 0x8d 0xfe 0x9b 0xfd 0x00 0x80
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'tuxc2d-0'
Class: 0x0a0104
Service Classes: Networking, Capturing
Device Class: Computer, Desktop workstation
HCI Ver: 2.0 (0x3) HCI Rev: 0x208f LMP Ver: 2.0 (0x3) LMP Subver: 0x415c
Manufacturer: Broadcom Corporation (15) |
I patched the sco.c file in the kernel to use type=SCO_LINK only but the messages keep repeating. The dongle is Targus ACB10. Is it possible that it doesn't support audio playback?
Have you ever come across this type of playback error?
Thanks! |
|
Back to top |
|
|
erikderzweite Tux's lil' helper
Joined: 25 Feb 2006 Posts: 143
|
Posted: Sun Jun 21, 2009 9:26 am Post subject: Re: Able to record, but not able to playback through headset |
|
|
sushyad wrote: |
Have you ever come across this type of playback error?
Thanks! |
No, I can't recall such a problem. I'm not up-to-date with Broadcom chipset status though. Do you use pulseaudio or alsa method to connect to your headset? Have you tried Code: | mplayer -ao alsa:device=bluetooth some.file |
|
|
Back to top |
|
|
sushyad n00b
Joined: 29 Jul 2003 Posts: 22
|
Posted: Sun Jun 21, 2009 9:50 am Post subject: |
|
|
Hi erikderzweite,
I am using alsa method. I've tried mplayer and aplay with no success. The heaset beeps but doesn't play anything. Recording works just fine. I just finished testing it on Windows XP, and I am able to hear the audio using the headset, so there is something in my gentoo setup that is messed up. I tried going back to btsco too, but using that, even recording was not working. It's an amd64 build.
Thanks! |
|
Back to top |
|
|
linbox n00b
Joined: 10 Apr 2004 Posts: 41
|
Posted: Sun Jul 19, 2009 5:03 am Post subject: does 2.6.30-gentoo-r2 still need a patch |
|
|
I was just wondering if I still need to patch the 2.6.30-gentoo-r2 kernel and where would I find the patch for this kernel?
thanks |
|
Back to top |
|
|
fbcyborg Advocate
Joined: 16 Oct 2005 Posts: 3056 Location: ROMA
|
|
Back to top |
|
|
jemi n00b
Joined: 06 Oct 2010 Posts: 21
|
Posted: Thu Oct 14, 2010 2:59 am Post subject: Is this info still up to date? |
|
|
Hi all, I'm trying to get a bluetooth headset working in Gentoo and I haven't found any info more recent than 2009. Could someone more knowledgeable please post an updated guide that applies now? The original posting in this thread is ridiculously old. Thanks. |
|
Back to top |
|
|
fbcyborg Advocate
Joined: 16 Oct 2005 Posts: 3056 Location: ROMA
|
|
Back to top |
|
|
erikderzweite Tux's lil' helper
Joined: 25 Feb 2006 Posts: 143
|
Posted: Thu Oct 14, 2010 10:56 am Post subject: |
|
|
fbcyborg wrote: | Hi jemi, you are right, but I gave up since I've never be able to get it working. It seems to be very hard (read "impossible") now. |
Quite the contrary, it got much easier now. You don't need any of the oldschool hackery, you just need pulseaudio with appropriate flags and e.g. blueman. In my case no tinkering needed at all. Once you've connected to the headset it will be recognized by pulseaudio as sink/source and you can move sound streams around.
My advice ̣— forget this forum and use pulse for your headset. The patch won't be maintained anymore as it is not needed. |
|
Back to top |
|
|
fbcyborg Advocate
Joined: 16 Oct 2005 Posts: 3056 Location: ROMA
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|