Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#814757: alsa-base: dmix/software mixing doesn't work

212 views
Skip to first unread message

Andoru

unread,
Feb 15, 2016, 12:20:03 AM2/15/16
to
Package: alsa-base
Version: 1.0.27+1
Severity: normal

So I've been trying to fix this problem for a while now, but I can't seem to set up ALSA in a way to enable multiple sound sources at once (2 or more apps/programs to use the soundcard simultaneously). Despite having a dmix entry in /etc/asound.conf, it still refuses to work the way I intend it to.
And speaking of which, here's how my asound.conf looked like:

_____________________________________________________________________________

    pcm.!default {
        type hw
        card PCH
    }

    ctl.!default {
        type hw
        card PCH
    }

    pcm.dsp {
        type plug
        slave.pcm "dmix"
    }

defaults.pcm.rate_converter "speexrate_medium"

____________________________________________________________________________

And here's what 'aplay -l' gives me:

____________________________________________________________________________

    **** List of PLAYBACK Hardware Devices ****
    card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
      Subdevices: 1/1
      Subdevice #0: subdevice #0
    card 1: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD Analog]
      Subdevices: 1/1
      Subdevice #0: subdevice #0

____________________________________________________________________________

As you probably guessed, I'm using an integrated soundcard (that's on a Intel B85 chipset), and I've set it to use the jack plug output instead of the HDMI one.

Another issue that I'm having is that the sounds/music/etc that are supposed to be outputted by Firefox, don't get played at all (like for example add-ons that notify me when I get an e-mail, or HTML5 audio and/or video players, or other such stuff). Curiously the flash player seems to be unaffected by this issue, probably because it's stand-alone to the browser itself.

Before attempting to submit this bug request, I tried asking for help on the alsa user mailing list (http://thread.gmane.org/gmane.linux.alsa.user/39409), and out of that I tried those asound.conf configurations:

#1:
____________________________________________________________________________
pcm.PCH {
  type asym
  playback.pcm {
    type plug
    slave {
          pcm {
            type dmix
            ipc_key 9175930
            ipc_key_add_uid true
            slave {
              pcm "hw:PCH"
            }
          }
      }
  }
  capture.pcm "hw:PCH"
}
____________________________________________________________________________


Which doesn't change anything, still can't use multiple sound sources, and the FF issue isn't fixed. 'aplay', however works, and plays files nicely. If I pass it the -Dplug:dmix parameter, it gives me an error (see below)

#2:
____________________________________________________________________________

defaults.pcm.card PCH
defaults.ctl.card PCH

____________________________________________________________________________

This one causes sound to no longer work, and none of the soundcards get listed at all, either in the mixer, or in 'aplay -l'


#3:

____________________________________________________________________________

pcm.!default { type plug slave.pcm "dmix" } ctl.!default { type hw card 1 }

_____________________________________________________________________________
Which again, unfortunately doesn't fix anything, but instead whether I use aplay stand-alone, or with '-Dplug:dmix', I get this same message:

ALSA lib pcm_dmix.c:1029:(snd_pcm_dmix_open) unable to open slave
aplay: main:722: audio open error: No such file or directory

Which leads me to think this might be a bug, as the package I got might be missing components. I apologise in advance in case this is actually not a bug, but rather a configuration issue. All I remember is that I didn't have this much trouble setting up dmix on any other previous PCs I owned.
Also, just in case someone might suggest a PulseAudio fix, I'm not using it. Just straight-up ALSA.


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4-1.dmz.1-liquorix-amd64 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages alsa-base depends on:
ii  dpkg  1.18.4
ii  kmod  22-1

alsa-base recommends no packages.

alsa-base suggests no packages.

-- no debconf information



Elimar Riesebieter

unread,
Feb 15, 2016, 4:30:04 PM2/15/16
to
* Andoru <aek...@gmail.com> [2016-02-15 07:09 +0200]:

> Package: alsa-base
> Version: 1.0.27+1
> Severity: normal
>
> So I've been trying to fix this problem for a while now, but I can't seem
> to set up ALSA in a way to enable multiple sound sources at once (2 or more
> apps/programs to use the soundcard simultaneously). Despite having a dmix
> entry in /etc/asound.conf, it still refuses to work the way I intend it to.

Sometimes pulseaudio is the cause.....

> And speaking of which, here's how my asound.conf looked like:
[...]

According to http://alsa.opensrc.org/DmixPlugin you don't need to
setup dmix for analogue output. Dmix is enabled by default for
soundcards which don't support hardware mixing. You still need to
set it up for digital outputs.

> And here's what 'aplay -l' gives me:
>
> ____________________________________________________________________________
>
> **** List of PLAYBACK Hardware Devices ****
> card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
> card 1: PCH [HDA Intel PCH], device 0: ALC887-VD Analog [ALC887-VD
> Analog]
> Subdevices: 1/1
> Subdevice #0: subdevice #0
>
> ____________________________________________________________________________
>
> As you probably guessed, I'm using an integrated soundcard (that's on a
> Intel B85 chipset), and I've set it to use the jack plug output instead of
> the HDMI one.

