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

AESinkALSA: fix enumeration of cards without front devices #15774

Merged
merged 1 commit into from
Mar 28, 2019

Conversation

HiassofT
Copy link
Contributor

@HiassofT HiassofT commented Mar 19, 2019

Description

ALSA cards don't have necessarily a front device, alsa-lib creates
a default (plus sysdefault) PCM using plughw for cards without an
alsa card conf file.

So we shouldn't skip the sysdefault PCM in enumeration, otherwise
the cards aren't listed.

For cards with front/surround PCMs the sysdefault entry should
be dropped though, as the surround mangling "@" entry also handles
sysdefault and the separate entry in the device list would be
confusing to users.

Motivation and Context

ALSA cards without a front device were missing in the list of audio devices, see #15757 for details

How Has This Been Tested?

Kodi master branch on Raspbian Stretch running on a Raspberry Pi 3B+ with 3 ALSA devices: on-board bcm2835 audio, Cirrus Logic Audio Card (with an ALSA card conf to create the iec958 PCM), USB audio device with TI/Burr Brown chip (stock alsa card conf creates front and surround PCMs).

aplay -L output: http://ix.io/1DWL
kodi log: http://ix.io/1DWM

LibreELEC master branch, using Kodi 18.1 with popcornmix's RPi patches and this PR and same ALSA setup as above

aplay -L output: http://ix.io/1DWO
kodi log http://ix.io/1DWV

As a comparison LibreELEC 9.0.1 without this PR shows the RPi-Cirrus Analog device missing in the list
kodi log: http://ix.io/1DWP

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

ping @fritsch

ALSA cards don't have necessarily a front device, alsa-lib creates
a default (plus sysdefault) PCM using plughw for cards without an
alsa card conf file.

So we shouldn't skip the sysdefault PCM in enumeration, otherwise
the cards aren't listed.

For cards with front/surround PCMs the sysdefault entry should
be dropped though, as the surround mangling "@" entry also handles
sysdefault and the separate entry in the device list would be
confusing to users.
@wsnipex wsnipex requested a review from fritsch March 23, 2019 07:54
@fritsch
Copy link
Member

fritsch commented Mar 27, 2019

@anssih is that okay with you?

@anssih
Copy link
Member

anssih commented Mar 27, 2019

Sorry for the delay. The solution is OK for me.

@fritsch
Copy link
Member

fritsch commented Mar 28, 2019

Thx very much!

@fritsch fritsch added v18 Leia Type: Fix non-breaking change which fixes an issue labels Mar 28, 2019
@fritsch fritsch merged commit c5a5942 into xbmc:master Mar 28, 2019
@fritsch
Copy link
Member

fritsch commented Mar 28, 2019

Thank you very much!

@Rechi Rechi added this to the Leia 18.2-rc1 milestone Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Fix non-breaking change which fixes an issue v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants