Posts by HiassofT

    While trying to trace down some udev issues on RPi (3), running LE 7.0.1, I noticed that all of the boot messages where missing in the journal - journalctl -a started way too late.

    Code
    -- Logs begin at Mon 2016-06-20 23:13:32 CEST, end at Mon 2016-06-20 23:14:49 CEST. --
    May 18 14:51:06 LibreELEC connmand[385]: ntp: time slew +2881345.749678 s
    Jun 20 23:13:32 LibreELEC systemd[1]: Time has been changed


    The full log is here: ZECJ

    To me it looks like the following might have happened:
    - systemd noticed that the day was way back (there's no RTC on RPi), so it set the current date to it's build date (May 18th). From dmesg:

    Code
    [    2.545925] systemd[1]: System time before build time, advancing clock.


    - journald started, collected boot messages etc
    - correct date was received via ntp, journald noticed that, rotated the journal because it's now June 20th and in journal.conf there's #MaxFileSec=1month (default) and then discarded the journal because of MaxRetentionSec=1day (explicitly set in journal.conf)

    It would be great if some systemd/journald expert could have a closer look into that, maybe I missed something, but it seems we can't trace issues via journalctl on builds older than a month...

    so long,

    Hias


    wow, thank you, first time to have an effect...

    ...but just in testing. It doesn't work permanentely as you described. Wrong path?


    You probably have a typo or some error in the udev rules file, check for that in the system log:

    Code
    journalctl -a | grep udevd


    Quote


    P.S. Next issue: How to avoid the 2 plop noises during switch between the inputs without setting the volume to 0 / by setting the volume to 50 in Row 12 + 13 in Listen_to_LineIn_on_Lineout.sh ? (Plop noise is getting louder by increasing the value)


    You could try muting the output before changing the settings and unmuting it afterwards:

    Code
    amixer cset name='HPOUT2 Digital Switch' off
    ...
    amixer cset name='HPOUT2 Digital Switch' on

    so long,

    Hias
    [hr]


    Hello again, here are both pastebins after trying to play an ogg


    Thanks for the logs!

    The soundcard seems to be detected fine, but this line in dmesg is very suspicious:

    Code
    bcm2835-dma 3f007000.dma: DMA transfer could not be terminated

    I've seen that, too, if the card was unconfigured, eg if you have some error in the udev rule file (are you sure you didn't change that)? In that case I also get the "snd_pcm_writei returned -5" errors in kodi.log.

    Just remove the udev file and reboot (then it'll be recreated with default contents). It might need a second reboot for the change to take effect.

    Code
    rm /storage/.config/udev.rules.d/90-wolfson.rules
    reboot

    If it still doesn't work please upload the system log

    Code
    journalctl -a | paste

    so long,

    Hias


    sorry, I`m a complete newbee:
    1. Where lives the mixer setting to modify? In the Listen_to_SPDIF_on_LineOut.sh ?


    Yes, exactly.

    BTW: Just noticed that I had already uploaded fixed versions of the scripts to my website:
    listen-scripts.tgz

    Just use these and you don't have to change the stuff yourself

    Quote


    2. Where to store the listen files to let them execute from

    Code
    90-wolfson.rules

    For simplicity just copy the listen script directly into /storage/ - eg /storage/Listen_to_LineIn_on_Lineout.sh

    For testing run the script from a terminal, edit it, run it again... until you are happy with the result.

    Then, if you want to make it permanent (i.e. automatically activated at each boot) add it to the 90-wolfson.rules file. It should look somthing like this:

    Code
    # enable SPDIF plus all analog outputs
    SUBSYSTEM=="sound", ACTION=="add|change", ATTR{id}=="sndrpiwsp", \
    RUN+="/usr/bin/SPDIF_playback.sh -q", \
    RUN+="/usr/bin/Playback_to_Lineout.sh -q", \
    RUN+="/usr/bin/Playback_to_Headset.sh -q", \
    RUN+="/usr/bin/Playback_to_Speakers.sh -q", \
    RUN+="/storage/Listen_to_LineIn_on_Lineout.sh eq"

    so long,

    Hias

    Hi ReiniB!


    My target is to have a 2nd. input source on the line-out like described at "Listen_to_SPDIF_on_LineOut.sh" from Ragnar Jensen with the abillity to tune a bit at the equalizer. Are there any options to get some examples (step-by-step) or to read about getting the scripts to work in LibreELEC or a basic education about the audio-in options?


    The Record-... scripts are for setting up recording (eg when using arecord), these are of no much use with LibreELEC/Kodi. The listen scripts are what you need.

    There are 2 gotchas when using SPDIF:

    First the easy to solve one: You have to slightly modify the mixer settings and change "SPDIF in Switch" to "SPDIF In Switch" and "SPDIF out Switch" to "SPDIF Out Switch" (note the capital "I" and "O" in "In"/"Out").

    But the next one is tough: If you want to use SPDIF in you have to manually configure the card to the correct rate. If you only use 44.1kHz audio on SPDIF you could change the Kodi audio settings to only use 44.1kHz - when playing video or audio file Kodi the will resample everything to 44.1kHz. Likewise, if you want to use 48kHz audio on SPDIF set Kodi to 48kHz.

    If the configured rate doesn't match the rate of the SPDIF signal you'll end up in a mess: The audio chip tries to adjust the configured rate (eg 44.1kHz) to the one on SPDIF in (eg 48kHz) and usually fails miserably - that feature is intended to adjust for slight variations in clock speed (eg 44105 Hz instead of 44100).

    So mixing the SPDIF input signal into the output is very limited and might not work as expected if the SPDIF samplerate varies.

    Mixing the analog inputs (Line In, DMIC, Headphone in) into the output is a lot more practical:

    You don't have the samplerate restriction here, Kodi can choose whatever samplerate it likes and the soundchip just uses that one to digitize the analog signal and mix it with the output.

    I'd suggest you try the "Listen_to_LineIn_on_Lineout.sh" script, that should work out of the box and produce the expected result.

    If you start it with "eq" as a parameter it'll set up some equalizer settings as well.

    Just play around with the "EQ...Volume" settings in the script and adjust them to your likes. You can find more background info in the linked discussions on my website.

    so long,

    Hias

    I'm using a simple IR receiver hooked up to the GPIO of my RPi and it's working just fine - both with the lirc_rpi driver plus userspace lircd and with the in-kernel gpio-ir-reciever driver from the rc framework (which doesn't need userspace lircd). But I couldn't get the longpress keyboard/remote modifier in kodi keymaps working.

    For testing I used a very simple remote.xml - long-pressing left should do a right and vice versa:

    In a standard setup (eventlircd running, picking up the input events from user/kernel-space lirc and relaying them to kodi via the lirc socket) the kodi log looks quite funny. First a short press then a long press:

    Code
    13:06:45 447.539246 T:1962627072   DEBUG: LIRC: Update - NEW at 69863:69 0 KEY_LEFT devinput (KEY_LEFT)
    13:06:45 447.539459 T:1962627072   DEBUG: OnKey: 169 (0xa9) pressed, action is Right
    13:06:45 447.799103 T:1962627072   DEBUG: LIRC: Update - NEW at 70122:69 0 KEY_LEFT_UP devinput (KEY_LEFT_UP)
    
    
    13:06:50 452.380463 T:1962627072   DEBUG: LIRC: Update - NEW at 74704:69 0 KEY_LEFT devinput (KEY_LEFT)
    13:06:50 452.380676 T:1962627072   DEBUG: OnKey: 169 (0xa9) pressed, action is Right
    13:06:52 454.378815 T:1962627072   DEBUG: Previous line repeats 28 times.
    13:06:52 454.378906 T:1962627072   DEBUG: LIRC: Update - NEW at 76702:69 0 KEY_LEFT_UP devinput (KEY_LEFT_UP)


    Note that in both cases the KEY_LEFT was translated to "Right". It looks like the longpress modifier in the remote section was ignored.

    With eventlircd stopped and kodi picking up the input events from lircd/kernel (handled as keyboard input) it looks as expected:

    Code
    13:16:31 1033.300049 T:1962508288   DEBUG: Keyboard: scancode: 0x69, sym: 0x0114, unicode: 0x0000, modifier: 0x0
    13:16:31 1033.579834 T:1962508288   DEBUG: OnKey: left (0xf082) pressed, action is Left
    
    
    13:16:35 1037.757080 T:1962508288   DEBUG: Keyboard: scancode: 0x69, sym: 0x0114, unicode: 0x0000, modifier: 0x0
    13:16:36 1038.136719 T:1962508288   DEBUG: Previous line repeats 2 times.
    13:16:36 1038.136841 T:1962508288   DEBUG: OnKey: long-left (0x100f082) pressed, action is Right
    13:16:36 1038.216309 T:1962508288   DEBUG: Keyboard: scancode: 0x69, sym: 0x0114, unicode: 0x0000, modifier: 0x0


    Short and long presses are detected and the correct action is performed.

    Now I'm wondering what I'm missing.

    Is longpress support with LIRC supposed to work at the kodi side? Eventlircd would generate _UP events but are they handled in kodi? Do I need some config setting or some special lircmap configuration for that?

    Or is longpress support only available on keyboard/input devices and eventlircd is the culprit?

    so long,

    Hias


    Thanks Hias the update did the job.

    It's reproducable. I did a fresh install on another SD card, there was no overlay foler.
    Updated it and there was the overlay folder including the overlays for Hifiberry.


    Thanks for the feedback!

    If it's reproducible could you please do a fresh installation and then list the contents of flash ("ls -lR /flash | paste")? Would be interesting to know what exactly is going on there. The directory listing might give a clue.

    so long,

    Hias


    001687.125: dtdebug: Failed to open overlay file 'overlays/hifiberry-dacplus.dtbo'


    This is really odd. Check if the file exists on your installation. Here (LE 7.0.1 on a RPi2) it's there:

    Code
    LibreELEC:~ # ls -l /flash/overlays/hifiberry-dacplus.dtbo
    -rwxr-xr-x 1 root root 1358 May 17 06:31 /flash/overlays/hifiberry-dacplus.dtbo

    Also please post full logs and better use a paste site for this and then just post the URL:

    Code
    LibreELEC:~ # vcdbg log msg 2>&1 | paste

    so long,

    Hias

    Hi John,

    first of all thanks for your feedback!


    The following might be better placed in a different sub-forum:
    One thing I'm confused about is whether I should be able to use the setup to play back audio from remote devices using BT (eg. iPod).

    If I understand you right you'll need the RPi to do 2 things:

    • Act as a bluetooth audio sink (receiver)
    • Mix the received bluetooth audio stream into the ALSA output


    I think the latter could be possible with some pulseaudio configuration, maybe the former as well.

    But as I have zero knowledge about both bluetooth and pulseaudio I think it'd be better to ask that question in the general forum. I'm sure there are some experts around who can answer if and how that can be done.

    so long,

    Hias

    These are unofficial / community builds for the Raspberry Pi with support for the Wolfson Audio Card and Cirrus Logic Audio Card from element14.

    Lastest builds and detailled installation/configuration instructions are available on my website.

    Here are direct links to builds based on the LE 7.0.1 release:
    7.0.1 build for original RPi
    7.0.1 build for RPi2/3

    The source code of these builds is available in my LibreELEC github repository.

    Quick first-time installation instructions:

    • First install an official LibreELEC RPi build
    • Download the Wolfson/Cirrus build and do a manual update (copy the tar file to the Update share or to /storage/.update/ on the command line and reboot)
    • After reboot add the following line to /flash/config.txt
      Code
      dtoverlay=rpi-cirrus-wm5102
    • Reboot again to activate the config change
    • Go to Kodi system settings and change the audio output device to ALSA (snd_rpi_wsp S/PDIF)


    Upgrading from OpenELEC 6.x:

    A manual update with the tar file should work just fine but can't be 100% guaranteed - better make a backup of your SD card in case something goes wrong.

    If the sound card no longer works check if you have the correct dtoverlay line in config.txt. In OpenELEC builds using "dtoverlay=rpi-cirrus-wm5102-overlay" (note the additional "-overlay" at the end) worked, too, but that's no longer the case with the current kernel versions. In that case remove the "-overlay" at the end, reboot and you should be fine again.

    so long,

    Hias