Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Desktop: eww config refactor, mic volume widget #932

Merged
merged 1 commit into from
Jan 16, 2025

Conversation

kajusnau
Copy link
Contributor

@kajusnau kajusnau commented Dec 13, 2024

Description of Changes

  1. Added Volume Mixer Widget in the Taskbar Quick Settings (currently disabled):

    • The volume mixer is accessible by clicking the "settings" icon next to the System Volume slider.
    • It dynamically displays currently active sink inputs (audio streams) or remains empty if no sink inputs are active.
    • Each sink input can be individually controlled, offering the same core functionality as the System Volume slider, including volume adjustment, mute, and unmute.
    • Each sink input will show the associated app icon if available. If not available, it will fallback to the default speaker icon.
    • Tested only with Google Chrome browser audio playback.
  2. Added Microphone slider in the Taskbar Quick Settings:

    • Slider appears only when the default input device is in "RUNNING" state;
    • Slider has all the same functionality as the volume slider;
    • In addition to this slider, the button used to access the Quick Settings widget will also display a microphone icon when the default input device is in "RUNNING" state;
  3. Added audio input and output device names to Quick Settings widget

  4. Adjusted Desktop Widgets Styling

  5. Refactored Eww Config For Easier Maintenance

Known Issues:

  1. Volume mixer widget is currently disabled and not accessible due to missing backend functionality
  2. Quick Settings widget may become slow to open/close when microphone is in use

Checklist for things done

  • Summary of the proposed changes in the PR description
  • More detailed description in the commit message(s)
  • Commits are squashed into relevant entities - avoid a lot of minimal dev time commits in the PR
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • PR linked to architecture documentation and requirement(s) (ticket id)
  • Test procedure described (or includes tests). Select one or more:
    • Tested on Lenovo X1 x86_64
    • Tested on Jetson Orin NX or AGX aarch64
    • Tested on Polarfire riscv64
  • Author has run make-checks and it passes
  • All automatic Github Action checks pass - see actions
  • Author has added reviewers and removed PR draft status
  • Change requires full re-installation
  • Change can be updated with nixos-rebuild ... switch

Instructions for Testing

  • List all targets that this applies to:
  • Is this a new feature
    • List the test steps to verify:
      • Volume mixer functionality cannot and should not be tested, please focus on changes 2-6
      • Verify Volume and Microphone sliders work as intended and display the correct device name, depending on which one is in use
  • If it is an improvement how does it impact existing functionality?

@kajusnau kajusnau temporarily deployed to internal-build-workflow December 13, 2024 11:41 — with GitHub Actions Inactive
@kajusnau kajusnau self-assigned this Dec 13, 2024
@milva-unikie
Copy link

Tested this quickly on Lenovo-X1. Overall I think it looks great!

A few notes:

  • If GhafAudioControl is "hidden" by default, there should be a way for the user to control speakers and microphones in the volume mixer.
  • I agree that the amount of audio streams should be limited to one per vm before this volume mixer is taken into use. Now there is too many streams and no way for the user to know what controls what.
  • Scrolling the streams is quite awkward. Limiting the amount of streams might fix this.
  • All audio streams (Chrome browser, Slack, Teams, Zoom) are shown under the name of Google Chrome. As mentioned in Known issues this will be changed to be the name of the vm.

@kajusnau kajusnau force-pushed the volume-mixer-widget branch from 4bea169 to 5e9c15d Compare December 16, 2024 12:09
@kajusnau kajusnau temporarily deployed to internal-build-workflow December 16, 2024 12:09 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from 5e9c15d to cebb895 Compare December 17, 2024 14:28
@kajusnau kajusnau temporarily deployed to internal-build-workflow December 17, 2024 14:28 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from cebb895 to 4ec574c Compare December 18, 2024 10:22
@kajusnau kajusnau temporarily deployed to internal-build-workflow December 18, 2024 10:22 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from 4ec574c to 30a823a Compare December 18, 2024 15:01
@kajusnau kajusnau temporarily deployed to internal-build-workflow December 18, 2024 15:01 — with GitHub Actions Inactive
@kajusnau kajusnau changed the title WIP: Desktop: Volume mixer widget Desktop: Volume mixer widget, eww config refactor [WIP] Dec 18, 2024
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from 30a823a to e9602ac Compare December 20, 2024 14:11
@kajusnau kajusnau temporarily deployed to internal-build-workflow December 20, 2024 14:11 — with GitHub Actions Inactive
@kajusnau
Copy link
Contributor Author

20.12 Update:
Changed to use GhafAudioControl dbus service to fetch info about audio streams.
Known bugs:

  • Audio streams are not removed when closed (GhafAudioControl bug)

