bas-t / descrambler

Standalone version of FFdecsawrapper
GNU General Public License v3.0
7 stars 11 forks source link

TBS6981, Device or resource busy #12

Closed erkswede closed 7 years ago

erkswede commented 7 years ago

Hello First, many thanks for all your work on descrambler and dvbloopback! Awsome!

I'm having a problem with myth getting:

mythbackend: mythbackend[19224]: W CoreContext recorders/dvbchannel.cpp:245 (Open) DVBChan[3](/dev/dvb/adapter4/frontend1): Opening DVB frontend device failed.#012#011#011#011eno: Device or resource busy (16)
Aug 30 12:00:46 eddie mythbackend: mythbackend[19224]: W CoreContext recorders/dvbchannel.cpp:245 (Open) DVBChan[4](/dev/dvb/adapter5/frontend1): Opening DVB frontend device failed.#012#011#011#011eno: Device or resource busy (16)

in mythbackend.log.

My setup is Ubuntu 16.04, kernel 4.4.0-92 and a TBS6981 dual tuner card. I have run your script: ./configure --drivers=no --headers=yes and it seems to run without problems. Modules dvbloopback loads fine and ffdecsawrapper starts and seems to be running ok connecting to oscam.

Hardware is running ok on Ubuntu 12.04 with sasc-ng, so there is no hardware problem.

I'm a bit uncertain if it was the right way to run your configure script? Maybe I missed a patch or something?

Or perhaps I have misunderstood which driver I need for this to work? The card seems to be supported by the kernel as i could see the module cx23885 loaded after upgrading to 16.04.

Any help/pointers would be greatly appreciated.

bas-t commented 7 years ago

Did you try to tune to FTA channels without using descrambler or dvbloopback?

erkswede commented 7 years ago

I couldn't tune anything, not even go through the mythtv setup process. With descrambler stopped FTA channels worked fine.

However, I read up on another issue in here and I decide to use the closed source drivers from TBS and your other repo https://github.com/bas-t/tbs-dvbloopback instead. This worked out of the box but broke support for my older FireDTV (DVB-T) adapters with dmesg saying something like "Driver 'Firedtv' needs updating - please use bus_type methods...". I can however live without these adapters especially now that multi recording seems to work with descrambler :D

Unless you wan't to dig into the FireDTV-problem or feel the need to get the TBS6981 working with the stock-kernel-drivers (let me know if you want me to assist/test) this issue can be closed now.

And again, thanks a bunch for your hard work :1st_place_medal:

bas-t commented 7 years ago

So it's a driver problem. I'm not going to backport the FireDTV driver to the ancient official TBS tree. Closing.

bas-t commented 7 years ago

This:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/drivers/base/driver.c?h=v3.10.107&id=f48f3febb2cbfd0f2ecee7690835ba745c1034a4

causes your FireDTV troubles. Afaik, it boiles down to driver registration failing. Comparing the driver from linux-4.4.86 with the one in the TBS stack, I could only find a small diff that I could relate to the registration.

It is now in a testing branch from https://github.com/bas-t/tbs-dvbloopback so if you feell lucky you can test it.

https://github.com/bas-t/tbs-dvbloopback/blob/temp/firedtv.patch

Use the temp branch and compile with ./configure --firedtv=yes

Good luck!

erkswede commented 7 years ago

Thanks for effort but there is no change. I get this in dmesg (which I believe is the same as before):