No need for a dmix setup.

> Another issue that I'm having is that the sounds/music/etc that are
> supposed to be outputted by Firefox, don't get played at all (like for
> example add-ons that notify me when I get an e-mail, or HTML5 audio and/or
> video players, or other such stuff). Curiously the flash player seems to be
> unaffected by this issue, probably because it's stand-alone to the browser
> itself.
>
> Before attempting to submit this bug request, I tried asking for help on
> the alsa user mailing list (
> http://thread.gmane.org/gmane.linux.alsa.user/39409),

A better source for help is us...@lists.debian.org as this was
discussed multiple times in the past.

> and out of that I tried those asound.conf configurations:

A good start is just to throw away all the asoud.conf and .asoundrc
stuff. It overconstrains your system. The latest alsa

ii alsa-base 1.0.27+1
ii alsa-utils 1.1.0-2
ii libasound2:amd64 1.1.0-1
ii libasound2-data 1.1.0-1
ii libasound2-plugins:amd64 1.1.0-1


is very tough and should do what you need.

Elimar
--
Obviously the human brain works like a computer.
Since there are no stupid computers humans can't be stupid.
There are just a few running with Windows or even CE ;-)

Andoru

unread,
Feb 15, 2016, 6:40:03 PM2/15/16
to
> Sometimes pulseaudio is the cause.....

$ apt-cache policy pulseaudio
pulseaudio:
  Installed: (none)
  Candidate: 7.1-2
  Version table:
     7.1-2 500
        500 http://ftp.debian.org/debian unstable/main amd64 Packages


> According to http://alsa.opensrc.org/DmixPlugin you don't need to setup dmix for analogue output. Dmix is enabled by default for soundcards which don't support hardware mixing. You still need to set it up for digital outputs.

If I don't set up dmix in the config file, it doesn't work either way.


> A better source for help is us...@lists.debian.org as this was discussed multiple times in the past.

Did they disable search engine indexing on those lists? I wasn't able to find much useful info for ALSA and this specific issue while searching. Also no posts over on those mailing lists turned up...

> A good start is just to throw away all the asoud.conf and .asoundrc stuff. It overconstrains your system. The latest alsa is very tough and should do what you need.

If I do that, I get no sound through the analog jack output. What probably happens is that the HDMI is used for sound output instead... Somebody at the ALSA user mailing list suggested me to use config #2 (from my first message in this bug report) just to set the default soundcard without setting dmix, but it didn't work...

Elimar Riesebieter

unread,
Feb 17, 2016, 5:50:03 PM2/17/16
to
* Andoru <aek...@gmail.com> [2016-02-16 01:27 +0200]:

> > Sometimes pulseaudio is the cause.....
>
> $ apt-cache policy pulseaudio
> pulseaudio:
> Installed: (none)
> Candidate: 7.1-2
> Version table:
> 7.1-2 500
> 500 http://ftp.debian.org/debian unstable/main amd64 Packages

What tells:

dpkg -l | egrep "(alsa|libaso)"
>
> > According to http://alsa.opensrc.org/DmixPlugin you don't need to setup
> > dmix for analogue output. Dmix is enabled by default for soundcards which
> > don't support hardware mixing. You still need to set it up for digital
> > outputs.
>
> If I don't set up dmix in the config file, it doesn't work either way.
>
> > A better source for help is us...@lists.debian.org as this was discussed
> > multiple times in the past.
>
> Did they disable search engine indexing on those lists? I wasn't able to
> find much useful info for ALSA and this specific issue while searching.
> Also no posts over on those mailing lists turned up...

Just ask on those lists ;-) And please ask your searchengine on how
to use emailin mailing lists and learnwhat an email thread is.

> > A good start is just to throw away all the asoud.conf and .asoundrc
> > stuff. It overconstrains your system. The latest alsa is very tough and
> > should do what you need.
>
> If I do that, I get no sound through the analog jack output. What probably
> happens is that the HDMI is used for sound output instead... Somebody at
> the ALSA user mailing list suggested me to use config #2 (from my first
> message in this bug report) just to set the default soundcard without
> setting dmix, but it didn't work...

Just do as user:

$ mv $HOME/.asoundrc $HOME/.asoundrc.save
$ cat <<EOF > $HOME/.asoundrc
defaults.pcm.!card PCH
defaults.ctl.!card PCH
EOF

As root:

# service alsa-utils restart

Elimar
--
Excellent day for drinking heavily.
Spike the office water cooler;-)

Andoru

unread,
Feb 17, 2016, 8:00:04 PM2/17/16
to
 
> > > Sometimes pulseaudio is the cause.....
> >
> > $ apt-cache policy pulseaudio
> > pulseaudio:
> >   Installed: (none)
> >   Candidate: 7.1-2
> >   Version table:
> >      7.1-2 500
> >         500 http://ftp.debian.org/debian unstable/main amd64 Packages
>
> What tells:
>
> dpkg -l | egrep "(alsa|libaso)"

$ dpkg -l | egrep "(alsa|libaso)"
ii  alsa-base                                                   1.0.27+1                               all          dummy package to ease purging of obsolete conffiles
ii  alsa-oss                                                    1.0.28-1                               amd64        ALSA wrapper for OSS applications
ii  alsa-tools                                                  1.1.0-1                                amd64        Console based ALSA utilities for specific hardware
ii  alsa-tools-gui                                              1.1.0-1                                amd64        GUI based ALSA utilities for specific hardware
ii  alsa-utils                                                  1.1.0-2                                amd64        Utilities for configuring and using ALSA
ii  alsamixergui                                                0.9.0rc2-1-9.1                         amd64        graphical soundcard mixer for ALSA soundcard driver
ii  gstreamer0.10-alsa:amd64                                    0.10.36-2                              amd64        GStreamer plugin for ALSA
ii  libalsaplayer0                                              0.99.81-1+b1                           amd64        alsaplayer plugin library
ii  libasound2:amd64                                            1.1.0-1                                amd64        shared library for ALSA applications
ii  libasound2:i386                                             1.1.0-1                                i386         shared library for ALSA applications
ii  libasound2-data                                             1.1.0-1                                all          Configuration files and profiles for ALSA drivers
ii  libasound2-dev:amd64                                        1.1.0-1                                amd64        shared library for ALSA applications -- development files
ii  libasound2-plugins:amd64                                    1.1.0-1                                amd64        ALSA library additional plugins



> >
> > Did they disable search engine indexing on those lists? I wasn't able to
> > find much useful info for ALSA and this specific issue while searching.
> > Also no posts over on those mailing lists turned up...
>
> Just ask on those lists ;-)

Would've done that, but I wouldn't have wanted to be shunned for asking an oft-asked question, since you said this issue was answered multiple times before.


> And please ask your searchengine on how
> to use emailin mailing lists and learnwhat an email thread is.

Exactly how do you think I got to post on alsa's bug report and alsa-user mailing lists?
I asked a completely different question by the way.

> > If I do that, I get no sound through the analog jack output. What probably
> > happens is that the HDMI is used for sound output instead... Somebody at
> > the ALSA user mailing list suggested me to use config #2 (from my first
> > message in this bug report) just to set the default soundcard without
> > setting dmix, but it didn't work...
>
> Just do as user:
>
> $ mv $HOME/.asoundrc $HOME/.asoundrc.save

Don't have an ~/.asoundrc, so I'll assume I have to do that to /etc/asound.conf

> $ cat <<EOF > $HOME/.asoundrc
> defaults.pcm.!card PCH
> defaults.ctl.!card PCH
> EOF

That's exactly the same as configuartion #2 that I've tried, and which didn't work... Read my initial message in this bug report, please.
But I gave it a spin this time again, in case I messed up something last time (and I did, just not with ALSA).

>
> As root:
>
> # service alsa-utils restart

That gives me:
Failed to restart alsa-utils.service: Unit alsa-utils.service is masked.

So I used this instead:

# /etc/init.d/alsa-utils restart

Which unfortunately didn't seem to change anything, so probably the command I issued didn't work.
But after restarting, the sound was the same, but I found out what was causing all these issues:
In VLC I've set up a custom device for audio output instead of "Default", and that seemed to hold the sound blocked to one app. After changing it back to "Default", everything works as expected (multiple sound sources, browser add-ons sounds work, WebM/HTML5 players have sound)

This can be now closed as it's no longer a bug. The message about missing files led me to think that the ALSA package I got was broken, thus the bug report.

Elimar Riesebieter

unread,
Feb 18, 2016, 4:30:04 AM2/18/16
to
* Andoru <aek...@gmail.com> [2016-02-18 02:54 +0200]:

[...]
> This can be now closed as it's no longer a bug. The message about missing
> files led me to think that the ALSA package I got was broken, thus the bug
> report.

Closed hereby.

Elimar
--
355/113: Not the famous irrational number pi,
but an incredible simulation!
-unknown-
0 new messages