Bug 420368

Summary: Microphone input ports not named correctly
Product: [Applications] systemsettings Reporter: Nowa Ammerlaan <nowa>
Component: kcm_pulseaudioAssignee: David Rosca <nowrep>
Status: RESOLVED FIXED    
Severity: normal CC: nowa, plasma-bugs-null
Priority: NOR    
Version First Reported In: 5.18.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screenshot of systemsettings
pavucontrol shows labels correctly
Nothing displayed if input is set to Line In

Description Nowa Ammerlaan 2020-04-21 08:52:14 UTC
Created attachment 127735 [details]
screenshot of systemsettings

SUMMARY

My PC audio card has three input ports (Rear Microphone, Front Microphone and Line In). However, systemsettings shows only 2, and they are labelled incorrectly. (See screenshot)

Pavucontrol does show all three. (see next screenshot)

Now this is where it gets interesting:
- If I set the input to 'Front microphone' in pavucontrol, Systemsettings will (incorrectly) tell me it is set to 'Rear microphone'
- If I set the input to 'Rear microphone' in pavucontrol, Systemsettings will (incorrectly) tell me it is set to 'Line In'
- If I set the input to 'Line In' in pavucontrol, Systemsettings will not show anything in that field. (see third screenshot)

It looks like the labels of the inputs are all displaced by 1 (which makes me think that it might be an array index problem).

The plasma volume control applet has the exact same behaviour. (it and systemsettings show the same (wrong) label for the set input).


For the output devices I have the 'Line Out' and the 'Headphones' ports. Pavucontol shows me a drop-down menu where I can select this, KDE systemsettings does not. (presumably because it automatically switches to headphones if it is plugged in, so a menu to manually select this would not be useful?)


My hunch is that the drop-down menu where you can select the input port tries to skip the 'Front microphone' entry similar to how it skips the 'Headphones' entry. Which works fine on my laptop, which has only 2 input ports (built in microphone, and the microphone jack) and thus has nothing to select, but somehow messes up the input port labels on my PC which has 3 input ports.


STEPS TO REPRODUCE
1. Have 3 input ports on computer
2. Start plasma
3. Open systemsettings and go the the audio section

OBSERVED RESULT

Labels of input ports are displaced by 1:
'Front Microphone' is displayed as 'Rear Microphone'
'Rear Microphone' is displayed as 'Line In'
'Line In' is not displayed

EXPECTED RESULT

Labels in selection drop down box are correct:
'Front Microphone' is displayed as 'Front Microphone'
'Rear Microphone' is displayed as 'Rear Microphone'
'Line In' is displayed as 'Line In'


SOFTWARE/OS VERSIONS
Linux: 5.6.5-gentoo
KDE Plasma Version: 5.18.4.1
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Comment 1 Nowa Ammerlaan 2020-04-21 08:52:48 UTC
Created attachment 127736 [details]
pavucontrol shows labels correctly
Comment 2 Nowa Ammerlaan 2020-04-21 08:53:10 UTC
Created attachment 127737 [details]
Nothing displayed if input is set to Line In
Comment 3 Nowa Ammerlaan 2020-06-10 18:20:44 UTC
Fixed after upgrade to 5.19.0