Project

General

Profile

Bug #643

dynamite-plugin seems to be incompatible adapter switch of vdr (-D0 -D 1 ..)

Added by fnu over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
-
Start date:
05/14/2011
Due date:
% Done:

100%


Description

I had a hardtime after installation of developer yaVDR 0.4, where dynamite plugin has been enabled by default.

Since I have 2 cords to a LNB, but a builtin 4 tuner dvb card (CineS2 & FlexS2 - ngene), I need to start vdr w/ "-D0 -D2". After installation vdr was pretty unstable, within discussions with the team, I tried several workarounds, but nothing did help. After while I figured out, that dynamite did enable the to other 2 tuners of the CineS2, the one I wouldn't use, because of the missing LNB connection. And for the worse, vdr did try to tune on these adapters, which ended always in a vdr crash, if I did try to switch to channel which resists in this moment on of thes adapters ...

History

#1 Updated by lhanisch over 9 years ago

  • Assignee set to lhanisch
  • % Done changed from 0 to 90

Yes, that's right, the "-D" switch will have no effect since it doesn't make sense. The order of the (usb-)dvbadapters may vary if you plug them in a different order. Of course this won't apply to PCI/PCIe installations and we could argue about that... :-)

dynamite supports some udev-properties and one of them will keep dynamite from attaching the dvbadapter.

ACTION=="add", SUBSYSTEM=="dvb", ENV{DVB_DEVICE_TYPE}=="frontend", /* insert identification info like PCI-id etc. here */, ENV{dynamite_attach}="no" 

Also, making "holes" in the adapter numbering (adapter0, adapter1, adapter5, adapter6) won't prevent dynamite from attaching adapter5 and 6, since it enumerates the adapters via udev. vanilla vdr would only find adapter0 and 1.

Lars.

#2 Updated by fnu over 9 years ago

Yes, that's right, the "-D" switch will have no effect since it doesn't make sense.
Of course this won't apply to PCI/PCIe installations and we could argue about that.

Well, if you assume that a VDR is operated only with USB sticks, commonly in DVB-C/T environments, you may be right. But I would say, the majority of installation is DVB-S(2) w/ PCI/PCI-E cards and there are so many layouts possible, mostly centric to a specific point in the living area, that software should better follow the hardware in this case. Restrictions of any kind will cause more discussions than the bunch of possible layouts.

dynamite supports some udev-properties and one of them will keep dynamite from attaching the dvbadapter.

Ok, I'll try this. I guess /* insert identification info like PCI-id etc. here */ should be in place within quotation marks here?

Also, making "holes" in the adapter numbering ...

Holes has been needed, since CineS2 & FlexS2 are two seperate PCBs connected due a flat cable. To assure functionality of both boards, I did connect one tuner of each to my two LNB cords.

Regards
Frank

#3 Updated by fnu over 9 years ago

Ok, I tried:

###

cat /etc/udev/rules.d/41-dynamite-prevent.rules
ACTION=="add", SUBSYSTEM=="dvb", ENV{DVB_DEVICE_TYPE}=="frontend", KERNEL=="0000:02:00.0", ENV{dynamite_attach}="no"

###

but didn't work, since I'm honestly not the udev guru .... ;-)

Device is: "02:00.0 Multimedia video controller: Micronas Semiconductor Holding AG Device 0720 (rev 01)"

Regards
Frank

#4 Updated by fnu over 9 years ago

Fixed with this udev rule:

===

cat /etc/udev/rules.d/41-dynamite-prevent.rules
ACTION=="add", SUBSYSTEM=="dvb", ENV{DVB_DEVICE_TYPE}=="frontend", KERNEL=="dvb13.frontend0", ENV{dynamite_attach}="no"

===

No need to set vdr starting parameter "-D 0 -D 2", dynamite does this job by itself obviously.

Regards
Frank

#5 Updated by fnu over 9 years ago

Sorry for the bad format in last post, this looks better:

cat /etc/udev/rules.d/41-dynamite-prevent.rules
ACTION=="add", SUBSYSTEM=="dvb", ENV{DVB_DEVICE_TYPE}=="frontend", KERNEL=="dvb[13].frontend0", ENV{dynamite_attach}="no"

#6 Updated by lhanisch over 9 years ago

I'm no udev guru, too... :-)

After a quick Google search1 I would try

ACTION=="add", SUBSYSTEM=="dvb", ENV{DVB_DEVICE_TYPE}=="frontend", ID=="0000:02:00.0", ENV{dynamite_attach}="no" 

Also a

udevadm info --query=all --name=/dev/dvb/adapter0/frontend0

