ljalves / linux_media

TBS linux open source drivers
https://github.com/ljalves/linux_media/wiki
Other
89 stars 150 forks source link

TBS6984: TBS 6984 frontend 0 doesn't seem to have a isl6422b on the i2c bus #143

Open tonhead opened 7 years ago

tonhead commented 7 years ago

Hi,

My problem seems to be similar in many respects to issue #3 posted by jendik which has now been closed.

I have previously (up until about a week ago) had my TBS6984 v20 card working with a Mythbuntu installation based on Ubuntu 14.04 and Linux Kernel 3.13.0-43-generic. This was using the TBS closed-source drivers.

However, due to a blown PC PSU which corrupted the drive (which then failed to boot) I decided to take the plunge of reinstalling the latest 16.04 based mythbuntu on a SSD and try these open-source drivers. Since doing this I have been unable to get the card tuners working correctly, even after subsequently trying both the TBS official open-source drivers and finally the TBS closed-source drivers.

A symptom reported by these drivers (and incidentally the TBS open source drivers too) is that the frontends do not seem to have a isl6422b on the 12c bus.

Some more info:

dmesg | grep -Ei '(cx|saa|firmware|i2c)'

[    0.203265] pci 0000:00:00.0: [Firmware Bug]: reg 0x1c: invalid BAR (can't size)
[    2.489263] i2c /dev entries driver
                026a8a36fed7af47bc7acbbebf0f3174024f6ccf stv0910: Fix gate_ctrl exit path on i2c errors
[   14.281303] DVB: registering new adapter (SAA716x dvb adapter)
[   17.896098] cx24117 1-0055: creating new instance
[   17.896108] i2c i2c-1: cx24117: Attaching frontend 0
[   17.907202] SAA716x Budget 0000:02:00.0: TurboSight TBS 6984 frontend 0 doesn't seem to have a isl6422b on the i2c bus.
[   17.907940] SAA716x Budget 0000:02:00.0: DVB: registering adapter 0 frontend 0 (Conexant CX24117/CX24132)...
[   17.910095] DVB: registering new adapter (SAA716x dvb adapter)
[   17.910695] cx24117 1-0055: attaching existing instance
[   17.910701] i2c i2c-1: cx24117: Attaching frontend 1
[   17.921009] SAA716x Budget 0000:02:00.0: TurboSight TBS 6984 frontend 1 doesn't seem to have a isl6422b on the i2c bus.
[   17.921810] SAA716x Budget 0000:02:00.0: DVB: registering adapter 1 frontend 0 (Conexant CX24117/CX24132)...
[   17.922101] DVB: registering new adapter (SAA716x dvb adapter)
[   17.922779] cx24117 0-0005: creating new instance
[   17.922785] i2c i2c-0: cx24117: Attaching frontend 0
[   17.933107] SAA716x Budget 0000:02:00.0: TurboSight TBS 6984 frontend 2 doesn't seem to have a isl6422b on the i2c bus.
[   17.933982] SAA716x Budget 0000:02:00.0: DVB: registering adapter 2 frontend 0 (Conexant CX24117/CX24132)...
[   17.934272] DVB: registering new adapter (SAA716x dvb adapter)
[   17.934999] cx24117 0-0005: attaching existing instance
[   17.935004] i2c i2c-0: cx24117: Attaching frontend 1
[   17.945679] SAA716x Budget 0000:02:00.0: TurboSight TBS 6984 frontend 3 doesn't seem to have a isl6422b on the i2c bus.
[   17.955782] SAA716x Budget 0000:02:00.0: DVB: registering adapter 3 frontend 0 (Conexant CX24117/CX24132)...
[   20.791188] i2c i2c-1: cx24117_load_firmware: FW version 1.44.95.2
[   20.791205] i2c i2c-1: cx24117_firmware_ondemand: Firmware upload complete
[   25.853992] i2c i2c-0: cx24117_load_firmware: FW version 1.44.95.2
[   25.854009] i2c i2c-0: cx24117_firmware_ondemand: Firmware upload complete

uname -a:

Linux MythPVR 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

I have created 3 separate config files with the same content:

cat /etc/modprobe.d/options-dvb.conf cat /etc/modprobe.d/saa716x_budget.conf cat /etc/modprobe.d/tbs.conf

#original drivers
options saa716x_tbs-dvb int_type=1

#alternative drivers
options saa716x_budget int_type=1

lspci | grep -i saa

02:00.0 Multimedia controller: Philips Semiconductors SAA7160 (rev 02)

sudo lsmod:

Module                  Size  Used by
isl6422                16384  0
nvidia_uvm            696320  0
nvidia_modeset        745472  3
kvm_amd                65536  0
kvm                   540672  1 kvm_amd
irqbypass              16384  1 kvm
serio_raw              16384  0
edac_mce_amd           24576  0
edac_core              53248  0
k8temp                 16384  0
i2c_piix4              24576  0
snd_hda_codec_hdmi     53248  1
input_leds             16384  0
snd_hda_intel          36864  2
snd_hda_codec         135168  2 snd_hda_codec_hdmi,snd_hda_intel
snd_hda_core           73728  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               106496  4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_core
snd_seq_midi           16384  0
snd_seq_midi_event     16384  1 snd_seq_midi
nvidia              10076160  60 nvidia_modeset,nvidia_uvm
snd_rawmidi            32768  1 snd_seq_midi
tpm_infineon           20480  0
snd_seq                69632  2 snd_seq_midi_event,snd_seq_midi
snd_seq_device         16384  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              32768  2 snd_pcm,snd_seq
snd                    81920  13 snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device
8250_fintek            16384  0
drm                   364544  3 nvidia
saa716x_budget         40960  4
tas2101                20480  1 saa716x_budget
cx24117                28672  5 saa716x_budget
saa716x_core           73728  1 saa716x_budget
dvb_core              126976  2 saa716x_core,saa716x_budget
i2c_mux                16384  1 tas2101
mac_hid                16384  0
media                  40960  1 dvb_core
soundcore              16384  1 snd
wmi                    20480  0
shpchp                 36864  0
parport_pc             32768  1
nfsd                  319488  13
ppdev                  20480  0
auth_rpcgss            61440  1 nfsd
nfs_acl                16384  1 nfsd
lockd                  94208  1 nfsd
lp                     20480  0
grace                  16384  2 nfsd,lockd
parport                49152  3 lp,ppdev,parport_pc
sunrpc                335872  18 nfsd,auth_rpcgss,lockd,nfs_acl
autofs4                40960  2
pata_acpi              16384  0
hid_generic            16384  0
usbhid                 49152  0
hid                   118784  2 hid_generic,usbhid
uas                    24576  0
usb_storage            69632  2 uas
pata_atiixp            16384  0
fjes                   28672  0
r8169                  81920  0
mii                    16384  1 r8169
ahci                   36864  5
libahci                32768  1 ahci

I have extracted the dvb-fe-cx24117.fw firmware from the linux closed-source driver (with the correct md5sum) and placed it in /lib/firmware.

I ran the modprobe related commands in the now closed issue from jendik:

Please load the isl6422 module with option verbose=5 like this:

(clear dmesg and go to media_build dir) sudo dmesg -c sudo make rmmod sudo modprobe isl6422 verbose=5 sudo modprobe saa716x_budget int_type=1 (copy and pastebin dmesg output)

...but there was no dmesg contents created from the calls! The output from the rmmod call is below though:

make -C /home/glenn/Desktop/media_build/v4l rmmod
make[1]: Entering directory '/home/glenn/Desktop/media_build/v4l'
scripts/rmmod.pl unload
found 649 modules
/sbin/rmmod dvb_core
Pulseaudio is running with UUID(s): 1000
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module dvb_core is in use by: saa716x_core saa716x_budget
/sbin/rmmod saa716x_budget
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module saa716x_budget is in use
/sbin/rmmod saa716x_core
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module saa716x_core is in use by: saa716x_budget
/sbin/rmmod dvb_core
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module dvb_core is in use by: saa716x_core saa716x_budget
/sbin/rmmod isl6422
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
/sbin/rmmod media
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module media is in use by: dvb_core
/sbin/rmmod cx24117
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module cx24117 is in use by: saa716x_budget
/sbin/rmmod tas2101
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module tas2101 is in use by: saa716x_budget
/sbin/rmmod dvb_core
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module dvb_core is in use by: saa716x_core saa716x_budget
/sbin/rmmod saa716x_budget
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module saa716x_budget is in use
/sbin/rmmod saa716x_core
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module saa716x_core is in use by: saa716x_budget
/sbin/rmmod dvb_core
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module dvb_core is in use by: saa716x_core saa716x_budget
/sbin/rmmod media
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module media is in use by: dvb_core
/sbin/rmmod cx24117
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module cx24117 is in use by: saa716x_budget
/sbin/rmmod tas2101
No PulseAudio daemon running, or not running as session daemon.
No PulseAudio daemon running, or not running as session daemon.
rmmod: ERROR: Module tas2101 is in use by: saa716x_budget
Couldn't unload: tas2101 cx24117 media dvb_core saa716x_core saa716x_budget dvb_core
make[1]: Leaving directory '/home/glenn/Desktop/media_build/v4l'

Any help or guidance you can provide is really appreciated!

Many Thanks in advance.

ljalves commented 7 years ago

This message "TurboSight TBS 6984 frontend 0 doesn't seem to have a isl6422b on the i2c bus." is not an error or issue.

There are at least 2 hardware versions of the TBS6984. One with the isl6422b and another without. That message just informs that yours does't have it...

tonhead commented 7 years ago

Thanks for the quick reply.

Is there any particular further log information I can provide then to help establish the cause of my non-working adapters? MythTV reports an error with the card so I am unable to scan for channels.

Thanks.

ljalves commented 7 years ago

"Pulseaudio" is blocking rmmod to succeed. If the modprobe doesn't produce output in kern.log or dmesg then ir means that the module was still loaded. Stop pulseaudio service and retry rmmod, or just do a reboot If after a reboot it still doesn't work, paste dmesg (better to use a paste service - like pastebin.com)

tonhead commented 7 years ago

Thanks for the advice!

I finally had to completely uninstall pulseaudio after I still couldn't get rid of a Pulseaudio rmodule reference with a blank UUID!?

Anyway after doing this I was finally able to run sudo make rmmod twice to remove all of the modules, followed by the modprobe commands.

The relevant output from dmesg is:-

[  308.539432] WARNING: You are using an experimental version of the media stack.
                As the driver is backported to an older kernel, it doesn't offer
                enough quality for its usage in production.
                Use it with care.
               Latest git patches (needed if you report a bug to linux-media@vger.kernel.org):
                026a8a36fed7af47bc7acbbebf0f3174024f6ccf stv0910: Fix gate_ctrl exit path on i2c errors
[  308.564614] DVB: registering new adapter (SAA716x dvb adapter)
[  312.068071] cx24117 1-0055: creating new instance
[  312.068089] i2c i2c-1: cx24117: Attaching frontend 0
[  312.068109] isl6422_write: write reg 45
[  312.073315] isl6422_write: I/O error <-5>
[  312.073320] isl6422_set_current: I/O error <-5>
[  312.073334] SAA716x Budget 0000:02:00.0: TurboSight TBS 6984 frontend 0 doesn't seem to have a isl6422b on the i2c bus.
[  312.073345] SAA716x Budget 0000:02:00.0: DVB: registering adapter 0 frontend 0 (Conexant CX24117/CX24132)...

Frontends 1 - 3 had similar output.

This looks very similar to the errors hrodenburg posted on 13th Jan 2014 for issue #3

Full dmesg output at http://pastebin.com/AvyfAK4s

Thanks for your continued help and time!

ljalves commented 7 years ago

Forget about those errors - It's a non-issue.

Can you provide dmesg after trying to play a channel? (I want to see the firmware loading messages)

tonhead commented 7 years ago

I'll give this a go tomorrow night and post the results thanks.

tonhead commented 7 years ago

I don't have any channels to play yet as I unable to scan for them in MythTV due to the non-working adapters.

I therefore tried a channel scan using:

scan -x0 /usr/share/dvb/dvb-s/Astra-28.2E | tee channels.conf

with dmesg output:

[  336.842344] i2c i2c-1: cx24117_load_firmware: FW version 1.44.95.2
[  336.842370] i2c i2c-1: cx24117_firmware_ondemand: Firmware upload complete

on then reinstalling mythtv and all of its dependencies I received a very slightly different dmesg output:

[ 1173.193961] i2c i2c-0: cx24117_load_firmware: FW version 1.44.95.2
[ 1173.193976] i2c i2c-0: cx24117_firmware_ondemand: Firmware upload complete

The downside to this is that I am again now unable to remove the modules due to their inter-dependencies, including the UUID-less Pulseaudio module:

scripts/rmmod.pl unload
found 649 modules
/sbin/rmmod dvb_core
Pulseaudio is running with UUID(s):
rmmod: ERROR: Module dvb_core is in use by: saa716x_core saa716x_budget
/sbin/rmmod saa716x_budget
...
...

Is this of any use in understanding my problem?

Many Thanks!