Re: [pulseaudio-discuss] [PATCH] alsa-mixer: Get rid of a compiler warning.
'Twas brillig, and Tanu Kaskinen at 27/03/11 19:35 did gyre and gimble: On 64-bit systems LONG_MAX is greater than the largest possible value of a uint32_t variable, which caused the compiler to warn about a comparison that is always false. On 32-bit systems pa_atou() can return a value that will overflow when assigned to e-volume_limit, which has type long, so the comparison was necessary. Thanks. Merged in my tree. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] [PATCH] .gitignore: Add ChangeLog to the ignore list.
'Twas brillig, and Tanu Kaskinen at 27/03/11 17:14 did gyre and gimble: --- .gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index 85c0fe5..3a840d9 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ libtool ltmain.sh missing stamp-* +ChangeLog Thanks, merged in my tree. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
[pulseaudio-discuss] Any patches for stable-queue?
Hi, We're gonna do a stable-queue release pretty soon just to (hopefully) wind up the 0.9.x series. Anybody have patches they want to nominate for the stable-queue branch? Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
[pulseaudio-discuss] Race condition in threaded mainloop
Hi, when developing PulseAudio clients with a threaded mainloop (on OS X in my case), I came across an effect which causes my client to crash out early with a failed assertion like Assertion 'c-defer_event == e' failed at pulsecore/socket-client.c:172, function connect_defer_cb(). Aborting. Searching for this issue didn't reveal much, except that there has been other people seeing this: https://bugzilla.redhat.com/show_bug.cgi?id=497650 Looking at the code, it seems obvious that this is a simple race condition. In do_connect(), pulsecore/socket-client.c:210, we have this: c-defer_event = c-mainloop-defer_new(c-mainloop, connect_defer_cb, c); and defer_new() calls pa_mainloop_wakeup() before it returns. So in a threaded mainloop, it could be that the defered event has already been dispatched before defer_new() returns. However, c-defer_event is assigned *after* defer_new() returns, and hence the assertion fails consequently. The same counts for defer_enable() in some cases, as the event is enabled by default and could have been executed already, so disabling it after the mainloop was woken up has no effect. As this seems so obvious, and the code has been around for some years, I wonder whether I miss anything obvious here. Is there any mutex (which doesn't work yet on OS X) that should protect the mainloop from this race? I attached a patch ready to fix this issue for me, but I'm not sure whether there is more code left which fails for similar assumptions. Thanks, Daniel 0001-mainloop-api-fix-race-condition-in-defer_new.patch Description: Binary data ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] Help with pulsaudio
Hi, I'm replying to Amgad via Daniel's quotation of Amgad's reply to Daniel: On Mon, Mar 28, 2011 at 5:54 AM, Daniel Mack zon...@gmail.com wrote: Hi Amgad, On Mon, Mar 28, 2011 at 10:26 AM, Yousif, Amgad (UK) amgad.you...@baesystems.com wrote: Sorry about that I tried to find individual email but couldn't se any. No, the idea is to use public mailing lists for free software projects and *not* to ask questions to individual developers privately. My comment about the disclaimer was just about the fact that nobody can answer to a mail which contains such a disclaimer because the word priviledged is unclear in this context. There are some rules to obey on such lists and the two most important ones are: - Always reply to the list, and not only to the person who answered you. This way, other people can join the conversation and collaborate, and the discussion can be found in the archives later. Hence, always use reply-to-all. Always. - Do not top-post but quote your answers inline. That helps following the discussion a lot. Anyways thanks for the reply. I already looked at the networking page very well and couldn't see how any section on that could help with what im trying to do!. I am trying to build a Ubuntu 10.10 server which I can remotely access from a windows machine. I am using a server called freeNX. The remote desktop works great except there is no sound on the remote session. I looked into this and found out that freeNX uses ESD to transfer sound through the session. But ESD has been replaced with pulsaudio on Ubuntu. I don't want to used ESD. I want to use Pulsaidio (as this is now used instead). This is the most useful information I have on getting sound through freeNX, if you can help or have any idea how this could be achieved through pulsaudio please let me know. What should I do to play sound inside my NX session? http://www.nomachine.com/ar/view.php?ar_id=AR03D00355 How to enable ESD sound support on Linux distributions not shipping the Enlightened Sound Daemon http://www.nomachine.com/ar/view.php?ar_id=AR11E00491 Unfortunately, I have not much of an idea about Windows integration of PulseAudio, but I know that there has been some discussion about that recently on this list. So maybe someone else can help? Amgad-- See the below thread for a lengthy discussion on the current state of PulseAudio on Windows, including how to obtain a copy of the binaries as created by Maarten Bosmans (so you wouldn't have to compile it from source code if you're OK with possibly not using the very latest version). http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/8717 To sum it up, you should be able to treat your PulseAudio server on Windows as if it were running on Linux. Both server-side and client-side support are supported. That is to say, you can have PulseAudio clients running on Windows and they are able to playback either to a local PulseAudio server or to a remote one. And symmetrically, you can run PulseAudio clients on other computers (even Linux computers) and play sound to a PulseAudio *server* running on Windows. So the Windows side can be a Pulse client, Pulse server, or both. All of it is completely network transparent, but if you involve multiple computers, then I would recommend a LAN-style gigabit ethernet uplink (or 100 Mbps at least) between them for best performance, preferably just a patchover cable from NIC to NIC (routers add latency). HTH, Sean Daniel ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
[pulseaudio-discuss] [PATCH] cork-on-phone: Handle sink-inputs with NULL sinks
It's possible that by the time we receive the unlink hook, the given sink-input's sink is set to NULL. Handle this gracefully. --- src/modules/module-cork-music-on-phone.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/modules/module-cork-music-on-phone.c b/src/modules/module-cork-music-on-phone.c index b629f06..5e6aa64 100644 --- a/src/modules/module-cork-music-on-phone.c +++ b/src/modules/module-cork-music-on-phone.c @@ -138,6 +138,9 @@ static pa_hook_result_t process(struct userdata *u, pa_sink_input *i, pa_bool_t !pa_streq(role, video)) return PA_HOOK_OK; +if (!i-sink) +return PA_HOOK_OK; + cork = shall_cork(i-sink, create ? NULL : i); apply_cork(u, i-sink, create ? NULL : i, cork); -- 1.7.4.1 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] [PATCH] cork-on-phone: Handle sink-inputs with NULL sinks
'Twas brillig, and Arun Raghavan at 28/03/11 12:09 did gyre and gimble: It's possible that by the time we receive the unlink hook, the given sink-input's sink is set to NULL. Handle this gracefully. --- src/modules/module-cork-music-on-phone.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/modules/module-cork-music-on-phone.c b/src/modules/module-cork-music-on-phone.c index b629f06..5e6aa64 100644 --- a/src/modules/module-cork-music-on-phone.c +++ b/src/modules/module-cork-music-on-phone.c @@ -138,6 +138,9 @@ static pa_hook_result_t process(struct userdata *u, pa_sink_input *i, pa_bool_t !pa_streq(role, video)) return PA_HOOK_OK; +if (!i-sink) +return PA_HOOK_OK; + cork = shall_cork(i-sink, create ? NULL : i); apply_cork(u, i-sink, create ? NULL : i, cork); Cheers. It's in my tree. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
[pulseaudio-discuss] [PATCH 0/5] SCO over PCM fixes
Here are some fixes for the bluetooth SCO over PCM functionality. The patches are old (except the one that removes the #ifdefs), so they should be pretty well tested in Maemo. Rebasing on top of new upstream code isn't tested, though, because I don't have a good setup for that. Marc-André Lureau (3): bluetooth: use sco_sink/source to start with right state bluetooth: fix set_volume_cb on sco over pcm bluetooth: restore original sco_{sink,src}-set_volume when unloading Tanu Kaskinen (2): bluetooth: Drop all #ifdef NOKIA directives. bluetooth: Refuse to use the HSP profile if there is some other HSP device active. src/modules/bluetooth/module-bluetooth-device.c | 217 +++ 1 files changed, 145 insertions(+), 72 deletions(-) -- 1.7.4.1 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
[pulseaudio-discuss] [PATCH 1/5] bluetooth: Drop all #ifdef NOKIA directives.
The #ifdefs only added clutter. I don't see any reason to not compile the SCO over PCM support in all the time. --- src/modules/bluetooth/module-bluetooth-device.c | 57 +++--- 1 files changed, 8 insertions(+), 49 deletions(-) diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index ac0f16f..af08003 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -78,14 +78,9 @@ PA_MODULE_USAGE( rate=sample rate channels=number of channels path=device object path -auto_connect=automatically connect?); - -/* -#ifdef NOKIA +auto_connect=automatically connect? sco_sink=SCO over PCM sink name -sco_source=SCO over PCM source name -#endif -*/ +sco_source=SCO over PCM source name); /* TODO: not close fd when entering suspend mode in a2dp */ @@ -103,10 +98,8 @@ static const char* const valid_modargs[] = { channels, path, auto_connect, -#ifdef NOKIA sco_sink, sco_source, -#endif NULL }; @@ -126,10 +119,8 @@ struct a2dp_info { struct hsp_info { pcm_capabilities_t pcm_capabilities; -#ifdef NOKIA pa_sink *sco_sink; pa_source *sco_source; -#endif pa_hook_slot *sink_state_changed_slot; pa_hook_slot *source_state_changed_slot; }; @@ -191,9 +182,7 @@ struct userdata { #define MAX_PLAYBACK_CATCH_UP_USEC (100*PA_USEC_PER_MSEC) -#ifdef NOKIA #define USE_SCO_OVER_PCM(u) (u-profile == PROFILE_HSP (u-hsp.sco_sink u-hsp.sco_source)) -#endif static int init_bt(struct userdata *u); static int init_profile(struct userdata *u); @@ -1884,8 +1873,6 @@ static char *get_name(const char *type, pa_modargs *ma, const char *device_id, p return pa_sprintf_malloc(bluez_%s.%s, type, n); } -#ifdef NOKIA - static void sco_over_pcm_state_update(struct userdata *u) { pa_assert(u); pa_assert(USE_SCO_OVER_PCM(u)); @@ -1948,12 +1935,8 @@ static pa_hook_result_t source_state_changed_cb(pa_core *c, pa_source *s, struct return PA_HOOK_OK; } -#endif - /* Run from main thread */ static int add_sink(struct userdata *u) { - -#ifdef NOKIA if (USE_SCO_OVER_PCM(u)) { pa_proplist *p; @@ -1966,10 +1949,7 @@ static int add_sink(struct userdata *u) { if (!u-hsp.sink_state_changed_slot) u-hsp.sink_state_changed_slot = pa_hook_connect(u-core-hooks[PA_CORE_HOOK_SINK_STATE_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) sink_state_changed_cb, u); -} else -#endif - -{ +} else { pa_sink_new_data data; pa_bool_t b; @@ -2017,8 +1997,6 @@ static int add_sink(struct userdata *u) { /* Run from main thread */ static int add_source(struct userdata *u) { - -#ifdef NOKIA if (USE_SCO_OVER_PCM(u)) { u-source = u-hsp.sco_source; pa_proplist_sets(u-source-proplist, bluetooth.protocol, hsp); @@ -2026,10 +2004,7 @@ static int add_source(struct userdata *u) { if (!u-hsp.source_state_changed_slot) u-hsp.source_state_changed_slot = pa_hook_connect(u-core-hooks[PA_CORE_HOOK_SOURCE_STATE_CHANGED], PA_HOOK_NORMAL, (pa_hook_cb_t) source_state_changed_cb, u); -} else -#endif - -{ +} else { pa_source_new_data data; pa_bool_t b; @@ -2290,12 +2265,10 @@ static int setup_bt(struct userdata *u) { pa_log_debug(Connection to the device configured); -#ifdef NOKIA if (USE_SCO_OVER_PCM(u)) { pa_log_debug(Configured to use SCO over PCM); return 0; } -#endif pa_log_debug(Got the stream socket); @@ -2384,7 +2357,6 @@ static int start_thread(struct userdata *u) { u-rtpoll = pa_rtpoll_new(); pa_thread_mq_init(u-thread_mq, u-core-mainloop, u-rtpoll); -#ifdef NOKIA if (USE_SCO_OVER_PCM(u)) { if (u-transport) { if (bt_transport_acquire(u, TRUE) 0) @@ -2397,7 +2369,6 @@ static int start_thread(struct userdata *u) { /* FIXME: monitor stream_fd error */ return 0; } -#endif if (!(u-thread = pa_thread_new(bluetooth, thread_func, u))) { pa_log_error(Failed to create IO thread); @@ -2464,17 +2435,15 @@ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) { if (u-sink) { inputs = pa_sink_move_all_start(u-sink, NULL); -#ifdef NOKIA + if (!USE_SCO_OVER_PCM(u)) -#endif pa_sink_unlink(u-sink); } if (u-source) { outputs = pa_source_move_all_start(u-source, NULL); -#ifdef NOKIA + if (!USE_SCO_OVER_PCM(u)) -#endif pa_source_unlink(u-source); } @@ -2731,7 +2700,6 @@ int pa__init(pa_module* m) { u-sample_spec = m-core-default_sample_spec; u-modargs = ma; -#ifdef NOKIA if (pa_modargs_get_value(ma, sco_sink, NULL) !(u-hsp.sco_sink = pa_namereg_get(m-core, pa_modargs_get_value(ma, sco_sink, NULL),
[pulseaudio-discuss] [PATCH 2/5] bluetooth: use sco_sink/source to start with right state
From: Marc-André Lureau marc-andre.lur...@nokia.com Note from Tanu Kaskinen: I resolved some conflicts with newer upstream code, so if this patch is broken, blame me.. --- src/modules/bluetooth/module-bluetooth-device.c | 39 +- 1 files changed, 23 insertions(+), 16 deletions(-) diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index af08003..10fb5ed 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -1873,39 +1873,46 @@ static char *get_name(const char *type, pa_modargs *ma, const char *device_id, p return pa_sprintf_malloc(bluez_%s.%s, type, n); } -static void sco_over_pcm_state_update(struct userdata *u) { +static int sco_over_pcm_state_update(struct userdata *u) { pa_assert(u); pa_assert(USE_SCO_OVER_PCM(u)); if (PA_SINK_IS_OPENED(pa_sink_get_state(u-hsp.sco_sink)) || PA_SOURCE_IS_OPENED(pa_source_get_state(u-hsp.sco_source))) { -if (u-service_fd = 0) -return; +if (u-service_fd = 0 u-stream_fd = 0) +return 0; init_bt(u); pa_log_debug(Resuming SCO over PCM); -if (init_profile(u) 0) +if (init_profile(u) 0) { pa_log(Can't resume SCO over PCM); +return -1; +} if (u-transport) -bt_transport_acquire(u, TRUE); +return bt_transport_acquire(u, TRUE); else -start_stream_fd(u); +return start_stream_fd(u); + } else { +if (u-service_fd 0 u-stream_fd 0) +return 0; -if (u-service_fd 0) -return; +pa_log_debug(Closing SCO over PCM); if (u-transport) bt_transport_release(u); -else +else if (u-stream_fd = 0) stop_stream_fd(u); -pa_log_debug(Closing SCO over PCM); -pa_close(u-service_fd); -u-service_fd = -1; +if (u-service_fd = 0) { +pa_close(u-service_fd); +u-service_fd = -1; +} + +return 0; } } @@ -2358,11 +2365,11 @@ static int start_thread(struct userdata *u) { pa_thread_mq_init(u-thread_mq, u-core-mainloop, u-rtpoll); if (USE_SCO_OVER_PCM(u)) { -if (u-transport) { -if (bt_transport_acquire(u, TRUE) 0) -return -1; -} else if (start_stream_fd(u) 0) +if (sco_over_pcm_state_update(u) 0) { +u-sink = NULL; +u-source = NULL; return -1; +} pa_sink_ref(u-sink); pa_source_ref(u-source); -- 1.7.4.1 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
[pulseaudio-discuss] [PATCH 4/5] bluetooth: restore original sco_{sink, src}-set_volume when unloading
From: Marc-André Lureau marc-andre.lur...@nokia.com --- src/modules/bluetooth/module-bluetooth-device.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index 455a53a..540d48c 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -121,7 +121,9 @@ struct a2dp_info { struct hsp_info { pcm_capabilities_t pcm_capabilities; pa_sink *sco_sink; +void (*sco_sink_set_volume)(pa_sink *s); pa_source *sco_source; +void (*sco_source_set_volume)(pa_source *s); pa_hook_slot *sink_state_changed_slot; pa_hook_slot *source_state_changed_slot; }; @@ -2804,12 +2806,14 @@ int pa__init(pa_module* m) { init_bt(u); if (u-hsp.sco_sink) { +u-hsp.sco_sink_set_volume = u-hsp.sco_sink-set_volume; k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-hsp.sco_sink); pa_shared_set(u-core, k, u); pa_xfree(k); } if (u-hsp.sco_source) { +u-hsp.sco_source_set_volume = u-hsp.sco_source-set_volume; k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-hsp.sco_source); pa_shared_set(u-core, k, u); pa_xfree(k); @@ -2890,12 +2894,14 @@ void pa__done(pa_module *m) { shutdown_bt(u); if (u-hsp.sco_sink) { +u-hsp.sco_sink-set_volume = u-hsp.sco_sink_set_volume; k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-hsp.sco_sink); pa_shared_remove(u-core, k); pa_xfree(k); } if (u-hsp.sco_source) { +u-hsp.sco_source-set_volume = u-hsp.sco_source_set_volume; k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-hsp.sco_source); pa_shared_remove(u-core, k); pa_xfree(k); -- 1.7.4.1 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
[pulseaudio-discuss] [PATCH 3/5] bluetooth: fix set_volume_cb on sco over pcm
From: Marc-André Lureau marc-andre.lur...@nokia.com The current implementation is totally bogus, it cast the over_sink userdata to the bluetooth-device userdata... It was failing nicely because the previous code had a gentle safe-guard in u-profile == PROFILE_HSP, and u-profile was just random. There is no easy way to associate additional data to a sink or source. Two solutions seems possible: looking up loaded modules and check which one was handling the sink/source, or using pa_shared. I went for the second solution. --- src/modules/bluetooth/module-bluetooth-device.c | 59 +++ 1 files changed, 50 insertions(+), 9 deletions(-) diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index 10fb5ed..455a53a 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -39,6 +39,7 @@ #include pulsecore/core-rtclock.h #include pulsecore/core-util.h #include pulsecore/core-error.h +#include pulsecore/shared.h #include pulsecore/socket-util.h #include pulsecore/thread.h #include pulsecore/thread-mq.h @@ -1798,14 +1799,21 @@ fail: /* Run from main thread */ static void sink_set_volume_cb(pa_sink *s) { -struct userdata *u = s-userdata; DBusMessage *m; dbus_uint16_t gain; +struct userdata *u; +char *k; -pa_assert(u); +pa_assert(s); +pa_assert(s-core); -if (u-profile != PROFILE_HSP) -return; +k = pa_sprintf_malloc(bluetooth-device@%p, (void*) s); +u = pa_shared_get(s-core, k); +pa_xfree(k); + +pa_assert(u); +pa_assert(u-sink == s); +pa_assert(u-profile == PROFILE_HSP); gain = (pa_cvolume_max(s-real_volume) * 15) / PA_VOLUME_NORM; @@ -1822,14 +1830,21 @@ static void sink_set_volume_cb(pa_sink *s) { /* Run from main thread */ static void source_set_volume_cb(pa_source *s) { -struct userdata *u = s-userdata; DBusMessage *m; dbus_uint16_t gain; +struct userdata *u; +char *k; -pa_assert(u); +pa_assert(s); +pa_assert(s-core); -if (u-profile != PROFILE_HSP) -return; +k = pa_sprintf_malloc(bluetooth-device@%p, (void*) s); +u = pa_shared_get(s-core, k); +pa_xfree(k); + +pa_assert(u); +pa_assert(u-source == s); +pa_assert(u-profile == PROFILE_HSP); gain = (pa_cvolume_max(s-volume) * 15) / PA_VOLUME_NORM; @@ -2687,7 +2702,7 @@ int pa__init(pa_module* m) { struct userdata *u; const char *address, *path; DBusError err; -char *mike, *speaker, *transport; +char *mike, *speaker, *transport, *k; const pa_bluetooth_device *device; pa_assert(m); @@ -2788,6 +2803,18 @@ int pa__init(pa_module* m) { /* Connect to the BT service */ init_bt(u); +if (u-hsp.sco_sink) { +k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-hsp.sco_sink); +pa_shared_set(u-core, k, u); +pa_xfree(k); +} + +if (u-hsp.sco_source) { +k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-hsp.sco_source); +pa_shared_set(u-core, k, u); +pa_xfree(k); +} + if (u-profile != PROFILE_OFF) if (init_profile(u) 0) goto fail; @@ -2820,6 +2847,8 @@ int pa__get_n_used(pa_module *m) { void pa__done(pa_module *m) { struct userdata *u; +char *k; + pa_assert(m); if (!(u = m-userdata)) @@ -2860,6 +2889,18 @@ void pa__done(pa_module *m) { shutdown_bt(u); +if (u-hsp.sco_sink) { +k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-hsp.sco_sink); +pa_shared_remove(u-core, k); +pa_xfree(k); +} + +if (u-hsp.sco_source) { +k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-hsp.sco_source); +pa_shared_remove(u-core, k); +pa_xfree(k); +} + if (u-a2dp.buffer) pa_xfree(u-a2dp.buffer); -- 1.7.4.1 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
[pulseaudio-discuss] [PATCH 5/5] bluetooth: Refuse to use the HSP profile if there is some other HSP device active.
From: Tanu Kaskinen ext-tanu.kaski...@nokia.com --- src/modules/bluetooth/module-bluetooth-device.c | 126 +-- 1 files changed, 93 insertions(+), 33 deletions(-) diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index 540d48c..1154651 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -185,6 +185,8 @@ struct userdata { #define MAX_PLAYBACK_CATCH_UP_USEC (100*PA_USEC_PER_MSEC) +#define CURRENT_HSP_DEVICE_KEY current-hsp-device /* Key to core-shared. */ + #define USE_SCO_OVER_PCM(u) (u-profile == PROFILE_HSP (u-hsp.sco_sink u-hsp.sco_source)) static int init_bt(struct userdata *u); @@ -1961,6 +1963,8 @@ static pa_hook_result_t source_state_changed_cb(pa_core *c, pa_source *s, struct /* Run from main thread */ static int add_sink(struct userdata *u) { +char *k; + if (USE_SCO_OVER_PCM(u)) { pa_proplist *p; @@ -2014,6 +2018,10 @@ static int add_sink(struct userdata *u) { if (u-profile == PROFILE_HSP) { u-sink-set_volume = sink_set_volume_cb; u-sink-n_volume_steps = 16; + +k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-sink); +pa_shared_set(u-core, k, u); +pa_xfree(k); } return 0; @@ -2021,6 +2029,8 @@ static int add_sink(struct userdata *u) { /* Run from main thread */ static int add_source(struct userdata *u) { +char *k; + if (USE_SCO_OVER_PCM(u)) { u-source = u-hsp.sco_source; pa_proplist_sets(u-source-proplist, bluetooth.protocol, hsp); @@ -2079,6 +2089,10 @@ static int add_source(struct userdata *u) { if (u-profile == PROFILE_HSP) { u-source-set_volume = source_set_volume_cb; u-source-n_volume_steps = 16; + +k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-source); +pa_shared_set(u-core, k, u); +pa_xfree(k); } return 0; @@ -2325,6 +2339,8 @@ static int init_profile(struct userdata *u) { /* Run from main thread */ static void stop_thread(struct userdata *u) { +char *k; + pa_assert(u); if (u-thread) { @@ -2349,11 +2365,23 @@ static void stop_thread(struct userdata *u) { } if (u-sink) { +if (u-profile == PROFILE_HSP) { +k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-sink); +pa_shared_remove(u-core, k); +pa_xfree(k); +} + pa_sink_unref(u-sink); u-sink = NULL; } if (u-source) { +if (u-profile == PROFILE_HSP) { +k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-source); +pa_shared_remove(u-core, k); +pa_xfree(k); +} + pa_source_unref(u-source); u-source = NULL; } @@ -2383,8 +2411,20 @@ static int start_thread(struct userdata *u) { if (USE_SCO_OVER_PCM(u)) { if (sco_over_pcm_state_update(u) 0) { -u-sink = NULL; -u-source = NULL; +char *k; + +if (u-sink) { +k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-sink); +pa_shared_remove(u-core, k); +pa_xfree(k); +u-sink = NULL; +} +if (u-source) { +k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-source); +pa_shared_remove(u-core, k); +pa_xfree(k); +u-source = NULL; +} return -1; } @@ -2421,9 +2461,25 @@ static int start_thread(struct userdata *u) { return 0; } +static void save_sco_volume_callbacks(struct userdata *u) { +pa_assert(u); +pa_assert(USE_SCO_OVER_PCM(u)); + +u-hsp.sco_sink_set_volume = u-hsp.sco_sink-set_volume; +u-hsp.sco_source_set_volume = u-hsp.sco_source-set_volume; +} + +static void restore_sco_volume_callbacks(struct userdata *u) { +pa_assert(u); +pa_assert(USE_SCO_OVER_PCM(u)); + +u-hsp.sco_sink-set_volume = u-hsp.sco_sink_set_volume; +u-hsp.sco_source-set_volume = u-hsp.sco_source_set_volume; +} + /* Run from main thread */ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) { -struct userdata *u; +struct userdata *u, *other_hsp_device; enum profile *d; pa_queue *inputs = NULL, *outputs = NULL; const pa_bluetooth_device *device; @@ -2439,6 +2495,9 @@ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) { return -PA_ERR_IO; } +if (u-profile == PROFILE_HSP) +pa_shared_remove(u-core, CURRENT_HSP_DEVICE_KEY); + /* The state signal is sent by bluez, so it is racy to check strictly for CONNECTED, we should also accept STREAMING state as being good enough. However, if the profile is used @@ -2448,6 +2507,10 @@ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) { pa_log_warn(HSP is not
[pulseaudio-discuss] [PATCH] module-jack-sink/source: protect against null return in jack_get_ports
Just picking up a crash report from Ubuntu, here's the result. -- David Henningsson, Canonical Ltd. http://launchpad.net/~diwic From 934c52c79bb6faed56a64d6e15f9b285f687afee Mon Sep 17 00:00:00 2001 From: David Henningsson david.hennings...@canonical.com Date: Mon, 28 Mar 2011 14:30:44 +0200 Subject: [PATCH] module-jack-sink/source: protect against null return in jack_get_ports According to jack_get_ports documentation, it seems like returning NULL is valid, and that it should be freed using jack_free. Reported-by: Grayson Peddie BugLink: http://bugs.launchpad.net/bugs/733424 Signed-off-by: David Henningsson david.hennings...@canonical.com --- src/modules/jack/module-jack-sink.c | 13 - src/modules/jack/module-jack-source.c | 13 - 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/modules/jack/module-jack-sink.c b/src/modules/jack/module-jack-sink.c index 08a8bef..706f358 100644 --- a/src/modules/jack/module-jack-sink.c +++ b/src/modules/jack/module-jack-sink.c @@ -343,8 +343,9 @@ int pa__init(pa_module*m) { ports = jack_get_ports(u-client, NULL, JACK_DEFAULT_AUDIO_TYPE, JackPortIsPhysical|JackPortIsInput); channels = 0; -for (p = ports; *p; p++) -channels++; +if (ports) +for (p = ports; *p; p++) +channels++; if (!channels) channels = m-core-default_sample_spec.channels; @@ -432,7 +433,7 @@ int pa__init(pa_module*m) { if (do_connect) { for (i = 0, p = ports; i ss.channels; i++, p++) { -if (!*p) { +if (!p || !*p) { pa_log(Not enough physical output ports, leaving unconnected.); break; } @@ -448,7 +449,8 @@ int pa__init(pa_module*m) { pa_sink_put(u-sink); -free(ports); +if (ports) +jack_free(ports); pa_modargs_free(ma); return 0; @@ -457,7 +459,8 @@ fail: if (ma) pa_modargs_free(ma); -free(ports); +if (ports) +jack_free(ports); pa__done(m); diff --git a/src/modules/jack/module-jack-source.c b/src/modules/jack/module-jack-source.c index 6b12840..8453bd9 100644 --- a/src/modules/jack/module-jack-source.c +++ b/src/modules/jack/module-jack-source.c @@ -289,8 +289,9 @@ int pa__init(pa_module*m) { ports = jack_get_ports(u-client, NULL, JACK_DEFAULT_AUDIO_TYPE, JackPortIsPhysical|JackPortIsOutput); channels = 0; -for (p = ports; *p; p++) -channels++; +if (ports) +for (p = ports; *p; p++) +channels++; if (!channels) channels = m-core-default_sample_spec.channels; @@ -376,7 +377,7 @@ int pa__init(pa_module*m) { if (do_connect) { for (i = 0, p = ports; i ss.channels; i++, p++) { -if (!*p) { +if (!p || !*p) { pa_log(Not enough physical output ports, leaving unconnected.); break; } @@ -393,7 +394,8 @@ int pa__init(pa_module*m) { pa_source_put(u-source); -free(ports); +if (ports) +jack_free(ports); pa_modargs_free(ma); return 0; @@ -402,7 +404,8 @@ fail: if (ma) pa_modargs_free(ma); -free(ports); +if (ports) +jack_free(ports); pa__done(m); -- 1.7.4.1 ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] [PATCH] module-jack-sink/source: protect against null return in jack_get_ports
'Twas brillig, and David Henningsson at 28/03/11 14:16 did gyre and gimble: Just picking up a crash report from Ubuntu, here's the result. Thanks. In my tree now. Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/] ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] [PATCH 5/5] bluetooth: Refuse to use the HSP profile if there is some other HSP device active.
Hi Tanu, On Mon, Mar 28, 2011 at 3:35 PM, Tanu Kaskinen tanu.kaski...@digia.com wrote: From: Tanu Kaskinen ext-tanu.kaski...@nokia.com --- src/modules/bluetooth/module-bluetooth-device.c | 126 +-- 1 files changed, 93 insertions(+), 33 deletions(-) diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c index 540d48c..1154651 100644 --- a/src/modules/bluetooth/module-bluetooth-device.c +++ b/src/modules/bluetooth/module-bluetooth-device.c @@ -185,6 +185,8 @@ struct userdata { #define MAX_PLAYBACK_CATCH_UP_USEC (100*PA_USEC_PER_MSEC) +#define CURRENT_HSP_DEVICE_KEY current-hsp-device /* Key to core-shared. */ + #define USE_SCO_OVER_PCM(u) (u-profile == PROFILE_HSP (u-hsp.sco_sink u-hsp.sco_source)) static int init_bt(struct userdata *u); @@ -1961,6 +1963,8 @@ static pa_hook_result_t source_state_changed_cb(pa_core *c, pa_source *s, struct /* Run from main thread */ static int add_sink(struct userdata *u) { + char *k; + if (USE_SCO_OVER_PCM(u)) { pa_proplist *p; @@ -2014,6 +2018,10 @@ static int add_sink(struct userdata *u) { if (u-profile == PROFILE_HSP) { u-sink-set_volume = sink_set_volume_cb; u-sink-n_volume_steps = 16; + + k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-sink); + pa_shared_set(u-core, k, u); + pa_xfree(k); } return 0; @@ -2021,6 +2029,8 @@ static int add_sink(struct userdata *u) { /* Run from main thread */ static int add_source(struct userdata *u) { + char *k; + if (USE_SCO_OVER_PCM(u)) { u-source = u-hsp.sco_source; pa_proplist_sets(u-source-proplist, bluetooth.protocol, hsp); @@ -2079,6 +2089,10 @@ static int add_source(struct userdata *u) { if (u-profile == PROFILE_HSP) { u-source-set_volume = source_set_volume_cb; u-source-n_volume_steps = 16; + + k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-source); + pa_shared_set(u-core, k, u); + pa_xfree(k); } return 0; @@ -2325,6 +2339,8 @@ static int init_profile(struct userdata *u) { /* Run from main thread */ static void stop_thread(struct userdata *u) { + char *k; + pa_assert(u); if (u-thread) { @@ -2349,11 +2365,23 @@ static void stop_thread(struct userdata *u) { } if (u-sink) { + if (u-profile == PROFILE_HSP) { + k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-sink); + pa_shared_remove(u-core, k); + pa_xfree(k); + } + pa_sink_unref(u-sink); u-sink = NULL; } if (u-source) { + if (u-profile == PROFILE_HSP) { + k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-source); + pa_shared_remove(u-core, k); + pa_xfree(k); + } + pa_source_unref(u-source); u-source = NULL; } @@ -2383,8 +2411,20 @@ static int start_thread(struct userdata *u) { if (USE_SCO_OVER_PCM(u)) { if (sco_over_pcm_state_update(u) 0) { - u-sink = NULL; - u-source = NULL; + char *k; + + if (u-sink) { + k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-sink); + pa_shared_remove(u-core, k); + pa_xfree(k); + u-sink = NULL; + } + if (u-source) { + k = pa_sprintf_malloc(bluetooth-device@%p, (void*) u-source); + pa_shared_remove(u-core, k); + pa_xfree(k); + u-source = NULL; + } return -1; } @@ -2421,9 +2461,25 @@ static int start_thread(struct userdata *u) { return 0; } +static void save_sco_volume_callbacks(struct userdata *u) { + pa_assert(u); + pa_assert(USE_SCO_OVER_PCM(u)); + + u-hsp.sco_sink_set_volume = u-hsp.sco_sink-set_volume; + u-hsp.sco_source_set_volume = u-hsp.sco_source-set_volume; +} + +static void restore_sco_volume_callbacks(struct userdata *u) { + pa_assert(u); + pa_assert(USE_SCO_OVER_PCM(u)); + + u-hsp.sco_sink-set_volume = u-hsp.sco_sink_set_volume; + u-hsp.sco_source-set_volume = u-hsp.sco_source_set_volume; +} + /* Run from main thread */ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) { - struct userdata *u; + struct userdata *u, *other_hsp_device; enum profile *d; pa_queue *inputs = NULL, *outputs = NULL; const pa_bluetooth_device *device; @@ -2439,6 +2495,9 @@ static int card_set_profile(pa_card *c, pa_card_profile *new_profile) { return -PA_ERR_IO; } + if (u-profile == PROFILE_HSP) + pa_shared_remove(u-core, CURRENT_HSP_DEVICE_KEY); + /* The state signal is sent by bluez, so it is racy to check strictly for CONNECTED, we should also accept STREAMING state as
Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions
Hi, On Fri, Mar 25, 2011 at 1:34 PM, Paul Menzel paulepan...@users.sourceforge.net wrote: Dear Arun, Am Samstag, den 19.03.2011, 16:14 +0530 schrieb Arun Raghavan: On Wed, 2011-02-23 at 01:07 +0530, Arun Raghavan wrote: [...] The correct fix for this, imo, is in bluez (there is a new sbc_primitives_armv6.h that can probably be used at least as a template). We need to do an sbc-udpate on the PA side anyway, and can pull this when we do. Could you see if the attached patch works for you? If it does, I can push this to the bluez folks. My tag on the other thread [1] is ambiguous. The error is indeed caused by your patch. I will try to implement your recommended changes but will probably not get to it before Sunday. Im including Siarhei Siamashka since he did most, if not all, of this code and linux-bluetooth to cc. Btw, the sbc subdir should be in sync with sbc subdir in BlueZ tree. -- Luiz Augusto von Dentz Computer Engineer diff --git a/src/modules/bluetooth/sbc/sbc_math.h b/src/modules/bluetooth/sbc/sbc_math.h index b87bc81..35d5dcc 100644 --- a/src/modules/bluetooth/sbc/sbc_math.h +++ b/src/modules/bluetooth/sbc/sbc_math.h @@ -23,6 +23,8 @@ * */ +#include sbc_primitives_armv6.h + #define fabs(x) ((x) 0 ? -(x) : (x)) /* C does not provide an explicit arithmetic shift right but this will always be correct and every compiler *should* generate optimal code */ @@ -47,7 +49,7 @@ typedef int32_t sbc_fixed_t; #define SBC_FIXED_0(val) { val = 0; } #define MUL(a, b)((a) * (b)) -#ifdef __arm__ +#ifdef SBC_HAVE_THUMB2 #define MULA(a, b, res) ({\ int tmp = res; \ __asm__(\ diff --git a/src/modules/bluetooth/sbc/sbc_primitives_armv6.h b/src/modules/bluetooth/sbc/sbc_primitives_armv6.h index 1862aed..e70469a 100644 --- a/src/modules/bluetooth/sbc/sbc_primitives_armv6.h +++ b/src/modules/bluetooth/sbc/sbc_primitives_armv6.h @@ -38,6 +38,12 @@ #define SBC_HAVE_ARMV6 1 #endif +#if defined(__ARM_ARCH_6T2__ ) || defined(__ARM_ARCH_7__) || \ + defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7R__) || \ + defined(__ARM_ARCH_7M__) +#define SBC_HAVE_THUMB2 1 +#endif + #if !defined(SBC_HIGH_PRECISION) (SCALE_OUT_BITS == 15) \ defined(__GNUC__) defined(SBC_HAVE_ARMV6) \ defined(__ARM_EABI__) !defined(__thumb__) \ ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] Help with pulsaudio
Please reply to the list. 2011/3/28 Yousif, Amgad (UK) amgad.you...@baesystems.com: Hi Maarten, I already looked at the networking page very well and couldn't see how any section on that could help with what im trying to do!. I am trying to build a Ubuntu 10.10 server which I can remotely access from a windows machine. I am using a server called freeNX. The remote desktop works great except there is no sound on the remote session. I looked into this and found out that freeNX uses ESD to transfer sound through the session. But ESD has been replaced with pulsaudio on Ubuntu. I don't want to used ESD. I want to use Pulsaidio (as this is now used instead). If you want to install PulseAudio on Windows, see http://pulseaudio.org/wiki/WindowsSupport. Enable module-native-protocol-tcp with arguments that allow your Linux PC to connect. http://pulseaudio.org/wiki/Modules#module-native-protocol-unixtcp If you then set the PULSE_SERVER environment variable to the name/IP of your Windows PC, all applications should connect to that computer for playing sound. This is the most useful information I have on getting sound through freeNX, if you can help or have any idea how this could be achieved through pulsaudio please let me know. What should I do to play sound inside my NX session? http://www.nomachine.com/ar/view.php?ar_id=AR03D00355 How to enable ESD sound support on Linux distributions not shipping the Enlightened Sound Daemon http://www.nomachine.com/ar/view.php?ar_id=AR11E00491 If NX only has ESD, that means it is crappy and outdated. You can try to make it work without installing pulse on the windows box by using http://pulseaudio.org/wiki/Modules#module-esound-sink on the Linux side. Thanks again. Regards Amgad Yousif Maarten -Original Message- From: Maarten Bosmans [mailto:mkbosm...@gmail.com] Sent: 27 March 2011 19:54 To: General PulseAudio Discussion Cc: Daniel Mack; Yousif, Amgad (UK) Subject: Re: [pulseaudio-discuss] Help with pulsaudio *** WARNING *** This message has originated outside your organisation, either from an external partner or the Global Internet. Keep this in mind if you answer this message. 2011/3/27 Daniel Mack zon...@gmail.com: On Thu, Mar 24, 2011 at 6:39 PM, Yousif, Amgad (UK) amgad.you...@baesystems.com wrote: Hi I wanted some help with using pulsaudio to getting sound from a server machine to a client machine. Please let me know the best person to contact for this. This should help you: http://pulseaudio.org/wiki/NetworkSetup And feel free to ask questions on the list (or perhaps better: IRC) if there are still things unclear. Maarten This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] [PATCH] sbc_math.h: add explicit check for ARMv6 instructions
Dear BlueZ folks, Am Montag, den 28.03.2011, 18:41 +0300 schrieb Luiz Augusto von Dentz: On Fri, Mar 25, 2011 at 1:34 PM, Paul Menzel wrote: Am Samstag, den 19.03.2011, 16:14 +0530 schrieb Arun Raghavan: On Wed, 2011-02-23 at 01:07 +0530, Arun Raghavan wrote: [...] The correct fix for this, imo, is in bluez (there is a new sbc_primitives_armv6.h that can probably be used at least as a template). We need to do an sbc-udpate on the PA side anyway, and can pull this when we do. Could you see if the attached patch works for you? If it does, I can push this to the bluez folks. My tag on the other thread [1] is ambiguous. The error is indeed caused by your patch. I will try to implement your recommended changes but will probably not get to it before Sunday. Im including Siarhei Siamashka since he did most, if not all, of this code and linux-bluetooth to cc. to fix [1] I tried to add `#include sbc_tables.h` to `src/modules/bluetooth/sbc/sbc_primitives.h` diff --git a/src/modules/bluetooth/sbc/sbc_primitives.h b/src/modules/bluetooth/ index 3fec8d5..9544826 100644 --- a/src/modules/bluetooth/sbc/sbc_primitives.h +++ b/src/modules/bluetooth/sbc/sbc_primitives.h @@ -24,6 +24,8 @@ * */ +#include sbc_tables.h + #ifndef __SBC_PRIMITIVES_H #define __SBC_PRIMITIVES_H But this seems to result in a need for `sbc_math.h` which leads to a circular inclusion. […] In file included from modules/bluetooth/sbc/sbc_primitives.h:27:0, from modules/bluetooth/sbc/sbc_primitives_armv6.h:30, from modules/bluetooth/sbc/sbc_math.h:27, from modules/bluetooth/sbc/sbc.c:46: modules/bluetooth/sbc/sbc_tables.h:50:2: warning: implicit declaration of function 'ASR' [-Wimplicit-function-declaration] modules/bluetooth/sbc/sbc_tables.h:50:2: error: 'SCALE_SPROTO4_TBL' undeclared here (not in a function) modules/bluetooth/sbc/sbc_tables.h:58:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:58:2: error: (near initialization for 'sbc_proto_4_40m1[0]') modules/bluetooth/sbc/sbc_tables.h:58:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:58:2: error: (near initialization for 'sbc_proto_4_40m1[1]') modules/bluetooth/sbc/sbc_tables.h:58:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:58:2: error: (near initialization for 'sbc_proto_4_40m1[2]') modules/bluetooth/sbc/sbc_tables.h:58:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:58:2: error: (near initialization for 'sbc_proto_4_40m1[3]') modules/bluetooth/sbc/sbc_tables.h:59:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:59:2: error: (near initialization for 'sbc_proto_4_40m1[4]') modules/bluetooth/sbc/sbc_tables.h:59:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:59:2: error: (near initialization for 'sbc_proto_4_40m1[5]') modules/bluetooth/sbc/sbc_tables.h:59:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:59:2: error: (near initialization for 'sbc_proto_4_40m1[6]') modules/bluetooth/sbc/sbc_tables.h:59:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:59:2: error: (near initialization for 'sbc_proto_4_40m1[7]') modules/bluetooth/sbc/sbc_tables.h:60:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:60:2: error: (near initialization for 'sbc_proto_4_40m1[8]') modules/bluetooth/sbc/sbc_tables.h:60:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:60:2: error: (near initialization for 'sbc_proto_4_40m1[9]') modules/bluetooth/sbc/sbc_tables.h:60:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:60:2: error: (near initialization for 'sbc_proto_4_40m1[10]') modules/bluetooth/sbc/sbc_tables.h:60:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:60:2: error: (near initialization for 'sbc_proto_4_40m1[11]') modules/bluetooth/sbc/sbc_tables.h:61:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:61:2: error: (near initialization for 'sbc_proto_4_40m1[12]') modules/bluetooth/sbc/sbc_tables.h:61:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:61:2: error: (near initialization for 'sbc_proto_4_40m1[13]') modules/bluetooth/sbc/sbc_tables.h:61:2: error: initializer element is not constant modules/bluetooth/sbc/sbc_tables.h:61:2: error: (near
[pulseaudio-discuss] 2 sound devices, one mostly won't play, but works
Hello, group--I'm a newbie here. Running PCLOS with KDE 4.6.1. I recently decided that I wanted to be able to try out SKYPE, and I don't want to move cables around, so, since I had an old sound card, I plugged it in. Up til then, sound was on MOBO and worked fine. Now sound only comes out p/i card, except once for a minute, until I messed with the GUI PAVU, and now it's back to the p/i card again, only. I have tried sound output from an internet radio station and from an mp3 file on a CD. It was the CD that briefly produced output from the MOBO sound device. Here is what the system says about the cards: (Trident is p/i; SiS is on MOBO) [doug@(none) ~]$ cat /proc/asound/cards 0 [TRID4DWAVENX ]: TRID4DWAVENX - Trident TRID4DWAVENX Trident TRID4DWAVENX PCI Audio at 0xdc00, irq 17 1 [SI7012 ]: ICH - SiS SI7012 SiS SI7012 with ALC655 at irq 18 I went as far as I could with the instructions in The Perfect Setup--I'm in group 2, and I edited /etc/group to eliminate everything and then added pulse. At this point I got a little confused, coming to Third Party Applications and ALSA Applications: my asound.conf is not in /etc but in /usr/share/xbmc/system. So far I have not messed with that. After that, I got even more perplexed: what do I do (if anything) with the virtual ALSA device pulse? (I find /etc/pulse and /etc/sound/profiles/pulse.) What do I do with % aplay and % amixer? And in which file? Further down, If you want to make PulseAudio driver the default, use something like this in the ALSA configuration files: Well, I don't know if I want to make the PulseAudio driver the default; I don't know what that would do for me or to me. And if I did, just what are the ALSA configuration files? Then if I should do this, where would I put the load-module module-alsa-sink device-hw:0? One other thing: To the far right of each port is a green ball with a white checkmark. It cannot be unchecked or modified, so I don't know what it's supposed to do. The plug-in card shows up as the lower port, even tho it appears first on the list above, and has a lower IRQ. Sorry to be such a dunce, but I'm afraid I have exhausted my resources. All help and advice gratefully appreciated. --doug -- Blessed are the peacemakers...for they shall be shot at from both sides. --A. M. Greeley ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] 2 sound devices, one mostly won't play, but works
On 03/29/2011 12:52 PM, Doug wrote: Hello, group--I'm a newbie here. Running PCLOS with KDE 4.6.1. I recently decided that I wanted to be able to try out SKYPE, and I don't want to move cables around, so, since I had an old sound card, I plugged it in. Up til then, sound was on MOBO and worked fine. Now sound only comes out p/i card, except once for a minute, until I messed with the GUI PAVU, and now it's back to the p/i card again, only. I have tried sound output from an internet radio station and from an mp3 file on a CD. It was the CD that briefly produced output from the MOBO sound device. Here is what the system says about the cards: (Trident is p/i; SiS is on MOBO) [doug@(none) ~]$ cat /proc/asound/cards 0 [TRID4DWAVENX ]: TRID4DWAVENX - Trident TRID4DWAVENX Trident TRID4DWAVENX PCI Audio at 0xdc00, irq 17 1 [SI7012 ]: ICH - SiS SI7012 SiS SI7012 with ALC655 at irq 18 I went as far as I could with the instructions in The Perfect Setup--I'm in group 2, and I edited /etc/group to eliminate everything and then added pulse. At this point I got a little confused, coming to Third Party Applications and ALSA Applications: my asound.conf is not in /etc but in /usr/share/xbmc/system. So far I have not messed with that. After that, I got even more perplexed: what do I do (if anything) with the virtual ALSA device pulse? (I find /etc/pulse and /etc/sound/profiles/pulse.) What do I do with % aplay and % amixer? And in which file? Further down, If you want to make PulseAudio driver the default, use something like this in the ALSA configuration files: Well, I don't know if I want to make the PulseAudio driver the default; I don't know what that would do for me or to me. And if I did, just what are the ALSA configuration files? Then if I should do this, where would I put the load-module module-alsa-sink device-hw:0? One other thing: To the far right of each port is a green ball with a white checkmark. It cannot be unchecked or modified, so I don't know what it's supposed to do. The plug-in card shows up as the lower port, even tho it appears first on the list above, and has a lower IRQ. Sorry to be such a dunce, but I'm afraid I have exhausted my resources. All help and advice gratefully appreciated. You can change the order of the cards in the asoundrc or set the default card in the sound preferences (pavuctl) to be the onboard device. Cheers. --doug -- Patrick Shirkey Boost Hardware Ltd. ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] 2 sound devices, one mostly won't play, but works
On 03/28/2011 11:09 PM, Patrick Shirkey wrote: On 03/29/2011 12:52 PM, Doug wrote: Hello, group--I'm a newbie here. Running PCLOS with KDE 4.6.1. I recently decided that I wanted to be able to try out SKYPE, and I don't want to move cables around, so, since I had an old sound card, I plugged it in. Up til then, sound was on MOBO and worked fine. Now sound only comes out p/i card, except once for a minute, until I messed with the GUI PAVU, and now it's back to the p/i card again, only. I have tried sound output from an internet radio station and from an mp3 file on a CD. It was the CD that briefly produced output from the MOBO sound device. Here is what the system says about the cards: (Trident is p/i; SiS is on MOBO) [doug@(none) ~]$ cat /proc/asound/cards 0 [TRID4DWAVENX ]: TRID4DWAVENX - Trident TRID4DWAVENX Trident TRID4DWAVENX PCI Audio at 0xdc00, irq 17 1 [SI7012 ]: ICH - SiS SI7012 SiS SI7012 with ALC655 at irq 18 I went as far as I could with the instructions in The Perfect Setup--I'm in group 2, and I edited /etc/group to eliminate everything and then added pulse. At this point I got a little confused, coming to Third Party Applications and ALSA Applications: my asound.conf is not in /etc but in /usr/share/xbmc/system. So far I have not messed with that. After that, I got even more perplexed: what do I do (if anything) with the virtual ALSA device pulse? (I find /etc/pulse and /etc/sound/profiles/pulse.) What do I do with % aplay and % amixer? And in which file? Further down, If you want to make PulseAudio driver the default, use something like this in the ALSA configuration files: Well, I don't know if I want to make the PulseAudio driver the default; I don't know what that would do for me or to me. And if I did, just what are the ALSA configuration files? Then if I should do this, where would I put the load-module module-alsa-sink device-hw:0? One other thing: To the far right of each port is a green ball with a white checkmark. It cannot be unchecked or modified, so I don't know what it's supposed to do. The plug-in card shows up as the lower port, even tho it appears first on the list above, and has a lower IRQ. Sorry to be such a dunce, but I'm afraid I have exhausted my resources. All help and advice gratefully appreciated. You can change the order of the cards in the asoundrc or set the default card in the sound preferences (pavuctl) to be the onboard device. (I didn't snip out the old material, in case someone else comes in late and wants to know what's going on.) I don't have asoundrc. It's not loaded, and it doesn't exist in the Synaptic package manager. I have tried every combination I could think of in pavuctl. I'm using the gui, because when I opened the program in the Konsole, it produced a graphic image that looks identical to the gui I get off the KDE screen. There is nothing that says default and once in a while the green check box, if you hover over it, will say something like set preference or something like that, but snapping on the one for the port I want to listen to does nothing. The only way I get any kind of sound out of the top port is when I move the volume sliders, and the speakers go bong every time I do it. It seems to me that it would be giving up if I have to build or buy a switch box, and just pull the second card out, assuming that would let the MOBO sound work once again. So what now? --doug -- Blessed are the peacemakers...for they shall be shot at from both sides. --A. M. Greeley ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] 2 sound devices, one mostly won't play, but works
On 03/29/2011 01:26 AM, Doug wrote: /snip/ The only way I get any kind of sound out of the top port is when I move the volume sliders, and the speakers go bong every time I do it. /snip/ I have to modify the above statement a little. I get sound out of the top port speakers--the bong sound when I move the sliders on the _bottom_ port, and I get the bong sound out of the headphones on the bottom port when I move the sliders on the _top_ port. I don't know if this helps anybody, but I just realized it. --doug - Blessed are the peacemakers...for they shall be shot at from both sides. --A. M. Greeley ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] 2 sound devices, one mostly won't play, but works
On 03/29/2011 01:26 AM, Doug wrote: Here I am again: Now the top sliders control the volume on the bottom port. I don't know shat I did. I still can't get any sound out of the speaker connected to the top port, but I can get the bonging noise on the headphones of the second port. Actually, with all this confusion, I really don't know which port is connected to what, since now the top port seems to be connected to the headphones, Do you know if anyone using PCLOS has ever gotten this thing to work? --doug -- Blessed are the peacemakers...for they shall be shot at from both sides. --A. M. Greeley ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss