From ravikiranbelur at gmail.com Mon Jul 19 19:01:17 2021 From: ravikiranbelur at gmail.com (Ravikiran belur) Date: Tue, 20 Jul 2021 00:31:17 +0530 Subject: [pulseaudio-discuss] blocking call in pulse core mainloop context results in sink not getting data Message-ID: Hello, A module is using a blocking function in pa_hook_connect callback. So the blocking function runs in PA core mainloop context for 40ms to 90ms. This causes audio break/silence at the sink side, resulting in small noise on the speaker during playback. Can someone suggest a fix for this issue in module/pulseaudio? Regards, Ravikiran Belur -------------- next part -------------- An HTML attachment was scrubbed... URL: From ravikiranbelur at gmail.com Mon Jul 19 19:23:26 2021 From: ravikiranbelur at gmail.com (Ravikiran belur) Date: Tue, 20 Jul 2021 00:53:26 +0530 Subject: [pulseaudio-discuss] blocking call in pulse core mainloop context results in sink not getting data Message-ID: Hello, A module in pulseaudio is using a blocking function in pa_hook_connect callback. So the blocking function runs in PA core mainloop context for 40ms to 90ms. This causes audio break/silence at the sink side, resulting in small noise on the speaker during playback. Can someone suggest a fix for this issue in module/pulseaudio? Regards, Ravikiran -------------- next part -------------- An HTML attachment was scrubbed... URL: From arun at arunraghavan.net Mon Jul 19 22:57:55 2021 From: arun at arunraghavan.net (Arun Raghavan) Date: Mon, 19 Jul 2021 18:57:55 -0400 Subject: [pulseaudio-discuss] =?utf-8?q?blocking_call_in_pulse_core_mainl?= =?utf-8?q?oop_context_results_in_sink_not_getting_data?= In-Reply-To: References: Message-ID: <967157c7-c60d-4ace-8a04-813262abfbbd@www.fastmail.com> On Mon, 19 Jul 2021, at 3:23 PM, Ravikiran belur wrote: > Hello, > > A module in pulseaudio is using a blocking function in pa_hook_connect callback. > So the blocking function runs in PA core mainloop context for 40ms to 90ms. > > This causes audio break/silence at the sink side, resulting in small > noise on the speaker during playback. > > Can someone suggest a fix for this issue in module/pulseaudio? This is not unexpected. Data from PulseAudio clients arrives in the main thread, so blocking for that long is not good. The module should be performing the task that is taking so long asynchronously, or dispatching it to a separate thread. -- Arun From zhaochengyi at uniontech.com Tue Jul 27 03:18:19 2021 From: zhaochengyi at uniontech.com (Chengyi Zhao) Date: Tue, 27 Jul 2021 11:18:19 +0800 Subject: [pulseaudio-discuss] Why does PA need to rewrite and rewind when I change the volume while playing audio? Message-ID: +85C2BFD04545CBFC Hi guys, I found the following logic when I change the volume while playing audio.I guess there is some audio expertise here, would you please tell me the principle, thanks a lot! In the file sink-input.c(./src/pulsecore/sink-input.c), why does pa need to invoke the function pa_sink_input_request_rewind to rewrite and rewind the data? void pa_sink_input_set_volume(...) { ... pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_SOFT_VOLUME, NULL, 0, NULL) == 0); } ... } int pa_sink_input_process_msg(...) { ... switch (code) { case PA_SINK_INPUT_MESSAGE_SET_SOFT_VOLUME: if (!pa_cvolume_equal(&i->thread_info.soft_volume, &i->soft_volume)) { i->thread_info.soft_volume = i->soft_volume; pa_sink_input_request_rewind(i, 0, true, false, false); } return 0; ... } Best Regards, Chengyi From arun at arunraghavan.net Tue Jul 27 14:09:04 2021 From: arun at arunraghavan.net (Arun Raghavan) Date: Tue, 27 Jul 2021 10:09:04 -0400 Subject: [pulseaudio-discuss] =?utf-8?q?Why_does_PA_need_to_rewrite_and_r?= =?utf-8?q?ewind_when_I_change_the_volume_while_playing_audio=3F?= In-Reply-To: <+85C2BFD04545CBFC> References: <+85C2BFD04545CBFC> Message-ID: <635390d3-d0b0-48c8-8ea4-a056a7a2034e@www.fastmail.com> On Mon, 26 Jul 2021, at 11:18 PM, Chengyi Zhao wrote: > Hi guys, > > I found the following logic when I change the volume while playing > audio.I guess there is some audio expertise here, would you please tell > me the principle, thanks a lot! > > In the file sink-input.c(./src/pulsecore/sink-input.c), why does pa need > to invoke the function pa_sink_input_request_rewind to rewrite and > rewind the data? Because you might have a large buffer, and you want volume updates to be audible immediately. More details here: https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Rewinding/ -- Arun From arun at arunraghavan.net Tue Jul 27 20:27:21 2021 From: arun at arunraghavan.net (Arun Raghavan) Date: Tue, 27 Jul 2021 16:27:21 -0400 Subject: [pulseaudio-discuss] [ANNOUNCE] PulseAudio 15.0 Message-ID: Hi folks, I'm happy to announce that PulseAudio 15.0 is out! tarball: https://www.freedesktop.org/software/pulseaudio/releases/pulseaudio-15.0.tar.xz sha256: a40b887a3ba98cc26976eb11bdb6613988f145b19024d1b6555c6a03c9cba1a0 This is a big release, and you likely want to see the full release notes at https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/15.0/ Highlights * Lots of Bluetooth features (more A2DP codecs, native HFP support with mSBC for better audio quality, AVRCP Absolute Volume) * Card profiles can be made sticky, so (un)plugging does not reset state (helpful with HDMI replugging changing outputs, for examples) * New messaging API to allow easier extension of the core API * Virtual surround sink completely rewritten * Autotools dropped in favour of meson * Improved hardware support * ALSA path configuration can live in user home directory\ * Translation updates * Bug fixes and a lot more Package maintainers will want to check the relevant section of the release notes. Special thanks go out to everyone who spent a lot of time testing, troubleshooting, and reporting issues from git builds and release candidates. Finally, I'd also like to welcome Igor Kovalenko, Marijn Sujiten and Sanchayan Maity to the development team! Cheers, Arun