Hi all, I have been playing recently with mobile phone and pulseaudio. The goal is to be able to use HSP or A2DP with the computer. I choose for simplicity A2DP first. With my older phone it works pretty straight forward Connect the phone, set A2DP profile in pavucontrol. I had to tell pulseaudio source and sink the first time, but it then "remembered" the setup and now each time I connect it does this. So at the end it is possible to play music from the phone on the PC.
My only problem is that when connect or disconnect kmix is going crazy and abuses one of the CPUs.
Which would be the way to debug, track or fix this? Thimoty wanted to to get bluetooth support in TDE long time ago. I looked at the older kbluetooth code last year, but it looks like >50% rewrite is needed. I have the feeling that volume control also goes slowly in this category.
Has someone dealt with this, or had some investigation and most important, how can I make kmix recover if something changes on PA end
regards
On Tue, Feb 27, 2018 at 11:32 PM, deloptes deloptes@gmail.com wrote:
Hi all, I have been playing recently with mobile phone and pulseaudio. The goal is to be able to use HSP or A2DP with the computer. I choose for simplicity A2DP first. With my older phone it works pretty straight forward Connect the phone, set A2DP profile in pavucontrol. I had to tell pulseaudio source and sink the first time, but it then "remembered" the setup and now each time I connect it does this. So at the end it is possible to play music from the phone on the PC.
My only problem is that when connect or disconnect kmix is going crazy and abuses one of the CPUs.
what happens with alsamixer and alsamixergui? i suspect you have a loop on your hands where pulseaudio has taken control without your consent or knowledge of the ALSA devices.
pulseaudio may be interfering, i've had to kill pavucontrol, and pulseaudio, then *finally* the audio programs were able to wrestle control of /dev/snd/* away from pulseaudio, and things went to normal. restarted pavucontrol and it was fine.
i suspect this is *nothing to do with* tde, and everything to do with pulseaudio being a pile of shit.
l.
Luke Kenneth Casson Leighton wrote:
what happens with alsamixer and alsamixergui? i suspect you have a loop on your hands where pulseaudio has taken control without your consent or knowledge of the ALSA devices.
what do you mean? I installed pulse and let it take control. alsamixer works just fine. When alsamixer is invoked without argument, it shows pulseaudio as audiocard. When I run it with -c 0 it shows the audiocard as when pulse was not installed
pulseaudio may be interfering, i've had to kill pavucontrol, and pulseaudio, then finally the audio programs were able to wrestle control of /dev/snd/* away from pulseaudio, and things went to normal. restarted pavucontrol and it was fine.
when killing PA, kmix also goes at 100% CPU - need to quit kmix. When I press volume key kmix starts again
i suspect this is *nothing to do with* tde, and everything to do with pulseaudio being a pile of shit.
Well, I appreciate your opinion, but there must be a solution, so that kmix does not go 100% CPU. I am asking if someone has experience, or had a look already, otherwise I have to go through kmix code or who knows what else and write a patch.
regards
On Wed, Feb 28, 2018 at 7:08 AM, deloptes deloptes@gmail.com wrote:
Luke Kenneth Casson Leighton wrote:
what happens with alsamixer and alsamixergui? i suspect you have a loop on your hands where pulseaudio has taken control without your consent or knowledge of the ALSA devices.
what do you mean? I installed pulse and let it take control. alsamixer works just fine. When alsamixer is invoked without argument, it shows pulseaudio as audiocard.
... so pulseaudio is configured to "take over" ALSA, and to offer an alternative ALSA interface.
When I run it with -c 0 it shows the audiocard as when pulse was not installed
ok yes, so that tells us that pulseaudio is trying to "take over" ALSA, then offer a 2nd ALSA "gateway" interface.
when killing PA, kmix also goes at 100% CPU - need to quit kmix. When I press volume key kmix starts again
interesting.
Well, I appreciate your opinion,
... experience. pulseaudio is involved in most of the audio f***-ups i've been forced to deal with.
but there must be a solution, so that kmix does not go 100% CPU.
it's the first time i've ever heard of kmix doing that... but then i never ran it with pulseaudio.
what happens if you run it *without* pulseaudio? is it fine then?
also, have you ever installed jackd (and the jackd pulseaudio plugin). i now run with jackd->pulseaudio because i have a MIDI application that i occasionally run... but also it turns out that applications are a bit more stable going through jackd.
the advantage is that f****g pulseaudio gets the f*** off the damn ALSA interface (because it detects that jackd is running and managing it), and jackd does a hell of a lot better job of directing audio through to ALSA.
l.
Luke Kenneth Casson Leighton wrote:
what do you mean? I installed pulse and let it take control. alsamixer works just fine. When alsamixer is invoked without argument, it shows pulseaudio as audiocard.
... so pulseaudio is configured to "take over" ALSA, and to offer an alternative ALSA interface.
When I run it with -c 0 it shows the audiocard as when pulse was not installed
ok yes, so that tells us that pulseaudio is trying to "take over" ALSA, then offer a 2nd ALSA "gateway" interface.
yes it becomes a layer above alsa
when killing PA, kmix also goes at 100% CPU - need to quit kmix. When I press volume key kmix starts again
interesting.
Well, I appreciate your opinion,
... experience. pulseaudio is involved in most of the audio f***-ups i've been forced to deal with.
Yes, forsome time in the beggining there were issues and might be there are issues now as well, but there are many advantages, which make it inevitable evil. BT and ofono are just few examples.
but there must be a solution, so that kmix does not go 100% CPU.
it's the first time i've ever heard of kmix doing that... but then i never ran it with pulseaudio.
what happens if you run it without pulseaudio? is it fine then?
well I stated that problem occurs when something changes in pulse audio or pulseaudio is shut down. What do you expect if kmix runs without pulseaudio?!
also, have you ever installed jackd (and the jackd pulseaudio plugin). i now run with jackd->pulseaudio because i have a MIDI application that i occasionally run... but also it turns out that applications are a bit more stable going through jackd.
might be 10y+ since last time - as stated above I don't think it will fit (A2DP, HSP/HFP etc).
the advantage is that f****g pulseaudio gets the f*** off the damn ALSA interface (because it detects that jackd is running and managing it), and jackd does a hell of a lot better job of directing audio through to ALSA.
to me it sounds like hack a day or two task. I just want to have working BT, besides I can't avoid PA in other context, so it is pointless to try to eliminate PA.
I think kmix needs to be updated somehow to be able to interact properly with PA. I need to have a closer look at the code probably.
regards