@kajusnau kajusnau force-pushed the volume-mixer-widget branch from e9602ac to 0f6738a Compare January 2, 2025 07:46
@kajusnau kajusnau temporarily deployed to internal-build-workflow January 2, 2025 07:46 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from 0f6738a to 1a05c5f Compare January 7, 2025 13:08
@kajusnau kajusnau temporarily deployed to internal-build-workflow January 7, 2025 13:08 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from 1a05c5f to 57674aa Compare January 9, 2025 14:53
@kajusnau kajusnau temporarily deployed to internal-build-workflow January 9, 2025 14:53 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from 57674aa to dc1e679 Compare January 10, 2025 12:28
@kajusnau kajusnau temporarily deployed to internal-build-workflow January 10, 2025 12:28 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from dc1e679 to 56e7832 Compare January 10, 2025 12:30
@kajusnau kajusnau temporarily deployed to internal-build-workflow January 10, 2025 12:30 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from 56e7832 to b012c7d Compare January 10, 2025 12:34
@kajusnau kajusnau temporarily deployed to internal-build-workflow January 10, 2025 12:34 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from b012c7d to f7e107f Compare January 10, 2025 14:14
@kajusnau kajusnau temporarily deployed to internal-build-workflow January 10, 2025 14:14 — with GitHub Actions Inactive
@kajusnau kajusnau changed the title Desktop: Volume mixer widget, eww config refactor [WIP] Desktop: Volume mixer widget (WIP), eww config refactor, mic volume widget Jan 10, 2025
@milva-unikie
Copy link

Tested again with Lenovo-X1

  • Speaker name is not shown for Bluetooth speaker.
  • Microphone name is shown as Built-in Microphone for Bluetooth microphone.
  • Charging icon is not shown when the laptop is charging. Instead the normal battery icon is shown. Quick settings menu still says "Charging".
  • Quick settings menu was sometimes very slow to open when microphone was active. I could not exactly figure out when this was happening, because other times it worked with no issue.

@kajusnau kajusnau force-pushed the volume-mixer-widget branch from f7e107f to 56271b7 Compare January 13, 2025 11:42
@kajusnau kajusnau temporarily deployed to internal-build-workflow January 13, 2025 11:42 — with GitHub Actions Inactive
@kajusnau kajusnau temporarily deployed to internal-build-workflow January 14, 2025 11:57 — with GitHub Actions Inactive
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from 549285b to f31c8a4 Compare January 14, 2025 12:01
@kajusnau kajusnau temporarily deployed to internal-build-workflow January 14, 2025 12:02 — with GitHub Actions Inactive
@kajusnau kajusnau changed the title Desktop: Volume mixer widget (WIP), eww config refactor, mic volume widget Desktop: eww config refactor, mic volume widget, volume mixer widget (WIP) Jan 14, 2025
@kajusnau kajusnau marked this pull request as ready for review January 14, 2025 12:06
@kajusnau kajusnau added the Needs Testing CI Team to pre-verify label Jan 14, 2025
@kajusnau kajusnau requested a review from humaidq-tii January 14, 2025 12:07
@milva-unikie
Copy link

Tested on Lenovo-X1 (nixos-rebuild switch)

Still a few issues I found, sorry.

Issues:

  • USB and Bluetooth microphones are shown as "Built-in microphone".
  • Microphone icon and microphone slider do not appear when USB microphone or Bluetooth microphone is activated.
  • The microphone is shown as active in taskbar if USB or Bluetooth headset is connected when logging in. If they are connected while logged in they are shown as active only when in use.
    • For USB headset the name of the microphone is empty in that case and for Bluetooth headset both speaker and microphone names are empty.
    • I confirmed this with two different USB headsets and two different Bluetooth headsets. The names are shown correctly in Audio Control for all of them.

Working:

  • Sliders work.
  • Charging icon works.
  • Integrated speaker/microphone and 3,5 mm headsets work with no issues.
  • Test-automation passes.

@milva-unikie milva-unikie added bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR and removed Needs Testing CI Team to pre-verify labels Jan 15, 2025
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from f31c8a4 to fda8028 Compare January 15, 2025 12:35
@kajusnau kajusnau temporarily deployed to internal-build-workflow January 15, 2025 12:35 — with GitHub Actions Inactive
@milva-unikie
Copy link

All the issues have been fixed!

@milva-unikie milva-unikie added Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon and removed bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR labels Jan 16, 2025
@vunnyso
Copy link
Contributor

vunnyso commented Jan 16, 2025

@kajusnau please rebase and remove WIP from title.

@kajusnau kajusnau changed the title Desktop: eww config refactor, mic volume widget, volume mixer widget (WIP) Desktop: eww config refactor, mic volume widget Jan 16, 2025
@ktusawrk
Copy link
Collaborator

ktusawrk commented Jan 16, 2025

Failed ghaf-pre-merge-pipeline build 301 is not related to this PR. There was a glitch in the pre-merge-pipeline itself. This failed build does not prevent merging this PR.

…(WIP)

- Added audio input and output device names to Quick Settings widget
- Added audio input device slider to Quick Settings widget
- Added volume mixer widget to Quick Settings widget (WIP)
- Refactored eww configuration

Signed-off-by: Kajus Naujokaitis <[email protected]>
@kajusnau kajusnau force-pushed the volume-mixer-widget branch from fda8028 to 7777091 Compare January 16, 2025 11:43
@kajusnau kajusnau temporarily deployed to internal-build-workflow January 16, 2025 11:43 — with GitHub Actions Inactive
@brianmcgillion brianmcgillion merged commit c0f8978 into tiiuae:main Jan 16, 2025
15 checks passed
@kajusnau kajusnau deleted the volume-mixer-widget branch February 11, 2025 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants