Finaly... I've got a solution. see below. I'll explain what I've tried before.
Because the touch works, but the data was wrong, I took the image of Waveshare here: Waveshare 5inch HDMI LCD
then configured everything under X11 and got an interesting result 99-calibration.conf after install:
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "Calibration" "208 3905 288 3910"
Option "SwapAxes" "0"
EndSection
The basic setup was quite good with these parameters in the config.txt at the image from waveshare,
dtparam=i2c_arm=on
dtparam=spi=on
enable_uart=1
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
but I had to calibrate so that I could use the touch exactly.
The values of the calibration may be informative. This is 99-calibration.conf after first calibration:
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "MinX" "2048"
Option "MaxX" "63651"
Option "MinY" "2617"
Option "MaxY" "64147"
Option "SwapXY" "0" # unless it was already set to 1
Option "InvertX" "0" # unless it was already set
Option "InvertY" "0" # unless it was already set
EndSection
Display More
Funny thing is that with each calibration different values have come and I could bring it at least with four attempts to no exact functioning touch. Other results of calibration:
Section "InputClass"
Identifier "calibration"
MatchProduct "ADS7846 Touchscreen"
Option "MinX" "1768"
Option "MaxX" "63644"
Option "MinY" "3186"
Option "MaxY" "63442"
Option "SwapXY" "0" # unless it was already set to 1
Option "InvertX" "0" # unless it was already set
Option "InvertY" "0" # unless it was already set
EndSection
Display More
I thought to use these values above in a config file for service.touchscreen/pointercal, but since I have none and their structure does not know, I have rejected that.
Back to the Libreelec I took the config.txt settings from the image of Waveshare and then tried again with the advancedsettings.xml.
Now it has worked so far successful that I have a perfectly calibrated touch under Kodi. The calibration from the addon still does not work because of the offset.
This is the config.txt:
################################################################################
# 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
max_usb_current=1
###############################################################################
## LIRC
###############################################################################
dtoverlay=lirc-rpi,gpio_in_pin=26
###############################################################################
# Uncomment some or all of these to enable the optional hardware interfaces
##############################################################################
dtparam=i2c_arm=on
# dtparam=i2s=on
dtparam=spi=on
# enable_uart=1
# enable_camera=1
# Additional overlays and parameters are documented /boot/overlays/README
# Enable audio (loads snd_bcm2835)
# dtparam=audio=on
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
# dtoverlay=ads7846,cs=1,penirq=25,penirq_pull=2,speed=50000,keep_vref_on=0,swapxy=0,pmax=255,xohms=150,xmin=200,xmax=3900,ymin=200,ymax=3900
hdmi_blanking=1
Display More
and this the advancedsettings.xml I found these parameters here: Waveshare 5 Inch Touchscreen funktioniert unter Kodi nicht richtig
<advancedsettings>
<touchscreen>
<x_offset>-32</x_offset>
<y_offset>-35</y_offset>
<x_stretch_factor>0.209</x_stretch_factor>
<y_stretch_factor>0.131</y_stretch_factor>
</touchscreen>
</advancedsettings>
If you get me the structure of the pointercal of you, I can test it, whether it works without advancedsettings.xml.
Thanks again for your support vpeter!