everything works fine but i cant’t figure out how to specify the local audio. in the forked-daapd.conf in the section “local audio output” i can set two parameters:
Local audio output
audio {
# Name - used in the speaker list in Remote
nickname = “Computer”
# Audio device name for local audio output
card = “default”
# Mixer channel to use for volume control - ALSA/Linux only
# If not set, PCM will be used if available, otherwise Master.
# mixer = “”
}
what values do i have to put there to get local audio working?
tried already:
card =“hw:0”
mixer=“pcm”
did not work … does anyone have a clue how to find out card and mixer?
I would install aplay then try playing a wav file with it.
aplay -L will list the available sinks that are available, for direct access to the hardware but with sample rate conversion if required you should use plughw not hw.
hw does not provide sample rate conversion so if you try to play something the hardware doesn’t directly support it won’t work. plughw will only resample if it has to but will always work.
Here is an example of me playing a test wav on a USB interface:
aplay -D plughw:U192k piano2.wav
You can specify the sound interface by name (found with aplay -L, U192k in my example) or by index, for example plughw:0
hmm … seems like alsa does not recognize my soundcard
osmc@B2VERO:~$ aplay -vv ./test.wav
ALSA lib pcm_direct.c:940:(snd1_pcm_direct_initialize_slave) slave plugin does not support mmap interleaved or mmap noninterleaved access
ALSA lib pcm_dmix.c:1064:(snd_pcm_dmix_open) unable to initialize slave
wich of the following devices is the normal analog output:
aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=AMLM8AUDIO
AML-M8AUDIO,
Default Audio Device
sysdefault:CARD=AMLM8AUDIO
AML-M8AUDIO,
Default Audio Device
front:CARD=AMLM8AUDIO,DEV=0
AML-M8AUDIO,
Front speakers
iec958:CARD=AMLM8AUDIO,DEV=0
AML-M8AUDIO,
IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=AMLM8AUDIO,DEV=0
AML-M8AUDIO,
Direct sample mixing device
dmix:CARD=AMLM8AUDIO,DEV=1
AML-M8AUDIO,
Direct sample mixing device
dsnoop:CARD=AMLM8AUDIO,DEV=0
AML-M8AUDIO,
Direct sample snooping device
dsnoop:CARD=AMLM8AUDIO,DEV=1
AML-M8AUDIO,
Direct sample snooping device
hw:CARD=AMLM8AUDIO,DEV=0
AML-M8AUDIO,
Direct hardware device without any conversions
hw:CARD=AMLM8AUDIO,DEV=1
AML-M8AUDIO,
Direct hardware device without any conversions
plughw:CARD=AMLM8AUDIO,DEV=0
AML-M8AUDIO,
Hardware device with all software conversions
plughw:CARD=AMLM8AUDIO,DEV=1
AML-M8AUDIO,
Hardware device with all software conversions
i have no external soundcard. as mentioned i just want to know what the device for normal analog output ist (NOT hdmi).
UPDATE: just found the right device, its is indeed hw:0. however if i try to specify that in forked-daapd.conf in the line card =“hw:0” it does not seem to be working.
Tried, with the following configuration, but still not able to select the local audio device in the webinterface:
#Local audio output
audio {
# Name - used in the speaker list in Remote
nickname = “Computer”
# Type of the output (alsa, pulseaudio, dummy or disabled)
type = “alsa”
# For pulseaudio output, an optional server hostname or IP can be
# specified (e.g. “localhost”). If not set, connection is made via local
# socket. #server = “”
# Audio PCM device name for local audio output - ALSA only
card = “default”
# Mixer channel to use for volume control - ALSA only
# If not set, PCM will be used if available, otherwise Master.
mixer = “aml audio i2s mute”
# Mixer device to use for volume control - ALSA only
# If not set, the value for “card” will be used. #mixer_device = “”
# Synchronization
# If your local audio is out of sync with AirPlay, you can adjust this
# value. Positive values correspond to moving local audio ahead,
# negative correspond to delaying it. The unit is samples, where is
# 44100 = 1 second. The offset must be between -44100 and 44100. #offset = 0
}
also tried with mixer=“Ext Speaker”, also does not work, any idea?
yes, also tried with the following configuration. does not work either …
#Local audio output
audio {
# Name - used in the speaker list in Remote
nickname = “Computer”
# Type of the output (alsa, pulseaudio, dummy or disabled)
type = “alsa”
# For pulseaudio output, an optional server hostname or IP can be
# specified (e.g. “localhost”). If not set, connection is made via local
# socket. #server = “”
# Audio PCM device name for local audio output - ALSA only
card = “plughw:0”
# Mixer channel to use for volume control - ALSA only
# If not set, PCM will be used if available, otherwise Master.
mixer = “Ext Speaker”
# Mixer device to use for volume control - ALSA only
# If not set, the value for “card” will be used. #mixer_device = “”
# Synchronization
# If your local audio is out of sync with AirPlay, you can adjust this
# value. Positive values correspond to moving local audio ahead,
# negative correspond to delaying it. The unit is samples, where is
# 44100 = 1 second. The offset must be between -44100 and 44100. #offset = 0
}