[pulseaudio-discuss] Are _ref and _unref not necessarily called in pairs?
For example, in file module-suspend-on-idle.c , why does the slot function sink_input_state_changed_hook_cb only reference the sink input but never unreference it? So the reference count of the sink input will only increase? Does it matter? Here is the code: static pa_hook_result_t sink_input_state_changed_hook_cb(pa_core *c, pa_sink_input *s, struct userdata *u) { struct device_info *d; pa_sink_input_state_t state; pa_assert(c); pa_sink_input_assert_ref(s); ... the sink input is referenced here. But where pa_sink_input_unref(s) is called? pa_assert(u); state = pa_sink_input_get_state(s); if (state == PA_SINK_INPUT_RUNNING || state == PA_SINK_INPUT_DRAINED) if ((d = pa_hashmap_get(u-device_infos, s-sink))) resume(d); return PA_HOOK_OK; } Thanks Amanda ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
[pulseaudio-discuss] Assertion '(size_t) decoded == a2dp-frame_length' failed at modules/bluetooth/module-bluetooth-device
Hi All, I am using pulse audio 0.9.21(Tried 0.9.22 also) on arm with bluez-4.89(Tried 4.93 also) but getting the following error. I am running pulseaudio in system mode as i am having only root user on my target. ~ # pulseaudio --system -n -F /etc/pulse/default.pa W: main.c: Couldn't canonicalize binary path, cannot self execute. W: main.c: Running in system mode, but --disallow-exit not set! W: main.c: Running in system mode, but --disallow-module-loading not set! N: main.c: Running in system mode, forcibly disabling SHM mode! N: main.c: Running in system mode, forcibly disabling exit idle time! W: main.c: Home directory of user 'root' is not '/home/mmes/op/var/run/pulse', ignoring. W: main.c: OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that. W: main.c: If you do it nonetheless then it's your own fault if things don't work as expected. W: main.c: Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an explanation why system mode is usually a bad idea. E: module-bluetooth-device.c: Assertion '(size_t) decoded == a2dp-frame_length' failed at modules/bluetooth/module-bluetooth-device.c:1375, function a2dp_process_push(). Aborting. Aborted ~ # Please let me know whether it works on on system mode or its bug in pulse audio for arm. Thanks Patil This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] Are _ref and _unref not necessarily called in pairs?
Hiya, As per the subject question... Yes, they are supposed to be called in pairs... BUT 'Twas brillig, and Lin, Mengdong at 12/05/11 09:31 did gyre and gimble: For example, in file “module-suspend-on-idle.c “, why does the slot function “sink_input_state_changed_hook_cb” only reference the sink input but never unreference it? So the reference count of the sink input will only increase? Does it matter? Here is the code: static pa_hook_result_t sink_input_state_changed_hook_cb(pa_core *c, pa_sink_input *s, struct userdata *u) { struct device_info *d; pa_sink_input_state_t state; pa_assert(c); pa_sink_input_assert_ref(s); … the sink input is referenced here. But where pa_sink_input_unref(s) is called? This is not the same as pa_sink_input_ref(). Note the word assert in the function call in the code above (it's actually a define, not a function but I won't split hairs with myself :D). Here all that is happening is ensuring that the sink_input object is referenced... The code is in pulsecore/object.h See lines 91, and 69. The code basically means assert if the object is not referenced. This is a safefy thing to ensure good programming of modules etc. Hope that clarifies things. 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] Assertion '(size_t) decoded == a2dp-frame_length' failed at modules/bluetooth/module-bluetooth-device
From: pulseaudio-discuss-boun...@mail.0pointer.de [mailto:pulseaudio-discuss-boun...@mail.0pointer.de] On Behalf Of h.pa...@accenture.com Sent: Thursday, May 12, 2011 8:41 AM To: pulseaudio-discuss@mail.0pointer.de Subject: [pulseaudio-discuss] Assertion '(size_t) decoded == a2dp-frame_length' failed at modules/bluetooth/module-bluetooth-device Hi All, I am using pulse audio 0.9.21(Tried 0.9.22 also) on arm with bluez-4.89(Tried 4.93 also) but getting the following error. I am running pulseaudio in system mode as i am having only root user on my target. ~ # pulseaudio --system -n -F /etc/pulse/default.pa W: main.c: Couldn't canonicalize binary path, cannot self execute. W: main.c: Running in system mode, but --disallow-exit not set! W: main.c: Running in system mode, but --disallow-module-loading not set! N: main.c: Running in system mode, forcibly disabling SHM mode! N: main.c: Running in system mode, forcibly disabling exit idle time! W: main.c: Home directory of user 'root' is not '/home/mmes/op/var/run/pulse', ignoring. W: main.c: OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that. W: main.c: If you do it nonetheless then it's your own fault if things don't work as expected. W: main.c: Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an explanation why system mode is usually a bad idea. E: module-bluetooth-device.c: Assertion '(size_t) decoded == a2dp-frame_length' failed at modules/bluetooth/module-bluetooth-device.c:1375, function a2dp_process_push(). Aborting. Aborted ~ # Please let me know whether it works on on system mode or its bug in pulse audio for arm. You should launch pulseaudio simply under user mode or root without the -system option. Pulseaudio runs on x86 and Arm. For A2DP, you are using an sbc interface which is very dependant on the target as assembly instructions are used. Are you sure you are running Pulseaudio optimized for an ARM target ? Thanks Patil This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. - Intel Corporation SAS (French simplified joint stock company) Registered headquarters: Les Montalets- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] Assertion '(size_t) decoded == a2dp-frame_length' failed at modules/bluetooth/module-bluetooth-device
Hello Becker, Thanks for the reply. I am getting the following error if I remove --system ~ # pulseaudio -n -F /etc/pulse/default.pa W: main.c: Couldn't canonicalize binary path, cannot self execute. W: main.c: This program is not intended to be run as root (unless --system is specified). W: main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.Spawn.ExecFailed: /bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed. Are you sure you are running Pulseaudio optimized for an ARM target? For ARM: I have cross compiled PulseAudio for arm. Is there any specific optimization needs to be done for PulseAudio for ARM? Is there any configuration needs to be done for PulseAudio for ARM? We are able to run pulseaudio and establish service connection for A2DP (BlueZ). Once the mobile phone starts streaming the audio, pulse audio encounters following error module-bluetooth-device.c: Received error condition: Input/output error For X86: We are able to Run the PulseAudio on Ubuntu (X86). Connect A2DP (BlueZ). Streaming of Audio from Mobile works fine. Regards, patil From: pulseaudio-discuss-boun...@mail.0pointer.de [mailto:pulseaudio-discuss-boun...@mail.0pointer.de] On Behalf Of Becker, VincentX Sent: Thursday, May 12, 2011 5:48 PM To: General PulseAudio Discussion Subject: Re: [pulseaudio-discuss] Assertion '(size_t) decoded == a2dp-frame_length' failed at modules/bluetooth/module-bluetooth-device From: pulseaudio-discuss-boun...@mail.0pointer.de [mailto:pulseaudio-discuss-boun...@mail.0pointer.de] On Behalf Of h.pa...@accenture.com Sent: Thursday, May 12, 2011 8:41 AM To: pulseaudio-discuss@mail.0pointer.de Subject: [pulseaudio-discuss] Assertion '(size_t) decoded == a2dp-frame_length' failed at modules/bluetooth/module-bluetooth-device Hi All, I am using pulse audio 0.9.21(Tried 0.9.22 also) on arm with bluez-4.89(Tried 4.93 also) but getting the following error. I am running pulseaudio in system mode as i am having only root user on my target. ~ # pulseaudio --system -n -F /etc/pulse/default.pa W: main.c: Couldn't canonicalize binary path, cannot self execute. W: main.c: Running in system mode, but --disallow-exit not set! W: main.c: Running in system mode, but --disallow-module-loading not set! N: main.c: Running in system mode, forcibly disabling SHM mode! N: main.c: Running in system mode, forcibly disabling exit idle time! W: main.c: Home directory of user 'root' is not '/home/mmes/op/var/run/pulse', ignoring. W: main.c: OK, so you are running PA in system mode. Please note that you most likely shouldn't be doing that. W: main.c: If you do it nonetheless then it's your own fault if things don't work as expected. W: main.c: Please read http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode for an explanation why system mode is usually a bad idea. E: module-bluetooth-device.c: Assertion '(size_t) decoded == a2dp-frame_length' failed at modules/bluetooth/module-bluetooth-device.c:1375, function a2dp_process_push(). Aborting. Aborted ~ # Please let me know whether it works on on system mode or its bug in pulse audio for arm. You should launch pulseaudio simply under user mode or root without the -system option. Pulseaudio runs on x86 and Arm. For A2DP, you are using an sbc interface which is very dependant on the target as assembly instructions are used. Are you sure you are running Pulseaudio optimized for an ARM target ? Thanks Patil This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. - Intel Corporation SAS (French simplified joint stock company) Registered headquarters: Les Montalets- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] Assertion '(size_t) decoded == a2dp-frame_length' failed at modules/bluetooth/module-bluetooth-device
Hiya 'Twas brillig, and h.pa...@accenture.com at 12/05/11 07:41 did gyre and gimble: I am using pulse audio 0.9.21(Tried 0.9.22 also) on arm with bluez-4.89(Tried 4.93 also) but getting the following error. I am running pulseaudio in system mode as i am having only root user on my target. I've a funny feeling this is perhaps fixed in git master. Please try that :) This previous thread seems relevant: http://thread.gmane.org/gmane.comp.audio.pulseaudio.general/8859 And these two commits might be the winners for you: commit b676f89d8579c7ec1629892342a330f1e4c35657 Author: Colin Guthrie cguth...@mandriva.org Date: Sun Mar 20 11:44:53 2011 + bluetooth: Run 'make update-sbc' Note that changes to ipc.h from 8f3ef04b had to be manually reapplied. commit 0bed5caf3b9fedfce2100cc85de344670ddbb386 Author: Paul Menzel paulepan...@users.sourceforge.net Date: Tue Mar 29 12:14:27 2011 +0200 bluetooth: run `make update-sbc` to pull in build fix for thumb mode This update pulls in commit c495077c [1] to fix a build error. commit c495077cf8a8c37afd90875ec5a5b16b294be15e Author: Siarhei Siamashka siarhei.siamas...@nokia.com Date: Tue Mar 29 01:57:39 2011 +0300 sbc: better compatibility with ARM thumb/thumb2 ARM assembly optimizations fail to compile in thumb mode, but are fine for thumb2. Update ifdefs in the code to make use of ARM assembly only when it is safe and also make sure that no optimizations are missed when compiling for thumb2. The problem was reported by Paul Menzel: https://tango.0pointer.de/pipermail/pulseaudio-discuss/2011-February/009022.html This patch is tested with OpenEmbedded using `minimal-uclibc` for `MACHINE = at91sam9260ek`. Note that changes to ipc.h from 8f3ef04b had to be manually reapplied. [1] http://git.kernel.org/?p=bluetooth/bluez.git;a=commit;h=c495077cf8a8c37afd90875ec5a5b16b294be15e PS, the disclaimer doesn't make any sense :D -- 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] Assertion '(size_t) decoded == a2dp-frame_length' failed at modules/bluetooth/module-bluetooth-device
-Original Message- From: pulseaudio-discuss-boun...@mail.0pointer.de [mailto:pulseaudio- discuss-boun...@mail.0pointer.de] On Behalf Of Daniel Mack Sent: Thursday, May 12, 2011 3:47 PM To: General PulseAudio Discussion Subject: Re: [pulseaudio-discuss] Assertion '(size_t) decoded == a2dp- frame_length' failed at modules/bluetooth/module-bluetooth-device On Thu, May 12, 2011 at 2:17 PM, Becker, VincentX vincentx.bec...@intel.com wrote: This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. If that is the case, nobody on this list will be able to help you. Your email is has already been distributed to many mailing list archives all around the world and will be reviewed by many others. It is yet impossible to delete all copies. Please stop adding such idiotic footers to emails when sending messages to public lists. I know Daniel, it is very inappropriate for an open-source public list but I can not remove it myself, it is added automatically by Intel's exchange server, otherwise I would have done it since long time ago. The funniest is that Intel is not particulary ahead in terms of mobile handsets. So you are in some way right : I will get and use for ex. a gmail address, like most of the PA forumers. Vincent ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss - Intel Corporation SAS (French simplified joint stock company) Registered headquarters: Les Montalets- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. ___ pulseaudio-discuss mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] Are _ref and _unref not necessarily called in pairs?
Thanks for your clarification, Col! -Original Message- From: pulseaudio-discuss-boun...@mail.0pointer.de [mailto:pulseaudio-discuss-boun...@mail.0pointer.de] On Behalf Of Colin Guthrie Sent: Thursday, May 12, 2011 5:06 PM To: pulseaudio-discuss@mail.0pointer.de Subject: Re: [pulseaudio-discuss] Are _ref and _unref not necessarily called in pairs? Hiya, As per the subject question... Yes, they are supposed to be called in pairs... BUT 'Twas brillig, and Lin, Mengdong at 12/05/11 09:31 did gyre and gimble: For example, in file “module-suspend-on-idle.c “, why does the slot function “sink_input_state_changed_hook_cb” only reference the sink input but never unreference it? So the reference count of the sink input will only increase? Does it matter? Here is the code: static pa_hook_result_t sink_input_state_changed_hook_cb(pa_core *c, pa_sink_input *s, struct userdata *u) { struct device_info *d; pa_sink_input_state_t state; pa_assert(c); pa_sink_input_assert_ref(s); … the sink input is referenced here. But where pa_sink_input_unref(s) is called? This is not the same as pa_sink_input_ref(). Note the word assert in the function call in the code above (it's actually a define, not a function but I won't split hairs with myself :D). Here all that is happening is ensuring that the sink_input object is referenced... The code is in pulsecore/object.h See lines 91, and 69. The code basically means assert if the object is not referenced. This is a safefy thing to ensure good programming of modules etc. Hope that clarifies things. 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 mailing list pulseaudio-discuss@mail.0pointer.de https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss