Strictly speaking this is not an OSMC problem but an ,pc/mpd problem
I’ve installed mpd which I use as an alarm clock with an entry in crontab
The stations.m3u is just a text file with 7 internet radio stations
sudo apt install mpd mpc
Entry in crontab:
30 07 * * 1-5 mpc load stations; mpc play 1; mpc volume 30
15 08 * * 1-5 mpc stop
This has always worked. I used a second USB sound card, to direct sound to external speakers but quality was not great, so decided to use internal 3.5mm analogue out.
Since taking out the USB sound card I cannot get mpc output on the nalogue 3.5mm connector, I’m sure this is an error in /etc/mpd.conf
Below is the audio config in /etc/mpd.conf:
# An example of an ALSA output:
#
# first sound card hw:0,0 internal 3.5mm
audio_output {
type "alsa"
name "Alsa Output"
device "hw:0,0"
format "44100:16:2"
mixer_device "default"
mixer_control "PCM"
# mixer_index "0"
}
audio_output {
type "alsa"
name "ALSA HDMI"
device "hw:0,1" # optional
format "44100:16:2" # optional
mixer_device "default" # optional
mixer_control "PCM" # optional
mixer_index "0" # optional
}
#
#
#audio_output {
# type "alsa"
# name "USB sound card"
# device "hw:1,0" # optional
# format "48000:16:2" # optional
# mixer_device "hw:1" # optional
# mixer_control "Speaker" # optional
# mixer_index "0" # optional
#}
The alsa hardware devices are shown below in output of aplay -l
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 7/7
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
Subdevices: 1/1
Subdevice #0: subdevice #0
It does not matter whether I use hw:0,0 or hw:0,1 sound from mpc is now played via the HDMI lead into TV speakers
Logs on Pastebin:
pastebin Log
Thanks if anyone can help strictly speaking this is nothing to do with OSMC
As a final note the audio 3.5mm output and associated amp and speakers are working.
If i go to OSMC settings, audio and change output from HDMI to analog out, sound is redirected to speakers,