You are not logged in.

#1 2015-01-03 14:31:09

filigran
Member
Registered: 2010-03-27
Posts: 3

[SOLVED] Alsa issues. -Dplughw:0,3 not working, -Dhdmi does

Hi.

EDIT: Solved it. See next post.

First, a quick description of my problem:

Sound has been working fine before, but suddenly stopped without any change. I can play sounds using speaker-test -Dhdmi or -Dhdmi:CARD=NVidia,DEV=0 but then I get no dmix. To get dmix I have used the asoundrc from below, and using hw:0,3 as the slave pcm. Running speaker-test -Dplughw:0,3 has been working fine. Out of the blue it doesn't.

Two questions:
1. What could cause that behaviour? That -Dhdmi works, but -Dplughw:0,3 does not?
2. Can I use dmix on the hdmi PCM, or must it be a hw device?


The long description, for those who don't mind reading smile:

First some info:
My mobo is a Asus P5N7A-VM.

(15:00) $ uname -a
Linux mediasmurf 3.17.6-1-ARCH #1 SMP PREEMPT Sun Dec 7 23:43:32 UTC 2014 x86_64 GNU/Linux
~
(15:01) $ lspci | grep -i audio
00:08.0 Audio device: NVIDIA Corporation MCP79 High Definition Audio (rev b1)
~
(15:01) $ lsmod | grep '^snd' | column -t
snd_hda_codec_hdmi     49213   1
snd_hda_codec_realtek  67469   1
snd_hda_codec_generic  63126   1  snd_hda_codec_realtek
snd_hda_intel          26387   0
snd_hda_controller     26938   1  snd_hda_intel
snd_hda_codec          108536  5  snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
snd_hwdep              17244   1  snd_hda_codec
snd_pcm                88487   4  snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
snd_timer              26614   1  snd_pcm
snd                    73436   8  snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel

(15:01) $ pacman -Q alsa-utils alsa-plugins alsa-lib
alsa-utils 1.0.28-1
alsa-plugins 1.0.28-2
alsa-lib 1.0.28-1

(15:01) $ journalctl -b | grep -i sound
Jan 03 14:54:29 mediasmurf alsactl[248]: /usr/bin/alsactl: load_state:1729: No soundcards found...
Jan 03 14:54:30 mediasmurf kernel: sound hdaudioC0D0: autoconfig: line_outs=4 (0x14/0x15/0x16/0x17/0x0) type:line
Jan 03 14:54:30 mediasmurf kernel: sound hdaudioC0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
Jan 03 14:54:30 mediasmurf kernel: sound hdaudioC0D0:    hp_outs=1 (0x1b/0x0/0x0/0x0/0x0)
Jan 03 14:54:30 mediasmurf kernel: sound hdaudioC0D0:    mono: mono_out=0x0
Jan 03 14:54:30 mediasmurf kernel: sound hdaudioC0D0:    dig-out=0x11/0x1e
Jan 03 14:54:30 mediasmurf kernel: sound hdaudioC0D0:    inputs:
Jan 03 14:54:30 mediasmurf kernel: sound hdaudioC0D0:      Front Mic=0x19
Jan 03 14:54:30 mediasmurf kernel: sound hdaudioC0D0:      Rear Mic=0x18
Jan 03 14:54:30 mediasmurf kernel: sound hdaudioC0D0:      Line=0x1a
Jan 03 14:54:31 mediasmurf kernel: input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:08.0/sound/card0/hdaudioC0D0/input11
Jan 03 14:54:31 mediasmurf kernel: input: HDA NVidia Front Mic as /devices/pci0000:00/0000:00:08.0/sound/card0/input12
Jan 03 14:54:31 mediasmurf kernel: input: HDA NVidia Rear Mic as /devices/pci0000:00/0000:00:08.0/sound/card0/input13
Jan 03 14:54:31 mediasmurf kernel: input: HDA NVidia Line as /devices/pci0000:00/0000:00:08.0/sound/card0/input14
Jan 03 14:54:31 mediasmurf kernel: input: HDA NVidia Line Out Front as /devices/pci0000:00/0000:00:08.0/sound/card0/input15
Jan 03 14:54:31 mediasmurf kernel: input: HDA NVidia Line Out Surround as /devices/pci0000:00/0000:00:08.0/sound/card0/input16
Jan 03 14:54:31 mediasmurf kernel: input: HDA NVidia Line Out CLFE as /devices/pci0000:00/0000:00:08.0/sound/card0/input17
Jan 03 14:54:31 mediasmurf kernel: input: HDA NVidia Line Out Side as /devices/pci0000:00/0000:00:08.0/sound/card0/input18
Jan 03 14:54:31 mediasmurf kernel: input: HDA NVidia Front Headphone as /devices/pci0000:00/0000:00:08.0/sound/card0/input19
Jan 03 14:54:31 mediasmurf kernel: input: HDA NVidia HDMI/DP,pcm=3 Phantom as /devices/pci0000:00/0000:00:08.0/sound/card0/input20

(15:02) $ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
dmixer
    Dmixer
dmixer-remap
    Remapped dmixer
working
    This one works
sysdefault:CARD=NVidia
    HDA NVidia, ALC1200 Analog
    Default Audio Device
front:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    Front speakers
surround21:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=NVidia,DEV=0
    HDA NVidia, ALC1200 Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output

(15:02) $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: ALC1200 Analog [ALC1200 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 1: ALC1200 Digital [ALC1200 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

(15:02) $ cat .asoundrc
pcm.dmixer {
   type dmix
   ipc_key 1024
   ipc_key_add_uid false
   ipc_perm 0660
   slave {
      pcm "hw:0,3"
      rate 48000
      channels 6
      format S32_LE
      period_time 0
      period_size 1024
      buffer_time 0
      buffer_size 4096
   }
   hint {
      show on
      description "Dmixer"
  }
}
pcm.dmixer-remap {
    type route
    slave.pcm "dmixer"
    slave.channels 6
    hint {
        show on
        description "Remapped dmixer"
    }
    ttable {
        0.0 = 1 # front left
        1.1 = 1 # front right
        2.4 = 1 # center -> surround left
        3.5 = 1 # lfe -> surround right
        4.2 = 1 # surround left -> center
        5.3 = 1 # surround right -> lfe
    }
}
pcm.!default {
   type plug
   slave.pcm "dmixer-remap"
}
pcm.working {
    type plug
    slave.pcm "hdmi:CARD=NVidia,DEV=0"
    hint {
        show on
        description "This one works"
    }
}

Everything was working fine. I was watching a movie, the movie ended, and when I was starting another a minute later there was no audio. I started troubleshooting and found this:

speaker-test -Dplughw:0,3     -> no audio, and no error
speaker-test -Dhdmi     -> audio works
speaker-test -Dhdmi:CARD=NVidia,DEV=0     -> audio works
speaker-test -Ddmixer     -> no audio, and no error (since it uses hw:0,3, not so odd)
speaker-test -Ddmixer-remap    -> same thing as with dmixer.

This is what alsa-restore, alsa-store and alsa-state services say:

(15:11) $ systemctl status alsa-store alsa-restore alsa-state -l
● alsa-store.service - Store Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-store.service; static; vendor preset: disabled)
   Active: inactive (dead)

● alsa-restore.service - Restore Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static; vendor preset: disabled)
   Active: inactive (dead) since Sat 2015-01-03 14:54:29 CET; 17min ago
  Process: 248 ExecStart=/usr/bin/alsactl restore (code=exited, status=19)
 Main PID: 248 (code=exited, status=19)

Jan 03 14:54:29 mediasmurf alsactl[248]: /usr/bin/alsactl: load_state:1729: No soundcards found...

● alsa-state.service - Manage Sound Card State (restore and store)
   Loaded: loaded (/usr/lib/systemd/system/alsa-state.service; static; vendor preset: disabled)
   Active: inactive (dead)
Condition: start condition failed at Sat 2015-01-03 14:54:29 CET; 17min ago
           ConditionPathExists=/etc/alsa/state-daemon.conf was not met

A few errors from alsa and systemd, but are any related? I'm not even sure it hasn't been working even though those errors were present.

And why is the audio working with -Dhdmi?

Also removed /var/lib/alsa/asound.state and re-ran alsa-store, and have rebooted countless times. Even let the computer power down for ~8 hrs. No change.

I'm stumped. Could it be a hardware issue? But then, shouldn't -Dhdmi also fail?

Any help would be greatly appreciated!

Last edited by filigran (2015-01-03 14:48:06)

Offline

#2 2015-01-03 14:46:58

filigran
Member
Registered: 2010-03-27
Posts: 3

Re: [SOLVED] Alsa issues. -Dplughw:0,3 not working, -Dhdmi does

Figures. Right after posting I manage to solve it.

My own fault really. I should have read the wiki properly before removing /var/lib/alsa/asound.state. Apparently just removing it isn't enough. roll

Following this:
https://wiki.archlinux.org/index.php/Ad … d.state.29

So, creating the state-daemon.conf file, removing asound.state, rebooting, removing the state-daemon.conf file and then rebooting again, as per the wiki's instructions, and all is well. -Dplughw:0,3 produces sound again. I'm still not sure why, but atleast it works.

Hope this helps someone else (or myself in the future)!

Offline

Board footer

Powered by FluxBB