will give you some info, esp. the "0000:" prefix of your pci slot (if it's the same as mine...).

My first dvbcard:

lars@vdr:~$ udevadm info --query=all --name=/dev/dvb/adapter0/frontend0
P: /devices/pci0000:00/0000:00:09.0/dvb/dvb0.frontend0
N: dvb/adapter0/frontend0
S: char/212:3
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:09.0/dvb/dvb0.frontend0
E: MAJOR=212
E: MINOR=3
E: DEVNAME=/dev/dvb/adapter0/frontend0
E: DVB_ADAPTER_NUM=0
E: DVB_DEVICE_TYPE=frontend
E: DVB_DEVICE_NUM=0
E: SUBSYSTEM=dvb
E: ACL_MANAGE=1
E: DEVLINKS=/dev/char/212:3

My ID would be "0000:00:09.0".

This is independent of the dvb numbering.

Lars.
[1] http://forum.ubuntuusers.de/post/2768902/ (plus the three following posts)

#7 Updated by fnu over 9 years ago

Nope, due to documention "ID==" is superseeded by "KERNELS==", not just "KERNEL==" as I did understood.

This rule does run perfect:

ACTION=="add", SUBSYSTEM=="dvb", ENV{DVB_DEVICE_TYPE}=="frontend", KERNELS=="0000:02:00.0", ENV{dynamite_attach}="no"

a bit to perfect, it does disable the hole adapter for VDR ... ;-)

May 16 21:33:36 vdr2 vdr: [1492] dynamite: probing /dev/dvb/adapter0/frontend0
May 16 21:33:36 vdr2 vdr: [1492] dynamite: probing /dev/dvb/adapter1/frontend0
May 16 21:33:36 vdr2 vdr: [1492] dynamite: probing /dev/dvb/adapter2/frontend0
May 16 21:33:36 vdr2 vdr: [1492] dynamite: probing /dev/dvb/adapter3/frontend0
May 16 21:33:36 vdr2 vdr: [1492] dynamite: udev says don't attach /dev/dvb/adapter0/frontend0
May 16 21:33:36 vdr2 vdr: [1492] dynamite: udev says don't attach /dev/dvb/adapter1/frontend0
May 16 21:33:36 vdr2 vdr: [1492] dynamite: udev says don't attach /dev/dvb/adapter2/frontend0
May 16 21:33:36 vdr2 vdr: [1492] dynamite: udev says don't attach /dev/dvb/adapter3/frontend0

But issue is somewhat solved se above ...

Regards
Frank

#8 Updated by lhanisch over 9 years ago

  • Status changed from New to Closed
  • % Done changed from 90 to 100

Thanks for clarification. I hope you find some fine tuning to disable only the frontends you want. :-)

Then I will close this issue, but will reopen it if needed...

See you,
Lars.

#9 Updated by fnu over 9 years ago

Thanks for clarification. I hope you find some fine tuning to disable only the frontends you want. :-)

Lars, we found it already, please see post #4 & #5 within in this thread.

Regards
Frank

#10 Updated by lhanisch over 9 years ago

Lars, we found it already, please see post #4 & #5 within in this thread.

I know, but it wouldn't satisfy me since it depends on the dvb-numbering... But I'm too unaware of all the udev variables so I couldn't propose another solution.
But if it works for you I'm happy. ;-)

Lars.

#11 Updated by fnu over 9 years ago

but it wouldn't satisfy me since it depends on the dvb-numbering...

Well, it is a solution, I didn't say anywhere it does satisfy me. But what more generic approach should I use? If I use PCI-ID, device name etc. rather than explicitly adapter/frontend, I'll always disable the whole adapter for VDR, not more not less.

Dynamite does eliminate VDR origin more or less generic options "-D x", whereas it is with 4 single cards sometimes a bit of a gamble. So, the generic approach would be to provide a similar option within dynamite plugin as substitution. I won't be the last user, who wants to use Y out of X DVB tuners, while dynamite is enable as plugin.

This is by the way a good example, what I wanted to discuss in my thread in vdr-portal.de, regarding alignment of functions competing for DVB devices ... ;)

Regards
Frank

#12 Updated by lhanisch over 9 years ago

Well, it is a solution, I didn't say anywhere it does satisfy me. But what more generic approach should I use? If I use PCI-ID, device name etc. rather than explicitly adapter/frontend, I'll always disable the whole adapter for VDR, not more not less.

What reports

udevadm info --query=all --name=/dev/dvb/adapter0/frontend0

for every frontend? Perhaps we will find there something to separate them...

Dynamite does eliminate VDR origin more or less generic options "-D x", whereas it is with 4 single cards sometimes a bit of a gamble. So, the generic approach would be to provide a similar option within dynamite plugin as substitution. I won't be the last user, who wants to use Y out of X DVB tuners, while dynamite is enable as plugin.

Ok, I will think about this.

This is by the way a good example, what I wanted to discuss in my thread in vdr-portal.de, regarding alignment of functions competing for DVB devices ... ;)

But it's a (missing) feature of dynamite, the other patches don't touch this. And I tried to start the discussion with the configuration of LNB-sharing via udev... I think we two should work on a solution and present it at the portal so it can be discussed.

Do you think udev is the right way? Are there other possibilities? My knowledge of the Linux boot process and hardware configuration is somewhat limited as is my sparetime at the moment. :) Only a few weeks left then my life should return to normality...

Lars.

Also available in: Atom PDF