RanzQ / hyperion-audio-effects

Hyperion audio effects dev kit using Gstreamer
MIT License
47 stars 8 forks source link

I hear sound through mpc play but I don't see no hyperion effect #19

Closed behtjes closed 8 years ago

behtjes commented 8 years ago

Sound is coming through via HDMI, but when I start the effect, no leds show up. What's wrong with my setup?

I only see waiting for gstreamer messages:

osmc@osmc:~$

mpc play

Major Lazer - Be Together (feat. Wild Belle)
[playing] #1/1   1:10/3:55 (29%)
volume:100%   repeat: off   random: off   single: off   consume: off
osmc@osmc:~$ cd /home/osmc/hyperion-audio-effects/
osmc@osmc:~/hyperion-audio-effects$ python main.py --effect vumeter
Exit by typing 'x' or 'exit'
Effect: VU meter
----------------
Left leds:
[111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82]
Right leds:
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29]
Effect started, waiting for gstreamer messages...

aplay -l:

osmc@osmc:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  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
  Subdevice #7: subdevice #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  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
  Subdevice #7: subdevice #7
card 1: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
  Subdevices: 8/8
  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
  Subdevice #7: subdevice #7

.asoundrc:

pcm.!default {
  type asym
  playback.pcm "alsa_sink"
  capture.pcm "alsa_monitor"
}

pcm.alsa_sink {
  type plug
  slave {pcm "multi_dev"}
  route_policy "duplicate"
}

pcm.alsa_monitor {
  type plug
  slave {pcm "hw:Loopback,1,0"}
}

pcm.multi_dev {
  type multi

  slaves.a.pcm "hw:0,1" # Match this to your sound card (aplay -l)
  slaves.a.channels 2
  slaves.b.pcm "hw:Loopback,0,0"
  slaves.b.channels 2

  bindings.0.slave a
  bindings.0.channel 0
  bindings.1.slave a
  bindings.1.channel 1
  bindings.2.slave b
  bindings.2.channel 0
  bindings.3.slave b
  bindings.3.channel 1
}
RanzQ commented 8 years ago

Your setup looks ok, a couple of things to try, check effects/vumeter.json:

        "level-min": 90,
        "level-max": 100,

Set level-min to 0 at first.

Then you can use alsamixer to adjust recording and playback levels. Check issue #12 also.

behtjes commented 8 years ago

I've set it to 0, now it lights up a few leds at the bottom. I've also tried the quiet=false setting. I only get zeroes as output...

RanzQ commented 8 years ago

Also there is a note in OSMC instructions that .asoundrc doesn't work for mpd, it needs global config.

behtjes commented 8 years ago

I know. I've symlinked the .soundrc in /etc/ so that's not the problem I guess?

RanzQ commented 8 years ago

Ok, if cat /etc/asound.conf outputs the config the symlink is be fine. Check this comment, I've listed some commands how you can try gstreamer alone.

Did you check your capture volume (run alsamixer and press F4)?

behtjes commented 8 years ago

cat /etc/asound.conf doesn't outputs te config. I don't have asound.conf in /etc/ only .soundrc. I have osmc and a raspberry pi 3.

But i have asound.conf.save. I'll rename that and try it again

Edit: IT WORKS! so asound.conf was the problem!