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

Poor Interaction with Pulseaudio #2

Open
ewhac opened this issue Sep 30, 2013 · 1 comment
Open

Poor Interaction with Pulseaudio #2

ewhac opened this issue Sep 30, 2013 · 1 comment

Comments

@ewhac
Copy link

ewhac commented Sep 30, 2013

alsa.lua invokes 'amixer' with the argument '-c0', presumably to try and select the default sound device. Apart from the fact this should probably be configurable, it doesn't interact well with the way Pulseaudio muscles in to the ALSA framework.

On my system, the Pulseaudio server is the default device, but has no card number. Card number 0 gets mapped to my system's actual hardware.

Here's the output from various alsa commands on my system. Note how Pulseaudio doesn't show up as a card, but does show up as a device:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: CMI8788 [C-Media CMI8788], device 0: Multichannel [Multichannel]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: CMI8788 [C-Media CMI8788], device 1: Digital [Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
$ aplay -L
default
    Playback/recording through the PulseAudio sound server
sysdefault:CARD=CMI8788
    C-Media CMI8788, Multichannel
    Default Audio Device
front:CARD=CMI8788,DEV=0
    C-Media CMI8788, Multichannel
    Front speakers
surround40:CARD=CMI8788,DEV=0
    C-Media CMI8788, Multichannel
    4.0 Surround output to Front and Rear speakers
surround41:CARD=CMI8788,DEV=0
    C-Media CMI8788, Multichannel
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=CMI8788,DEV=0
    C-Media CMI8788, Multichannel
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=CMI8788,DEV=0
    C-Media CMI8788, Multichannel
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=CMI8788,DEV=0
    C-Media CMI8788, Multichannel
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=CMI8788,DEV=0
    C-Media CMI8788, Multichannel
    IEC958 (S/PDIF) Digital Audio Output

You might want to make the affected device configurable, either via -c (to select actual hardware), or via -D (to select devices, including the Pulseaudio virtual device).

@gorlowski
Copy link
Owner

Hi, I realize that this is an old issue. I hadn't updated this library in years, but I finally made some tweaks so it plays nicely with awesome v4.3. I just noticed your issue (7 years late :-o ). I added a use_pulse_audio configuration option to determine whether alsa or pulse audio is used when toggling mute state. I also made the alsa card number configurable. I added auto-discovery for the alsa card number and the presence/absence of pulse audio by default. If you still use awesome and like this libary then you might consider giving this a try. If you have additional suggestions for how the configuration should work, please let me know. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants