Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can ALSA config change permanently upon mplayer freezing?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sat Apr 20, 2013 11:08 am    Post subject: Can ALSA config change permanently upon mplayer freezing? Reply with quote

Hi.

I've got an issue with ALSA yesterday (19th April around 19:00) that I cannot explain and I even wonder how it is just possible.

Until then, I didn't need any .asoundrc. [Okay, it's not the first time my system flaps on its own between "don't need an .asoundrc" and "WANT an .asoundrc" without ever being able to explain why. But it was so far only between reboots, not while the machine was running!] I had software mixing by default and sound was going through my SPDIF output. Out of the box!

Yesterday I was watching a movie with mplayer and accidentally typed a sequence of keys (which should have been typed in my chat client) and then mplayer froze. I had to kill mplayer.

Since then I get no sound through the SPDIF output (again... *sighs*) until I create an .asoundrc configuration file («asoundrc 33 1/3, the return»).

So far I have never been able
  • to explain why all of a sudden I need to create this file
  • to explain why the first days I installed my machine checking the "IEC958 default PCM" switch in the audio mixer was enough to make SPDIF the default output
  • to explain why another day that "IEC958 default PCM" didn't work anymore
  • to explain what makes my system change its desires (yeah, I'll end up believing it LIVES!)
  • to master .asoundrc syntax enough to write a file on my own without asking for help
If anybody has the slightest explanation, I'm fully open, even to a ghost in the machine.

All I want is a) SPDIF as the default output and b) software mixing (it must be possible since it was working out-of-the-box until yesterday).

Thanks a lot for any info/hint/hug/help/tutorial/exorcism.

EDIT: This gives me SPDIF output by default but fails dmix'ing as all my attempts at using dmix with digital output have failed.
.asoundrc:
pcm.!default {
   type plug
   slave.pcm "iec958"
}

This also works, still without software mixing, same reasons:
Code:
pcm.!default spdif

Don't ask me to tell the difference between both...
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat Apr 20, 2013 11:43 am    Post subject: Reply with quote

See config in my sig, and all the useful info therein, e.g. this list of things that often go wrong.
_________________
Improve your font rendering and ALSA sound
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sat Apr 20, 2013 12:31 pm    Post subject: Reply with quote

Thanks Paul. I remember you already helped me with Alsa and I tried your sound configuration. However that never worked and there are too many points I don't understand (I understand almost nothing there to be honest). I've tried again right now and it still doesn't work (aka I have no sound).

I have first tried copying only the pcm.dmixed block, no sound. I then copied everything and then I got a message from Parole (Xfce media player, it uses gstreamer) "L'élément autoaudiosink ne fonctionne pas." (The autoaudiosink element doesn't work). Fact is I don't know/understand what to copy and what to change.

Here's what I can provide.
aplay -l:
**** Liste des Périphériques Matériels PLAYBACK ****
carte 0: PCH [HDA Intel PCH], périphérique 0: ALC887-VD Analog [ALC887-VD Analog]
  Sous-périphériques: 1/1
  Sous-périphérique #0: subdevice #0
carte 0: PCH [HDA Intel PCH], périphérique 1: ALC887-VD Digital [ALC887-VD Digital]
  Sous-périphériques: 1/1
  Sous-périphérique #0: subdevice #0
carte 1: NVidia [HDA NVidia], périphérique 3: HDMI 0 [HDMI 0]
  Sous-périphériques: 1/1
  Sous-périphérique #0: subdevice #0
carte 1: NVidia [HDA NVidia], périphérique 7: HDMI 0 [HDMI 0]
  Sous-périphériques: 1/1
  Sous-périphérique #0: subdevice #0
carte 1: NVidia [HDA NVidia], périphérique 8: HDMI 0 [HDMI 0]
  Sous-périphériques: 1/1
  Sous-périphérique #0: subdevice #0
carte 1: NVidia [HDA NVidia], périphérique 9: HDMI 0 [HDMI 0]
  Sous-périphériques: 1/1
  Sous-périphérique #0: subdevice #0

aplay -L:
null
    Discard all samples (playback) or generate zero samples (capture)
headphones
    Headphones
skype
    Skype
stereo8930
    Stereo speakers 8930g
upmix_20to51_resample
    20to51
movie
    Movie Volume
sysdefault:CARD=PCH
    HDA Intel PCH, ALC887-VD Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    Front speakers
surround41:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    5.0 Surround output to Front, Center and Rear speakers
surround71:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PCH,DEV=0
    HDA Intel PCH, ALC887-VD Digital
    IEC958 (S/PDIF) Digital Audio Output
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 0
    HDMI Audio Output

I had got so many random troubles with sound that I once took some [enormous] time to configure mplayer:
/etc/mplayer/mplayer.conf:
vo = vdpau,fbdev,
fs=yes
ao=alsa:device=spdif
ac=mpg123,hwac3,hwdts,hwmpa,
channels=6
af=scaletempo,lavcac3enc=1:640:3
slang = en
sub-paths = Subtitles/
sub-fuzziness = 1
alang = fr
heartbeat-cmd = "xscreensaver-command -deactivate >/dev/null"
[protocol.dvdnav]
vc=ffmpeg12,
mouse-movements=yes
nocache=yes
[vo.vdpau]
vc=ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,ffodivxvdpau,
vf-clr=yes
[default]
fontconfig=1
subfont-osd-scale=4
subfont-text-scale=3
unrarexec=/usr/bin/unrar

This is the only player that works and worked 100% of the time since I made this configuration.

So back to the topic. Should I copy all of your sound config or just parts? Are there parts to change?
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat Apr 20, 2013 1:19 pm    Post subject: Reply with quote

You most likely don't want "device=spdif" - I assume that would not go through dmix.

To set what ALSA's card 0 is, I use in a file in /etc/modprobe.d/
Code:
# http://alsa.opensrc.org/MultipleCards
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5098
Location: Dark side of the mood

PostPosted: Sat Apr 20, 2013 2:14 pm    Post subject: Reply with quote

PaulBredbury wrote:
You most likely don't want "device=spdif" - I assume that would not go through dmix.

Well, mplayer is not the problem and this is the only thing I could find out on my own and that worked. And when I watch a movie that way, I don't really care if the SPDIF is locked or not. In short I don't mind to do without dmix for mplayer.

PaulBredbury wrote:
To set what ALSA's card 0 is, I use in a file in /etc/modprobe.d/
Code:
# http://alsa.opensrc.org/MultipleCards
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel

I'm going to check that. EDIT: I can confirm that it works with those two lines and I don't need an .asoundrc with those lines. I can't tell why they were absent from my global configuration but as weird as it is it has worked, sort of, without. So I'll wait a little before I consider this issue solved.

I've noticed that I had this:
Code:
options snd-hda-intel index=0,1
options snd-usb-audio index=2

in alsa.conf.

Thanks again for your help, Paul.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum