Command line Music playback via 3.5mm

Well, it plays raw data as it doesn’t know the mp3 format. Try a wav file.

i did :frowning:

osmc@osmc:~$ sudo aplay codec.wav
ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM default
aplay: main:722: audio open error: No such file or directory

sry for all this noob questions, but i never was into that kind of configure stuff before.

That is strange as it works for me without a problem:

osmc@osmc:~$ aplay test.wav
Wiedergabe: WAVE 'test.wav' : Unsigned 8 bit, Rate: 44100 Hz, mono

can you show me ur configured files please?

Nothing is manually configured. Works as is.

you just got a fresh osmc build and than u can use aplay ? o.O ?

Not really as I did a lot of other experiments.
I can only say that it works here.

could you check and post

/home/pi/.asoundrc

and

aplay -l

I have no .asoundrc

The output of aplay -l is:

**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: ALSA [bcm2835 ALSA], Gerät 0: bcm2835 ALSA [bcm2835 ALSA]
Sub-Geräte: 8/8
Sub-Gerät #0: subdevice #0
Sub-Gerät #1: subdevice #1
Sub-Gerät #2: subdevice #2
Sub-Gerät #3: subdevice #3
Sub-Gerät #4: subdevice #4
Sub-Gerät #5: subdevice #5
Sub-Gerät #6: subdevice #6
Sub-Gerät #7: subdevice #7
Karte 0: ALSA [bcm2835 ALSA], Gerät 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0

well with and without .asoundrc i geht no soundcard Ehen i usw

aplay -l

this was different before

Did you load the kernel module as described earlier?

you mean this

Yep

well now it. plays the sound but via HDMI :confused:

Now you just need to change that by running:

0=auto, 1=analog, 2=hdmi

amixer cset numid=3 1

I did but now there is no output anymore nor analog nor hdmi

Is the volume turned up?

it wasent, but when i turn it up, its again just hdmi output, if i use ur command to set it on analog its turns down to 0 soundlevel , than again if i change this its hdmi again

any other idears?

try this
amixer -c 0 cset numid=3 1