Re: [pulseaudio-discuss] [PATCH 04/25] printout pthread id number in pulseaudio log
On Sat, Aug 06, 2011 at 07:10:16PM +0800, Colin Guthrie wrote: 'Twas brillig, and Pierre-Louis Bossart at 05/08/11 16:24 did gyre and gimble: there're multiple pthreads in pulseuadio, which makes reading a bit confuse. this patch can print each pthread's id. Wouldn't it be easier to understand if the thread name was used? We typically rely on thread names to understand what goes on with ftrace/pytimechart, I would think this is similar here. I would rather see a log with alsa-sink rather than PID 6779, it'd also make log comparison and analysis easier. Yup I agree (in an ideal world we'd name the thread by sink index too... (i.e. alsa-sink 0) Hi Col, Do you think it's better to invoke pa_thread_new(alsa-sink 0, func, u) or adding another index after the plain name? (e.g. pa_thread_new(alsa-sink, index, func, u)) -- guanqun ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] [PATCH 04/25] printout pthread id number in pulseaudio log
'Twas brillig, and Lu Guanqun at 08/08/11 08:55 did gyre and gimble: On Sat, Aug 06, 2011 at 07:10:16PM +0800, Colin Guthrie wrote: 'Twas brillig, and Pierre-Louis Bossart at 05/08/11 16:24 did gyre and gimble: there're multiple pthreads in pulseuadio, which makes reading a bit confuse. this patch can print each pthread's id. Wouldn't it be easier to understand if the thread name was used? We typically rely on thread names to understand what goes on with ftrace/pytimechart, I would think this is similar here. I would rather see a log with alsa-sink rather than PID 6779, it'd also make log comparison and analysis easier. Yup I agree (in an ideal world we'd name the thread by sink index too... (i.e. alsa-sink 0) Hi Col, Do you think it's better to invoke pa_thread_new(alsa-sink 0, func, u) or adding another index after the plain name? (e.g. pa_thread_new(alsa-sink, index, func, u)) I've not looked at the code, but if we know the sink index by this stage (I'm not sure we do?) then yes that could be helpful. Pierre will probably know if this is practically useful tho'. I suppose in most cases testing and probing will be done with only one sink anyway so there is no doubt which one owns the thread :p 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@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] What can cause assertion '!s-thread_info.rewind_requested' failure in function pa_sink_render_into_full( ) of sink.c
Many thanks for your reminding, Tanu! It's an ALSA sink created for Bluetooth HSP profile. So it's thread function is same as that of an normal ALSA sink. and another would be requesting rewind from a wrong thread, which sounds quite likely in this case, since you're moving a stream. What would be a wrong thread? I'm moving the sink input in the main thread. Thanks Amanda ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] [Alsa-user] Pops/Crackles Messing up my audio...
- Original Message - 'Twas brillig, and Nasa at 07/08/11 21:26 did gyre and gimble: Hi, I was hoping I could get some help troubleshooting some audio quality issues I am running into. Specifically, I am getting a lot of *pops/crackles* when I play audio files. It shows up when I move from 2-channel to 4/5 channel audio (via pauvcontrol) - I am using a USB X-FI sound-card with the Meego IVI. I have tried changing the resample method (going from ffmpeg to high-quality) and setting tsched=0, neither making any noticeable difference. The only things I saw in /var/log/messages that seemed relevant was: messages:Aug 6 16:59:26 localhost pulseaudio[570]: alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write! messages:Aug 6 16:59:26 localhost pulseaudio[570]: alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_usb_audio'. Please report this issue to the ALSA developers. messages:Aug 6 16:59:26 localhost pulseaudio[570]: alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value min_avail. And this was spout out of dmesg [ 21.857184] ALSA sound/usb/mixer.c:2110: status interrupt: c0 00 [ 21.897058] ALSA sound/usb/mixer.c:2110: status interrupt: c0 00 [ 21.961062] ALSA sound/usb/mixer.c:2110: status interrupt: c0 00 I have already eliminated the speakers and the amp (played music from a different source and they sounded fine). Let me know what else I should post (I could record the sound, if that would be useful). Thanks in advance, While this could be an issue in the alsa driver itself, can I ask if you're applying any volume changes to your streams or sink? I personally am not, however, the meego project maybe. There are over 250 patches against the base pulseaudio package (9.22) of which some seem to have something to do with volume settings... 0249-bluetooth-Fix-HSP-volume-handling.patch 0248-bluetooth-restore-original-sco_-sink-src-set_volume-.patch 0247-bluetooth-fix-set_volume_cb-on-sco-over-pcm.patch 0240-volume-proxy-small-lib-to-allow-communicating-volume.patch 0224-pactl-Accept-more-volume-specification-formats.patch 0223-sink-input-Add-volume_writable-to-pa_sink_input.patch 0190-alsa-mixer-Refactoring-merge-element_mute_volume-ele.patch 0189-alsa-mixer-Implement-constant-volume.patch 0140-dbus-Always-accept-mono-volumes-when-setting-device-.patch 0133-volume-Add-Orc-based-optimised-volume-scaling.patch 0132-volume-Fix-sample-array-size-for-tests.patch 0131-volume-Make-tests-use-only-valid-volumes.patch 0130-alsa-mixer-Fix-a-git-am-cockup-in-b0f72311.patch 0129-volume-Add-a-PA_VOLUME_UI_MAX-define-for-the-recomme.patch 0124-introspect-Client-side-implementation-for-has_volume.patch 0118-Revert-Add-volume-ramping-feature-envelop-fix.patch 0117-Revert-Add-volume-ramping-feature-sink-input-modific.patch 0116-Revert-Add-volume-ramping-feature-sink-modification.patch 0114-Revert-core-volume-ramping-fix.patch 0107-virtual-sink-Add-a-modarg-for-forcing-flat-volume.patch 0106-virtual-sink-Add-a-modarg-for-enabling-volume-sharin.patch 0105-Implement-the-volume-sharing-feature.patch 0090-Allow-read-only-or-non-existing-sink-input-volume.patch 0042-core-Use-volume_change_safety_margin-when-rewinding-.patch 0022-volume-Trivial-cosmetics-remove-a-space.patch 0011-alsa-sink-take-base-volume-into-account-when-applyin.patch 0001-volume-Add-explicit-checks-for-ARMv6-instructions.patch 0001-fix-the-assumption-that-volume-is-always-positive.patch So can see all the patches and what's in them here: https://build.pub.meego.com/package/files?package=Pulseaudioproject=home%3Anasa (not that I'm expecting and/or requesting you do that -- I just put this here for reference) Nasa BTW: I will try your suggestion when I get home this evening. There could be a problem with optimized paths for software volume adjustments. You can disable these optimisations via a special environment var: PULSE_NO_SIMD=1 It's worth checking this to see if it's that area that's at fault. Col ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] [Alsa-user] Pops/Crackles Messing up my audio...
'Twas brillig, and Nasa at 08/08/11 14:04 did gyre and gimble: While this could be an issue in the alsa driver itself, can I ask if you're applying any volume changes to your streams or sink? I personally am not, however, the meego project maybe. There are over 250 patches against the base pulseaudio package (9.22) of which some seem to have something to do with volume settings... I actually meant just at run time, e.g. lowering the volume of the stream itself. Especially if e.g. the left channel is different from the right channel. BTW: I will try your suggestion when I get home this evening. Cool -- 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@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] What can cause assertion '!s-thread_info.rewind_requested' failure in function pa_sink_render_into_full( ) of sink.c
On Mon, 2011-08-08 at 16:56 +0800, Lin, Mengdong wrote: Many thanks for your reminding, Tanu! It's an ALSA sink created for Bluetooth HSP profile. So it's thread function is same as that of an normal ALSA sink. and another would be requesting rewind from a wrong thread, which sounds quite likely in this case, since you're moving a stream. What would be a wrong thread? I'm moving the sink input in the main thread. Any other thread than the BT alsa sink's IO thread. Rewind requests must be done from that sink's IO thread which the request concerns. -- Tanu ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] [PATCH 04/25] printout pthread id number in pulseaudio log
Do you think it's better to invoke pa_thread_new(alsa-sink 0, func, u) or adding another index after the plain name? (e.g. pa_thread_new(alsa-sink, index, func, u)) I've not looked at the code, but if we know the sink index by this stage (I'm not sure we do?) then yes that could be helpful. Pierre will probably know if this is practically useful tho'. I suppose in most cases testing and probing will be done with only one sink anyway so there is no doubt which one owns the thread :p I like the second option better. Ideally the index should match the sink index to that you can query with pactl which sink is really being used. The index in itself isn't terribly useful if it depends on the configuration/profiles. ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] Pulseaudio A2DP audio delay problem
Hi Luiz, Which relevant logs can I provide you? Sorry but so far I'm completely unexperienced with pulseaudio. -- Robert 2011/8/9 Luiz Augusto von Dentz luiz.de...@gmail.com: Hi, On Sun, Aug 7, 2011 at 1:24 AM, orsch...@googlemail.com wrote: Any hints or suggestions? Any information I can provide to solve this problem? 2011/8/6 orsch...@gmail.com: Hi guys, I'm running default Pulseaudio on a Linux Mint 11 64bit system. Based on this I try to get my bluetooth Headset P311 working with A2DP. But whenever I do so my audio replay is lacking or even not responding after the headset remains idle for approx. 1 or 2 minutes. With HSP/HFP I'm expecting no such problems, neither with my internal laptop speakers. Can you help me out in any ways? I could be that it is auto suspend suspending, due to be idle, and when it resumes it breaks for some reason, but without any logs it hard to say exactly what is the problem. -- Luiz Augusto von Dentz ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
Re: [pulseaudio-discuss] [PATCH] update process_usec before enter sleep
2011/8/5 Pierre-Louis Bossart pierre-louis.boss...@linux.intel.com during mmap_write(), there's chance to increase/decrease watermark. So before sleep, the actural sleep time should based on latest watermark. [snip] @@ -787,6 +787,7 @@ static int unix_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle Change makes sense, but this should be done both for unix_write and mmap_write for consistency. And while I am at it for alsa-source as well, we should keep the same algorithm across all cases. Thanks your review, Pierre. And Sorry for late reply, i was fighting for some bugs. Please find attached update patch based on your suggestions, which should fulfill the requirement. :-) --xingchao -Pierre ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss From ebf3da22d535536b98aea705933bd1c3f318fc3f Mon Sep 17 00:00:00 2001 From: xingchao xingchao.w...@intel.com Date: Tue, 9 Aug 2011 10:14:40 -0400 Subject: [PATCH] update process_usec before enter sleep during check_left_to_play/record(), there's chance to increase/decrease watermark. So before sleep, the actural sleep time should based on latest watermark. Signed-off-by: xingchao xingchao.w...@intel.com --- src/modules/alsa/alsa-sink.c |2 ++ src/modules/alsa/alsa-source.c |2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/modules/alsa/alsa-sink.c b/src/modules/alsa/alsa-sink.c index dd2546c..d2d2b40 100644 --- a/src/modules/alsa/alsa-sink.c +++ b/src/modules/alsa/alsa-sink.c @@ -647,6 +647,7 @@ static int mmap_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle if (u-use_tsched) { *sleep_usec = pa_bytes_to_usec(left_to_play, u-sink-sample_spec); + process_usec = pa_bytes_to_usec(u-tsched_watermark, u-sink-sample_spec); if (*sleep_usec process_usec) *sleep_usec -= process_usec; @@ -787,6 +788,7 @@ static int unix_write(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polle if (u-use_tsched) { *sleep_usec = pa_bytes_to_usec(left_to_play, u-sink-sample_spec); + process_usec = pa_bytes_to_usec(u-tsched_watermark, u-sink-sample_spec); if (*sleep_usec process_usec) *sleep_usec -= process_usec; diff --git a/src/modules/alsa/alsa-source.c b/src/modules/alsa/alsa-source.c index ca3a913..60f5b5f 100644 --- a/src/modules/alsa/alsa-source.c +++ b/src/modules/alsa/alsa-source.c @@ -613,6 +613,7 @@ static int mmap_read(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polled if (u-use_tsched) { *sleep_usec = pa_bytes_to_usec(left_to_record, u-source-sample_spec); + process_usec = pa_bytes_to_usec(u-tsched_watermark, u-sink-sample_spec); if (*sleep_usec process_usec) *sleep_usec -= process_usec; @@ -742,6 +743,7 @@ static int unix_read(struct userdata *u, pa_usec_t *sleep_usec, pa_bool_t polled if (u-use_tsched) { *sleep_usec = pa_bytes_to_usec(left_to_record, u-source-sample_spec); + process_usec = pa_bytes_to_usec(u-tsched_watermark, u-sink-sample_spec); if (*sleep_usec process_usec) *sleep_usec -= process_usec; -- 1.7.1 ___ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss