I’ve been working on snapping TVHeadend. This service interacts with hardware under the /dev/dvb directory for TV Capture cards (at least in Europe - I don’t know if the US ATSC cards have a different dev namespace). Specifically it needs write access to /dev/dvb/adapter<n>/frontend<i> where n and i are numbers indicating the adapter and frontend on the adapter to allow for multiple cards and multiple tuners per card.
Also needed is read access to /dev/dvb/adapter<n>/dvr<i> and write access to /dev/dvb/adapter<n>/demux<i>.
I’m not sure I quite understand what you mean by “transitional” interface. Are you expecting DVB hardware to cease to exist and thus the interface to go away naturally when that happens?
It sounds good to have an interface to handle this, but I’m also not sure I understand what transitional means in this case.
The dvb name doesn’t sound so great for this, though. Few will be able to tell what that means without searching for it. Something like “video-broadcasting” might be more friendly.
This also makes me want to have aliases for interfaces, so that those that know the underlying name can use it.
That’s an idea. There are other broadcast methods in use and so I guess they’re likely to use different device files. I’m primarily aware that in North America the broadcast mechanism is ATSC instead of DVB, though I don’t know how an appropriate adapter is exposed by the Linux kernel.
“optical-drive” is considered transitional because it uses glob rules for assigning all optical drives to the snap, rather than assigning specific devices to the snap.
Similarly, “dvb” would be transitional with glob rules instead of assigning specific TV cards, etc.
I was trying to think that through and came up with “dvb” since, in my mind, we would only allow the dvb interfaces. This is in an effort to sidestep the fact that some video broadcasting devices show up with v4l, which is already allowed by the ‘camera’ transitional interface (again, transitional because of glob rules rather than per-device assignment). If we name it “video-broadcasting”, or similar, I think we would also need to allow the v4l devices as per https://www.linuxtv.org/wiki/index.php/Device_nodes_and_character_devices. We would then have overlap of /dev/video* rules via two interfaces, which if these are transitional interfaces is perhaps ok, but with some future per-device/per-snap assignment, we wouldn’t want.
Regarding the name, I suggest to use the official one if just dvb is too short: digital-video-broadcasting
If this was not a transitional interface, who would assign names? The DVB device often come with USB interface, so they can be plugged in any time. The typical use case is a Ubuntu Core device with tvheadend acting as a SatIP server.
my usecase is kodi and vdr and i’d appreciate if we could simply start out with a /dev/dvb* only interface (i have quite a bunch of dvb cards here and have not seen any that actually create /dev/video* … but then thats only by european standards, perhaps it is required for cards in other regions).
after all the camera interface already provides access to /dev/video* and other v4l related devices so if people want/need that they can use a combination of these two interfaces.
the other devices mentioned in the document above (teletext, radio and vbi) could even have their own separate interfaces given how specific their respective tasks are.
And there is one more thing: DVB supports transport of network packages. The relevant device file is /dev/dvb/adapter<x>/net<y>. Should this be a separate interface?
In principle we could have dvb-video and dvb-network, since the use case is a different one.
I don’t think an IR input should be included in the DVB interface specification because it is orthogonal despite being provided by the same device. IR input, if it is not covered via standard keyboard semantics should be a separate additional interface.
Sorry for taking a while to get to it. Our review queue was unreasonable due to parallel activities, but we’re now getting it back to sane levels. This PR is unblocked, we have a suggested name, and should get a review from @jdstrand shortly so that it can go in.
I noticed a mention of atsc tuners in the initial post. I use pcie devices. HVR-1250’s. I’ve never been able to make them work with TvHeadend. They just are not seen by TvHeadend. I can see them in /dev/dvb/adapterX. They also function correctly in Mythtv so I know they work. I have the snap installed. Inside the TV adapters tab I can see a folder labeled TV adapters. It is unresponsive to clicks. Is this where I should be able to configure the hardware device?