Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • KMix KMix
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Multimedia
  • KMixKMix
  • Merge requests
  • !12

Open
Created Dec 13, 2021 by Alex Hermann@alexhe
  • Report abuse
Report abuse

alsa: Register the card ID instead of the name

  • Overview 3
  • Commits 2
  • Pipelines 2
  • Changes 2

In ALSA, only the ID is guaranteed to be unique. The name can be duplicated, expecially whe using multiple (nearly) identical cards.

There is a hint of handling duplicate card names in the registerCard() function, but this code is flawed on multiple aspects:

  1. The "discriminator" counter (s_mixerNums[cardBaseName]) is never incremented, so it will always return 0.
  2. The class in which the counter is stored, is instantiated for every card separately, so the discrimination will never be possible across multiple cards.

To circumvent, implement getId() and return the ALSA ID. This will create DBUS names based on the ID, so selecting the right card is now possible.

Because the GUI requirers unique names, the ID is also added to the name.

Fixes BKO#340502

Edited Dec 13, 2021 by Alex Hermann
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: bug340502