Open riesch opened 7 years ago
Hi, can you post the output of: cat /proc/asound/cards
Hi, I tried to reinstall kodi for this purpose, but cant get it active from volumio.
Verstuurd vanaf mijn iPad
Op 21 jun. 2017 om 16:36 heeft Rachid Groeneveld notifications@github.com het volgende geschreven:
Hi, can you post the output of: cat /proc/asound/cards
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
You don't need to reinstall Kodi to post the results of cat /proc/asound/cards
, installation of plugins will not affect the output. :)
As for your problem activating the plugin; I'm going to need a little more information:
sudo journalctl -f
and then starting the plugin?Hi,
I have similar situation.
Result of cat /proc/asound/cards
0 [ALSA ]: bcm2835 - bcm2835 ALSA
bcm2835 ALSA
1 [sndrpihifiberry]: HifiberryAmp - snd_rpi_hifiberry_amp
snd_rpi_hifiberry_amp
On Volumio I have the HiFiBerry Amp option available,
but on Kodi there is only HDMI, Analog or Both. No HiFiBerry Amp.
Do you have any idea how to fix this ?
Hey,
Thanks for the info, can you post the results of cat /etc/asound.conf
please?
Also, you need to restart Kodi (just stop and start the plugin) for the changes to take effect.
Hi,
volumio@volumio:~$ cat /etc/asound.conf
#Override alsa.conf settings
defaults.ctl.card 0
defaults.pcm.card 0
#KODI
defaults.ctl.card 1
defaults.pcm.card 1
#ENDOFKODI
result is the same for plugin on and off
regards
Slawek
Hi,
Thank for posting back, you should disable the DAC in the Kodi plug-in settings. Then restart Kodi, I see my config conflicts for the Amp+
Can you tell me if that worked for you?
Hi,
Thanks for your suggestions. Tomorrow morning I will check and let you know.
Hi,
disabling the DAC in the Kodi plug-in settings enable ALSA setting in Kodi, but not HiFiBerry amp - it's the default bcm2835 (my hardware is RPi3)
this is not working for me.
If I install fresh LibreELEC - there is ALSA HiFiBerry amp option in Kodi. Maybe I can send some files to you to help you identify the problem ?
Hi,
any news ? How can I help with this problem?
Did you restart Kodi after you saved the dac-setting in the plugin?
Can you post the results of cat /etc/asound.conf
and aplay -l
? I can't test this scenario, because I don't own a hifiberry amp card unfortunately.
Yes sure I did.
here is my aplay - l result
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: sndrpihifiberry [snd_rpi_hifiberry_amp], device 0: HifiBerry AMP HiFi tas5713-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
the only option to be able to select Hifiberry Amp in Kodi is to manually change the /etc/asound.conf
in default section like bellow:
cat /etc/asound.conf
# Override alsa.conf settings
defaults.ctl.card 1
defaults.pcm.card 1
in that way I can select in Kodi ALSA Default (snd_rpi_hifiberry_amp Analog) but still there is no sound in Kodi :-(
Just for test I've installed on side the fresh LibreELEC and my card is detected and working without any problem. Of course in Volumio is working as well .
FreshLibreELEC
with one line added to config.txt:
dtoverlay=hifiberry-amp
results:
cat /etc/asound.conf
No "asound.conf" file at all
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_amp], device 0: HifiBerry AMP HiFi tas5713-hifi-0 []
Subdevices: 0/1
Subdevice #0: subdevice #0
I was trying to disable default sound "card 0:" in my RPi to have only one card. Then I was able to select it in Kodi but still no sound in Kodi. In Volumio - perfect.
I think LE (=LibreElec) might have the dtparam=audio=off setting in the config.txt and Volumio does not, this disables the onboard audio device(s).
Can you confirm this maybe? Also, can you try putting that in the boot config for Volumio (NB: You won't be able to use HDMI/analog out in Volumio anymore and it might cause more trouble).
I can add another option (disable onboard sound), but I'm note sure what this does to HDMI.... But first things first, can you verify that LE has this setting and Volumio doesn't? And secondly, if you add the dtparam line does the sound work in Kodi? Please make sure DAC is off in the Kodi plugin. As your card index needs to be/stay 0.
There is no dtparam=audio=off in LE
here is the LE config.txt:
################################################################################
# This file is part of LibreELEC - http://www.libreelec.tv
# Copyright (C) 2016 Team LibreELEC
#
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
# Bootloader configuration - config.txt
################################################################################
################################################################################
# Memory (System/GPU configuration )
################################################################################
# Default GPU memory split (do not change if you do not know what you are doing)
gpu_mem=128
# Configure GPU memory based on SDRAM size - overrides above setting
gpu_mem_256=112
gpu_mem_512=160
gpu_mem_1024=256
################################################################################
# For overclocking and various other settings, see:
# https://www.raspberrypi.org/documentation/configuration/config-txt.md
################################################################################
# Set 'force_turbo=1' to disable dynamic overclocking and enable overclocking always.
force_turbo=0
# Make display smaller to stop text spilling off the screen
#
# Note that the overscan settings only affect the splash screen and not Kodi.
#
# If you experience overscan/underscan issues the best solution is to adjust
# your TV settings ("full pixel", "1-1 pixel" etc.). Alternatively, there is a
# calibration menu in the Kodi GUI.
# disable_overscan=1
# Force HDMI even if unplugged or powered off
# hdmi_force_hotplug=1
# Doesn't sent initial active source message.
# Avoids bringing CEC (enabled TV) out of standby and channel switch when
# rebooting.
hdmi_ignore_cec_init=1
################################################################################
# License keys to enable GPU hardware decoding for various codecs
# to obtain keys visit the shop at http://www.raspberrypi.com
################################################################################
# decode_MPG2=0x00000000
# decode_WVC1=0x00000000
################################################################################
# End of default configuration
################################################################################
################################################################################
# Include distribution specific config file if it exists.
################################################################################
[all]
include distroconfig.txt
dtoverlay=hifiberry-amp
I'm able to select "standard" audio channels in LE:
Volumio - what dtparam lines you want to test? dtparam=audio=off ?
Yes I wanted to see if the dtparam=audio=off would make any difference on the Volumio image.
Also I've been reading into Open/LibreElec, this is not really comparable to Volumio. OE and LE are running on a bare arch(?) Linux variant, whereas Volumio runs on Jessie (way more bloated).
For example aplay -l returns the onboard card in Jessie, but not in LE. Therefore I think the ALSA configuration differs entirely. But I will not give up so easily, let's try to make this work....
Maybe if I got my hands on a hifiberry AMP for a good price I'd give it a good go, will keep checking the bargains ;)
You can also try to add dtdebug=1 to the /boot/config.txt
OKi I will try in few minutes.
BTW I'm very very motivated to have this configuration working. I'm building kind of HTPC for my yacht - RPi3 plus 2x1TB HDDs plus external power to from yacht 12V DC. Mostly I like to listen to music from HDD library or internet radio and obviously Volumio is perfect soft for that. With my yacht loudspeakers Volumio n RPi3+HiFiBerry Amp+ is more than perfect. This season it was working from the spring till now.... but I have also nice 42" TV on my yacht - it's LG SmartTV but Kodi is incomparable to the LG ugly interface. We know it well. So for me having team Volumio + Kodi is my dream configuration. Including "poor man" NAS.
If nothing help I can participate on purchase of HiFiBerry for you - but lets try first on my config.
This is my yHTPC (yacht Home Theatre PC ;-)
The top cover is still on my 3D printer...
OK tested. options added in config.txt
dtparam=audio=off
dtdebug=1
so there is only one card - HiFiBerry Amp+ with number 0
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_amp], device 0: HifiBerry AMP HiFi tas5713-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
DAC is off in the Kodi plugin.
File: /etc/asound.conf
# Override alsa.conf settings
defaults.ctl.card 0
defaults.pcm.card 0
System restarted. Volumio is setup, and sound is working as usual.... and surprise....
Kodi still shows the "standard Pi sound devices" and the HiFiBerry Amp+.
But nothing more. still no sound from HiFiBerry. HDMI output works fine. There is no PULSE (Bluetooth output)
Hi, I have the same behaviour with iqaudio dac plus. It never appears in kodi, but works in volumio and aplay-l shows it. I tried miscellaneous config, blacklisted default onboard sound card but NADA. I saw it once with no sound and I don't understand why it appears.
Hi,
try this steps (with NON blacklisted default onboard sound card)
# Override alsa.conf settings
defaults.ctl.card 1
defaults.pcm.card 1
after that in my case HiFiBerry Amp - always appears but no sound :-( If I only Off/On the plugin to restart Kodi (without reboot) the card not appears.
What is also interesting. If I set Kodi to keep audio device alive. There is not possible to play sound in Volumio (Volumio says that device is not accessible). Looks like Kodi is somehow accessing the HiFiBerry Amp+ card. Despite that, there is no sound from Kodi.
I'm going to try. I have installed an other plugin (volsimpleequal an equalizer) that provide a Loopback device and then the signal to the DAC (iqaudio). In that case, kodi can use the loopback and then output to the dac. But the sound is sometime chopped or repeated... maybe a buffer size issue. This is a other story but just means that kodi can see other ouput than hdmi and default board in volumio...
well, nothing better for me. Can't see the dac.
In the article about Pulse and Kodi: http://kodi.wiki/view/PulseAudio in section "6.5 Known issues" author write about something similar to our problem ... maybe this is some trace to investigate?
I've a rpi3 with HiFiBerry DAC+ Pro and it's an exact same scenario. Except the twist is, if you enable DAC output for kodi in plugin settings the audio output will break entirely on volumio (tested on version 2.246) and will not work again until you disable the option and reboot the machine.
TL;DR is the DAC support in this plugin is broken and if used it breaks DAC support in Volumio and as far as KODI is concerned, it doesn't care about it either way as the DAC is not detected regardless of whether the option is enabled or disabled.
I'm expecting an AMP soon, so then I'll be able to really debug this.
As for the remark above "the DAC support in this plugin is broken and if used it breaks DAC support in Volumio"; this is true. Only one application can claim the DAC/AMP I'm affraid. This is not something I can change, bypassing this requires the inclusion of other software (e.g. PulseAudio) and appropriate porting on both ends (Kodi and Volumio). Also changing the default card index might be problematic for Volumio, this means the option 'Use DAC' will break a whole lot more than initially expected.
The one thing I can look into is why the HifiBerry AMP/DAC is not properly used in Kodi (Kodi only). Then I can investigate whether and how to properly release the soundcard so that Volumio can use it again. Maybe killing Kodi suffices, but I'm not sure.
Meaning, the course of action would be to close Kodi after use, so the soundcard is released for other applications (Volumio/SnapCast/etc/).
UPDATE:
Just tested with HifiBerry DiGi, I can use the soundcard in Kodi AND Volumio, just not at the same time. For example I can watch a movie and when I STOP (not pause) it, I can almost instantly listen to music using the Volumio UI.
So the above is not entirely true, at least not for the Digi. I have a DAC lying around, so I will test it with that. I'm expecting the same outcome, but we might have found a bug here.... to be continued.
To me with DAC+ Pro it was impossible to do, once DAC was enabled for Kodi in plugin settings audio in volumio was unavailable until the option was disabled and KODI wasn't able to detect or use the DAC regardless of the option.
I just re-read your post, I think the DAC+ Pro might have different behavior than the 'normal' DAC.
Can you post your /etc/mpd.conf
, /etc/asound.conf
and aplay -l
when just installing Volumio and the DAC+ Pro?
Hi,
maybe will be interesting to install Kodi with your script on pure Arch Linux or other Jessie ? Without Volumio. Just to test if the HiFiBerry Amp+ will work ?
I'm ready to made the test But I don't know how to do it. (how to run your script without Volumio).
Hey,
If you want to install Kodi on a bare distro you only need the install.sh script.
https://github.com/Saiyato/volumio-kodi-plugin/blob/master/install.sh
Run it like this: sudo sh {path_to_script}.sh
OK I will try ... and report the results.
Hello, I have the same issue as you. i 've add that to config..txt dtparam=audio=off dtdebug=1
volumio@volumio:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpihifiberry [snd_rpi_hifiberry_amp], device 0: HifiBerry AMP HiFi tas5713-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
volumio@volumio:~$ cat /etc/asound.conf
# Override alsa.conf settings
defaults.ctl.card 0
defaults.pcm.card 0
my result is that I get a sound on kodi but very low (i can barely hear it when volume is 100% on kodi ) and nothing on volumio even if i turn down kodi .
My HifiBerry AMP just came in and the first test is successful, I did not need to change anything.
The setup:
What did I do?
Contents of asound.conf
volumio@volumioamp:~$ cat /etc/asound.conf
#Override alsa.conf settings
defaults.ctl.card 0
defaults.pcm.card 0
#KODI
defaults.ctl.card 1
defaults.pcm.card 1
#ENDOFKODI
aplay -l
volumio@volumioamp:~$ 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: sndrpihifiberry [snd_rpi_hifiberry_amp], device 0: HifiBerry AMP HiFi tas5713-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
Contents of /boot/config.txt
volumio@volumioamp:~$ cat /boot/config.txt
initramfs volumio.initrd
gpu_mem=16
max_usb_current=1
dtparam=audio=on
audio_pwm_mode=2
dtparam=i2c_arm=on
disable_splash=1
#### Volumio i2s setting below: do not alter ####
dtoverlay=hifiberry-amp
gpu_mem_1024=256
gpu_mem_512=144
gpu_mem_256=112
hdmi_force_hotplug=1
Contents of /proc/asound/cards
volumio@volumioamp:~$ cat /proc/asound/cards
0 [ALSA ]: bcm2835 - bcm2835 ALSA
bcm2835 ALSA
1 [sndrpihifiberry]: HifiberryAmp - snd_rpi_hifiberry_amp
snd_rpi_hifiberry_amp
So in my setup it worked straight out of the box. The versions I have used are:
Volumio: 2.246 Spotify Connect plugin: 1.6.1. Kodi plugin: 2.2.1
Can you test this sequence? Maybe there's a compatibility problem with another plugin, or maybe the barrel feed is required (Kodi uses alot more power).
Hi,
just did the test from list step by step - it works !!!
.... but only until I restart the Pi ... after restart there is no possibility to select HiFiBerry Amp+ in Kodi. = no sound via Amp+ only HDMI
Repetition of points 10-14 solve the problem.... until next restart ...
BTW I have small changes to previous hardware - now I'm using my old Pi2 - it was Pi3 before. When I get my Pi3 back I will test it as well.
Ok this looks promising though, will investigate :)
I'm not experiencing any problems after multiple reboots. The only thing that changes after a reboot is the volume, its back to 0, every single time. Changing the volume back to 50 is all I have to do for sound.
If this doesn't help, let me know. I can upload my image for you to test.
My hardware is (now):
My software is:
I have this same volume changes to zero as you, but this is not a big deal now.
If can upload your image I will test it quickly and let you know.
Here's the link to the image: https://mab.to/MpPqvqLLa
I've incorporated a test video in the Kodi installation (it's on the SD-card). Please note that I only have 16GB SD-cards, so you're gonna need at least that size (or know how to resize the image).
The image is rarred (zip has a maximum of 4GB) to make it smaller (around 1.2GB).
Hi @Saiyato, just tested. Results are identical like mine installation:
Looks that Volumio sound gauge probably setup the global ALSA mixer volume level.
I will reflash the image tonight and retest.
How do you power your Pi? Via de micro USB connector or the barrel connector or something else?
That way:
I have exactly the same setup. Only my board doesn't have pins extending the GPIO connectors. Like this: https://www.kiwi-electronics.nl/image/cache/data/products/raspberry-pi/addon-boards/amp_plus-1000x667.jpg
So I just reimaged my sd card and on first boot the hifiberry was not selectable in Kodi. Volumio however worked fine. Restarting the plugin fixed the soundcard problem.
Subsequent reboots didn't change anything for me, Kodi and Volumio continued to work perfectly.
Maybe ALSA is not ready when Kodi starts... Not sure how and if I can check this... But if ALSA is not ready, the sound card is unavailable, also ALSA is in the name so it must be something like that.
The weird part is that I don't have your problem. Maybe the difference is in the SD card used. I use Kingston class 10's.
Doesn't mean that I won't fix it, I'm just trying to understand the root cause of the problem so I can implement a good fix.
Can you disable the plugin, reboot, play something in Volumio (just a few seconds), start the Kodi plug-in and see if that works for you? That may indicate a timing issue.
There is one thing probably different from your setup. On my testing environment I have no dedicated HDMI monitor connected to RPi. I'm using my ASUS AIO computer. So RPi always start without any monitor connected. Then I have to switch my AIO input to HDMI then I can jump to Kodi on RPi.
I will test with RPi connected to my TV and let you know. It will take few hours because I have to organize 12 V power supply in my saloon ;-)
I think I was too tired yesterday... I do have the pins on top:
Anyways, connecting the monitor should not really matter. I edited the /boot/config.txt to have HDMI behave as hot-swap. But it's a valid test nonetheless.
Can you describe the exact process of how you use Kodi?
Mine is as follows:
What is the output of your dmesg regarding the soundcard? Maybe that's where things go south.
Use the command dmesg | grep snd
Hi,
this is working fine - both Kodi and Volumio until next reset.
result of dmesg:
volumio@volumio:~$ dmesg | grep snd
[ 11.423955] snd_bcm2835: unknown parameter 'index' ignored
[ 11.671287] snd-hifiberry-amp soc:sound: ASoC: CPU DAI (null) not registered - will retry
[ 11.708321] snd-hifiberry-amp soc:sound: ASoC: CODEC DAI tas5713-hifi not registered - will retry
[ 12.960623] snd-hifiberry-amp soc:sound: tas5713-hifi <-> 3f203000.i2s mapping ok
this same result I have for HiFiBerry Amp+ available and not available in Kodi.
Ok, so in short, the soundcard is not available in Kodi upon boot, this is something I need to investigate. The easiest way is to keep reflashing my image, because the first boot showed this behaviour.
Just to check, the sound is working fine in Volumio? After each boot?
This narrows the problem down to the Kodi issue.
After install of the plugin, playback options are hdmi, analog or both. In de settings of the plugin I selected the dac playback option.