[ 14.242810] Driver 'firedtv' needs updating - please use bus_type methods [ 14.242842] BUG: unable to handle kernel NULL pointer dereference at (null) [ 14.243005] IP: [< (null)>] (null) [ 14.243099] PGD d9e58067 PUD 0 [ 14.243175] Oops: 0010 [#1] SMP [ 14.243255] Modules linked in: firedtv(OE+) dvb_core(OE) rc_core(OE) videodev(OE) v4l2_compat_ioctl32(OE) serio_raw lpc_ich i5000_edac edac_core i5k_amb shpchp floppy(+) 8250_fintek mac_hid nfsd auth_rpcgss nfs_acl lockd grace sunrpc parport_pc ppdev lp parport autofs4 amdkfd amd_iommu_v2 radeon i2c_algo_bit ttm drm_kms_helper psmouse syscopyarea sysfillrect sysimgblt fb_sys_fops drm pata_acpi firewire_ohci tg3 firewire_core crc_itu_t ptp pps_core fjes [ 14.244629] CPU: 1 PID: 357 Comm: systemd-udevd Tainted: G OE 4.4.0-93-generic #116-Ubuntu [ 14.244768] Hardware name: Dell Inc. PowerEdge SC1430/0UW816, BIOS 1.4.0 08/06/2007 [ 14.244891] task: ffff8800d98a0000 ti: ffff8800d9e60000 task.ti: ffff8800d9e60000 [ 14.245008] RIP: 0010:[<0000000000000000>] [< (null)>] (null) [ 14.245038] RSP: 0018:ffff8800d9e63b60 EFLAGS: 00010286 [ 14.245038] RAX: ffffffffc045a320 RBX: ffff880211eec400 RCX: 000000000000000f [ 14.245038] RDX: 000000000000000f RSI: ffffffffc045a320 RDI: ffff880211eec400 [ 14.245038] RBP: ffff8800d9e63b78 R08: 000000000000a02d R09: 0000000000000025 [ 14.245038] R10: ffffea0008552c00 R11: 0000000000000014 R12: 0000000000000000 [ 14.245038] R13: ffffffffc045b0a0 R14: 0000000000000012 R15: ffff880211d2cd20 [ 14.245038] FS: 00007f5e172dd8c0(0000) GS:ffff88021fc40000(0000) knlGS:0000000000000000 [ 14.245038] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 14.245038] CR2: 0000000000000000 CR3: 00000000d9e57000 CR4: 00000000000006e0 [ 14.245038] Stack: [ 14.245038] ffffffffc0046128 ffff880211eec400 0000000000000000 ffff8800d9e63ba8 [ 14.245038] ffffffff81563a62 ffff880211eec400 ffffffffc045b0a0 ffff880211eec460 [ 14.245038] ffffffffc004c380 ffff8800d9e63bd0 ffffffff81563d64 0000000000000000 [ 14.245038] Call Trace: [ 14.245038] [] ? fw_unit_probe+0x28/0x30 [firewire_core] [ 14.245038] [] driver_probe_device+0x222/0x4a0 [ 14.245038] [] __driver_attach+0x84/0x90 [ 14.245038] [] ? driver_probe_device+0x4a0/0x4a0 [ 14.245038] [] bus_for_each_dev+0x6c/0xc0 [ 14.245038] [] driver_attach+0x1e/0x20 [ 14.245038] [] bus_add_driver+0x1eb/0x280 [ 14.245038] [] ? 0xffffffffc04c3000 [ 14.245038] [] driver_register+0x60/0xe0 [ 14.245038] [] fdtv_init+0x2a/0x1000 [firedtv] [ 14.245038] [] do_one_initcall+0xb3/0x200 [ 14.245038] [] ? kmem_cache_alloc_trace+0x183/0x1f0 [ 14.245038] [] do_init_module+0x5f/0x1cf [ 14.245038] [] load_module+0x166f/0x1c10 [ 14.245038] [] ? __symbol_put+0x60/0x60 [ 14.245038] [] ? kernel_read+0x50/0x80 [ 14.245038] [] SYSC_finit_module+0xb4/0xe0 [ 14.245038] [] SyS_finit_module+0xe/0x10 [ 14.245038] [] entry_SYSCALL_64_fastpath+0x16/0x71 [ 14.245038] Code: Bad RIP value. [ 14.245038] RIP [< (null)>] (null) [ 14.245038] RSP [ 14.245038] CR2: 0000000000000000 [ 14.394825] ---[ end trace 50b79e52f8fafee2 ]---

bas-t commented 7 years ago

The thing is, it's like a needle in a haystack that I'm searching for. The TBS media stack is afaik mostly, but with mods, from a 2.6.22 kernel (or so). Previously I've been trying to backport another driver to this stack, without success, while I was very well able to backport it from 4.0.x to 3.10.x and upwards From your dmesg I get that at least net init is also wrong. I'm giving up, sorry.

erkswede commented 7 years ago

No problem. I'll just load the FireDTV's in a clay pigeon thrower to put them out of their misery. :grin: Thanks for your effort. :thumbsup:

bas-t commented 7 years ago

Nice touch.👍 I'd like to see that happen on youtube.

Oh, please add to chart: the orange dude with the big mouth!