View previous topic :: View next topic |
Author |
Message |
avx Advocate
Joined: 21 Jun 2004 Posts: 2152
|
Posted: Mon Apr 25, 2011 4:50 pm Post subject: [ugly workaround] mpd - not finding device -> no sound |
|
|
I'm having trouble getting sound out of mpd and I can't find the problem, so here it goes.
mpd.conf Code: |
music_directory "/home/avx/nas/media/audio/music/"
playlist_directory "/home/avx/nas/media/audio/music/.mpd/playlists"
db_file "/home/avx/nas/media/audio/music/.mpd/db"
log_file "/home/avx/nas/media/audio/music/.mpd/log"
state_file "/home/avx/nas/media/audio/music/.mpd/state"
sticker_file "/home/avx/nas/media/audio/music/.mpd/sticker.sql"
user "avx"
group "users"
bind_to_address "localhost"
bind_to_address "/home/avx/nas/media/audio/music/.mpd/socket"
input {
plugin "curl"
}
audio_output {
type "alsa"
name "My ALSA Device"
device "hw:0,0" # optional
format "44100:16:2" # optional
mixer_type "hardware" # optional
mixer_device "default" # optional
mixer_control "PCM" # optional
mixer_index "0" # optional
}
max_playlist_length "32768"
filesystem_charset "UTF-8" |
The log says:
Quote: | Apr 25 18:42 : mixer: Failed to read mixer for 'My ALSA Device': failed to attach to default: No such file or directory
ALSA lib pcm_hw.c:1401:(_snd_pcm_hw_open) Invalid value for card
Apr 25 18:42 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "hw:0,0": No such file or directory
Apr 25 18:42 : player_thread: problems opening audio device while playing "Absolute Beginner/Absolute Beginner - (2000) - Boombule: Bambule Remixed/(Absolute Beginner) - (2000) - Boombule: Bambule Remixed - 01 - Hammerhart (Denyo77 Remix) (Feat. D-Flame & Illo 77).mp3" |
Somehow it doesn't find the card? However, mplayer works just fine without modifying the output (guessing it uses the default by default?).
mpd: "media-sound/mpd-0.16.2 USE="aac alsa curl fifo flac id3 inotify lame libmms libsamplerate mad network ogg pipe sqlite unicode vorbis"
More info? Request please! Thanks.
Edit, bug: https://bugs.gentoo.org/show_bug.cgi?id=364859 _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
Last edited by avx on Mon Apr 25, 2011 9:20 pm; edited 1 time in total |
|
Back to top |
|
|
P.Kosunen Guru
Joined: 21 Nov 2005 Posts: 309 Location: Finland
|
Posted: Mon Apr 25, 2011 5:08 pm Post subject: |
|
|
Try another syntax, "aplay -L" lists names.
Code: | device "iec958:CARD=U2,DEV=0" |
|
|
Back to top |
|
|
avx Advocate
Joined: 21 Jun 2004 Posts: 2152
|
Posted: Mon Apr 25, 2011 6:01 pm Post subject: |
|
|
Tried that and got a new error
Code: | Apr 25 19:59 : mixer: Failed to read mixer for 'My ALSA Device': failed to attach to default: No such file or directory
ALSA lib confmisc.c:768:(parse_card) cannot find card 'Intel'
ALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_card_driver returned error: No such device
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_concat returned error: No such device
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_refer returned error: No such device
ALSA lib conf.c:4663:(snd_config_expand) Evaluate error: No such device
ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM default:CARD=Intel
Apr 25 19:59 : output: Failed to open "My ALSA Device" [alsa]: Failed to open ALSA device "default:CARD=Intel": No such device | Also tried with
Quote: | iec958:CARD=Intel,DEV=0
HDA Intel, ALC1200 Digital
IEC958 (S/PDIF) Digital Audio Output | No difference.
Remerged everything alsa (-lib,-headers,-utils), no change _________________ ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>. |
|
Back to top |
|
|
avx Advocate
Joined: 21 Jun 2004 Posts: 2152
|
|
Back to top |
|
|
angelos Retired Dev
Joined: 31 Aug 2006 Posts: 14
|
Posted: Thu May 19, 2011 5:32 pm Post subject: |
|
|
Let me explain the "group" setting.
Setting group to "users" forces mpd to run in the group users and lets it forget about all other groups. That means doing that is the same as removing the user mpd runs as from all groups but this single one. If you use "users" and your audio devices are 660 root:audio, then mpd will not be able to access those, no matter what groups the mpd user is in. If you use "audio" and your music directory is 750 youruser:users, then mpd will not be able to read your music.
There are two possible solutions to this:
a) Use the defaults and let mpd run as mpd:audio and set your music directory to 755 (and 644 resp.)
b) Drop the user/group lines completely and start mpd as your user, that means mpd will have all the permissions your user has (you might want to look at the example config in /usr/share/doc/mpd-* for that) |
|
Back to top |
|
|
|