Bug 281176 - Kmix does not display skype input stream
Summary: Kmix does not display skype input stream
Status: RESOLVED FIXED
Alias: None
Product: kmix
Classification: Applications
Component: Backend: Pulseaudio (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Colin Guthrie
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-01 15:33 UTC by S. Burmeister
Modified: 2011-11-27 11:54 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
kmix capture tab when in a skype call (22.97 KB, image/png)
2011-10-26 20:16 UTC, Søren Holm
Details
pacmd output while in a skype call (17.69 KB, text/plain)
2011-10-26 20:17 UTC, Søren Holm
Details
My kmix console output (6.78 KB, application/octet-stream)
2011-11-12 08:58 UTC, Søren Holm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description S. Burmeister 2011-09-01 15:33:49 UTC
Kmix does not show skype's input stream during a call while pavucontrol does. It does work on another computer with the same skype package and micro.

The only difference I can think of is that where it works it's a 32bit system (and I think the pskype package for opensuse is 32bit as well) and the system where it does not work I run a 64bit system and the skype package is still 32bit because there is no other package from skype for opensuse.
Comment 1 S. Burmeister 2011-09-01 15:34:09 UTC
Sorry, forgot to mention. KDE 4.7.0.
Comment 2 Colin Guthrie 2011-09-01 15:43:41 UTC
This certainly shouldn't happen with KDE 4.7 as I believe the kmix bugs I did were fixed by then...

I can't remember off hand, but perhaps I only disabled profile saving and not profile loading. If that's the case can you check for kmix related files inside
~/.kde4/ (or ~/.kde/ on some setups)?

If you find any, just move them out the way. I suspect that if it's working on one machine and not another, then this is likely the problem.

There are some files in:
 ~/.kde4/share/config/
 and
 ~/.kde4/share/apps/kmix/profiles/

it's pretty safe to just kill all the files IMO, but you may want to move them other the way etc. for safety.


If that doesn't fix things, can you run kmix from the command line with KMIX_PULSEAUDIO_DEBUG=4 set? Also can you turn on kmix bugs via kdebug?
Comment 3 S. Burmeister 2011-09-02 09:42:11 UTC
Quit kmix, removed all kmix* files i.e. rc and ctrl plus the kmix folder in apps.

Started kmix afterwards and made a test call with skype, i.e. in pavucontrol an input stream shows up – not in kmix.

kmix(2702) Mixer::setGlobalMaster: ref_card= "PulseAudio::Wiedergabeger�te:1" , ref_control= "alsa_output.pci-0000_00_14.2.analog-stereo" , preferred= true
kmix(2702) Mixer::setGlobalMaster: Mixer::setGlobalMaster() card= "PulseAudio::Wiedergabeger�te:1"  control= "alsa_output.pci-0000_00_14.2.analog-stereo"
kmix(2702) Mixer::openIfValid: Mixer::open() detected master:  "alsa_output.pci-0000_00_14.2.analog-stereo"
kmix(2702) Mixer::openIfValid: Mixer::open() detected master:  "alsa_input.usb-046d_08ca_6123F1B2-02-U0x46d0x8ca.analog-mono"
kmix(2702) Mixer::getGlobalMasterMD: Mixer::masterCardDevice() returns 0 (no globalMaster)
kmix(2702) Mixer::setGlobalMaster: ref_card= "PulseAudio::Playback_Devices:1" , ref_control= "alsa_output.pci-0000_00_14.2.analog-stereo" , preferred= true
kmix(2702) Mixer::setGlobalMaster: Mixer::setGlobalMaster() card= "PulseAudio::Playback_Devices:1"  control= "alsa_output.pci-0000_00_14.2.analog-stereo"
kmix(2702) KMixWindow::recreateGUI: Using fallback GUI Profile for the mixer  "PulseAudio::Playback_Devices:1"
kmix(2702) ProfControl::setSubcontrols: setSubcontrols found:  .*
kmix(2702) GUIProfile::addProfile: I have added "PulseAudio.Playback_Devices.1.default" ; Number of profiles is now  1
kmix(2702) KMixWindow::recreateGUI: Using fallback GUI Profile for the mixer  "PulseAudio::Capture_Devices:1"
kmix(2702) ProfControl::setSubcontrols: setSubcontrols found:  .*
kmix(2702) GUIProfile::addProfile: I have added "PulseAudio.Capture_Devices.1.default" ; Number of profiles is now  2
kmix(2702) KMixWindow::recreateGUI: Using fallback GUI Profile for the mixer  "PulseAudio::Playback_Streams:1"
kmix(2702) ProfControl::setSubcontrols: setSubcontrols found:  .*
kmix(2702) GUIProfile::addProfile: I have added "PulseAudio.Playback_Streams.1.default" ; Number of profiles is now  3
kmix(2702) KMixWindow::recreateGUI: Using fallback GUI Profile for the mixer  "PulseAudio::Capture_Streams:1"
kmix(2702) ProfControl::setSubcontrols: setSubcontrols found:  .*
kmix(2702) GUIProfile::addProfile: I have added "PulseAudio.Capture_Streams.1.default" ; Number of profiles is now  4
kmix(2702) KMixDockWidget::KMixDockWidget: Construct the ViewDockAreaPopup and actions
kmix(2702) ProfControl::setSubcontrols: setSubcontrols found:  pvolume
kmix(2702) ProfControl::setSubcontrols: setSubcontrols found:  pswitch
kmix(2702) ProfControl::setSubcontrols: setSubcontrols found:  cswitch
rabauke@linux-ly0d:~> kmix(2702) KMixDockWidget::activate: Activate at  QPoint(1290,1159)
kmix(2702) KMixDockWidget::activate: Skip default KStatusNotifierItkdebem behavior
kmix(2702) KMixDockWidget::activate: cm is NOT visible => setAssociatedWidget(_referenceWidget)
kmix(2702) KMixDockWidget::activate: moving to QSize(118, 290) 1231 869
kmix(2702) ViewDockAreaPopup::showPanelSlot: Check when this is called

Test call started.

kmix(2702) source_output_cb: Source Output refers to a Source we don't have any info for :s 
kmix(2702): Hiddeous Channel mixup map says  1 , volume says:  2
Comment 4 S. Burmeister 2011-09-02 09:45:20 UTC
Oh btw. On the other computer I used pavucontrol to set the device for the input stream so it might be that kmix only works because pavucontrool did something for it.

I can try the same on this computer if it does hinder debugging what makes kmix fail.
Comment 5 S. Burmeister 2011-09-02 16:10:54 UTC
It's broken on the other computer as well.

Due to whatever the input stream was not bound to the webcams mic anymore, so I opened kmix and it did not show the input stream. I used pavucontrol to assign the webcam to the stream and kmix shows it after that.

So kmix is broken and only shows the input stream if it was already configured via pavucontrol.
Comment 6 Colin Guthrie 2011-09-03 08:06:20 UTC
Hmm, this is interesting. It seems the problem is that Skype's recording stream is not attached to a source that we know about (the log message says as much here: "Source Output refers to a Source we don't have any
info for :s"). The question is why?

As KMix should show all sources, with the exception of monitor sources, I can only presume that Skype was attached to a monitor source (which is kinda odd anyway) and thus didn't show up. Obviously this is kinda stupid as if it doesn't show up, you can't then fix it to record from a real mic.

But before I look too deeply, does this seem like a valid analysis?
Comment 7 Søren Holm 2011-10-25 21:12:48 UTC
I have the same problem. I only have an internal microphone. Do you have some steps to try to diagnose the problem?
Comment 8 Colin Guthrie 2011-10-26 13:04:58 UTC
When the sound is playing/recording a stream that does not show up in kmix, run "pacmd ls" and attach the output to this bug. A corresponding screenshot at the same time of the kmix window would be nice.
Comment 9 Søren Holm 2011-10-26 20:16:11 UTC
Created attachment 64909 [details]
kmix capture tab when in a skype call
Comment 10 Søren Holm 2011-10-26 20:17:13 UTC
Created attachment 64910 [details]
pacmd output while in a skype call
Comment 11 Søren Holm 2011-10-26 20:17:47 UTC
Thanks for the quick response. I have now attached pacmd-output and a screenshot of kmix.
Comment 12 Colin Guthrie 2011-10-28 08:31:55 UTC
@Søren

Do you see your mic listed in the "Capture enhada" tab?

Have you cleared out the files mentioned above (comment 2) from ~/.kde and are you using a recent version of kmix?
Comment 13 Søren Holm 2011-11-09 20:07:37 UTC
I see a capture-device. It's name is not "mic" or "Microphone" but instead "Internal Analog stereo"
Comment 14 Colin Guthrie 2011-11-09 20:25:28 UTC
@Søren

That is indeed your mic.

Now that this view has changed from your screenshot in comment 9, does the bug still occur?
Comment 15 Søren Holm 2011-11-09 21:37:07 UTC
I might have misunderstood you on this but the microphone is on the capture-
devices tab, but the skype capture stream does still not appear on the 
ceepture-streams tab.
Comment 16 Colin Guthrie 2011-11-09 22:24:34 UTC
Gah, sorry, I'm being thick... I was thinking your screen shot was of the second tab, not the fourth... silly me.

I wonder if you've actually got the same problem as S. Burmeister or just the same symptoms.

The error he got was:

kmix(2702) source_output_cb: Source Output refers to a Source we don't have any
info for :s 
kmix(2702): Hiddeous Channel mixup map says  1 , volume says:  2


And it's the first of those two messages that's the one I've been going through with you... but I wonder if it's actually the second one that's causing you issues.

Can you see those error messages on the console?
Comment 17 Søren Holm 2011-11-12 08:58:04 UTC
Created attachment 65541 [details]
My kmix console output
Comment 18 Søren Holm 2011-11-12 08:58:38 UTC
I attache the console output. I think it is better to give you the complete thing.
Comment 19 Colin Guthrie 2011-11-12 12:26:26 UTC
Thanks Søren. Would you be able to supply the same output (preferably running with LC_ALL=C exported such that it's in English for me!) but also include what happens when you make a call in Skype as this will highlight where the problem is.

Cheers.
Comment 20 Colin Guthrie 2011-11-12 12:42:20 UTC
Actually never mind, I can reproduce the problem here. I'll work on a fix.
Comment 21 Colin Guthrie 2011-11-12 14:32:48 UTC
*sigh* It seems it's all totally broken in current trunk anyway :(

No streams show up under playback or capture streams unless you have a stream playing when Kmix is started up, but even then kmix will then crash when that stream disappears.

In my git-svn clone I tried bisecting but it's found approximately 10 potentially bad commits (sadly none of them were compilable due to files that were not added, so it looks like I'll have to pick through manually and try and work it out.

:(

On the plus side, I think I know the problem and I actually have a (rather large) patch that fixes this bug (it adds support for per-capture stream volumes added in PulseAudio 1.0 - I thought I'd committed it already but it's still in my tree!) but until I can fix the new underlying problem, it isn't much use.


I can say that the problem was introduced in one of Christians commits on June 21st.
Comment 22 Colin Guthrie 2011-11-12 16:28:01 UTC
SVN commit 1263755 by cguthrie:

gui: Fix dynamic mixer drawing.

There was a problem in a previous refactor (r1242598) which lead to a
condition where empty mixers (which is usual case for PulseAudio's
'Playback' and 'Capture' streams mixers) then none of the mixer
pointers would be added ot the _mixers collection. As we have a
specific mixer supplied, we simply ensure that we always include
this mixer too. This restores the drawing of the streams.

CCBUG: 281176

 M  +6 -0      viewbase.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1263755
Comment 23 Colin Guthrie 2011-11-12 16:28:03 UTC
SVN commit 1263756 by cguthrie:

kmix: Add support for capture stream volumes introduced in PulseAudio 1.0

CCBUG: 281176

 M  +23 -4     mixer_pulse.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1263756
Comment 24 Colin Guthrie 2011-11-12 16:29:18 UTC
OK, this patch should fix this bug up I think. Feel free to reopen if there are still problems.
Comment 25 Søren Holm 2011-11-12 20:00:11 UTC
Sweet.

Can you point me to a repo and a commit that I should try to compile and run 
on my kde 4.7.3 to check?
Comment 26 Colin Guthrie 2011-11-12 20:46:50 UTC
(In reply to comment #25)
> Sweet.
> 
> Can you point me to a repo and a commit that I should try to compile and run 
> on my kde 4.7.3 to check?

I believe the second of the two commits above should apply fine on top of 4.7.3. The first one won't be needed there.
Comment 27 Søren Holm 2011-11-27 01:23:49 UTC
It applies and works great. Could you please commit it to the 4.7-branch to get it into KDE SC 4.7.4 ?
Comment 28 Colin Guthrie 2011-11-27 11:54:16 UTC
SVN commit 1266060 by cguthrie:

kmix: Add support for capture stream volumes introduced in PulseAudio 1.0

CCBUG: 281176

 M  +23 -4     mixer_pulse.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1266060
Comment 29 Colin Guthrie 2011-11-27 11:54:51 UTC
(In reply to comment #27)
> It applies and works great. Could you please commit it to the 4.7-branch to get
> it into KDE SC 4.7.4 ?

Ahh yes. Had this in mind to do this weekend but forgot... thanks for the reminder :)