* [PATCHv2 1/9] media: Fix DVB representation at media controller API [not found] <cover.1420294938.git.mchehab@osg.samsung.com> @ 2015-01-03 14:49 ` Mauro Carvalho Chehab [not found] ` <ea1dd8e443b34e2047468866ec423d4334f54eba.1420294938.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> [not found] ` <cover.1420294938.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: Mauro Carvalho Chehab @ 2015-01-03 14:49 UTC (permalink / raw) To: Laurent Pinchart Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Mauro Carvalho Chehab, linux-api The DVB devices are identified via a (major, minor) tuple, and not by a random id. Fix it, before we start using it. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> diff --git a/include/media/media-entity.h b/include/media/media-entity.h index e00459185d20..de333cc8261b 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -97,7 +97,10 @@ struct media_entity { u32 device; u32 subdevice; } alsa; - int dvb; + struct { + u32 major; + u32 minor; + } dvb; /* Sub-device specifications */ /* Nothing needed yet */ diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h index d847c760e8f0..7902e800f019 100644 --- a/include/uapi/linux/media.h +++ b/include/uapi/linux/media.h @@ -27,7 +27,7 @@ #include <linux/types.h> #include <linux/version.h> -#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) +#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 1) struct media_device_info { char driver[16]; @@ -88,7 +88,10 @@ struct media_entity_desc { __u32 device; __u32 subdevice; } alsa; - int dvb; + struct { + __u32 major; + __u32 minor; + } dvb; /* Sub-device specifications */ /* Nothing needed yet */ -- 2.1.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <ea1dd8e443b34e2047468866ec423d4334f54eba.1420294938.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>]
* Re: [PATCHv2 1/9] media: Fix DVB representation at media controller API [not found] ` <ea1dd8e443b34e2047468866ec423d4334f54eba.1420294938.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> @ 2015-01-11 13:50 ` Laurent Pinchart 2015-01-11 13:58 ` Mauro Carvalho Chehab 0 siblings, 1 reply; 6+ messages in thread From: Laurent Pinchart @ 2015-01-11 13:50 UTC (permalink / raw) To: Mauro Carvalho Chehab Cc: Linux Media Mailing List, Mauro Carvalho Chehab, linux-api-u79uwXL29TY76Z2rM5mHXA Hi Mauro, Thank you for the patch. On Saturday 03 January 2015 12:49:03 Mauro Carvalho Chehab wrote: > The DVB devices are identified via a (major, minor) tuple, > and not by a random id. Fix it, before we start using it. > > Signed-off-by: Mauro Carvalho Chehab <mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> > > diff --git a/include/media/media-entity.h b/include/media/media-entity.h > index e00459185d20..de333cc8261b 100644 > --- a/include/media/media-entity.h > +++ b/include/media/media-entity.h > @@ -97,7 +97,10 @@ struct media_entity { > u32 device; > u32 subdevice; > } alsa; > - int dvb; > + struct { > + u32 major; > + u32 minor; > + } dvb; > > /* Sub-device specifications */ > /* Nothing needed yet */ > diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h > index d847c760e8f0..7902e800f019 100644 > --- a/include/uapi/linux/media.h > +++ b/include/uapi/linux/media.h > @@ -27,7 +27,7 @@ > #include <linux/types.h> > #include <linux/version.h> > > -#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) > +#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 1) > > struct media_device_info { > char driver[16]; > @@ -88,7 +88,10 @@ struct media_entity_desc { > __u32 device; > __u32 subdevice; > } alsa; > - int dvb; > + struct { > + __u32 major; > + __u32 minor; > + } dvb; Won't this break compilation of existing userspace code ? As DVB is not properly supported in MC at the moment we could consider that only mediactl will be affected, so it shouldn't be a big issue. > > /* Sub-device specifications */ > /* Nothing needed yet */ -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCHv2 1/9] media: Fix DVB representation at media controller API 2015-01-11 13:50 ` Laurent Pinchart @ 2015-01-11 13:58 ` Mauro Carvalho Chehab [not found] ` <20150111115824.0e4acdf0-+RedX5hVuTR+urZeOPWqwQ@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Mauro Carvalho Chehab @ 2015-01-11 13:58 UTC (permalink / raw) To: Laurent Pinchart Cc: Linux Media Mailing List, Mauro Carvalho Chehab, linux-api-u79uwXL29TY76Z2rM5mHXA Em Sun, 11 Jan 2015 15:50:04 +0200 Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> escreveu: > Hi Mauro, > > Thank you for the patch. > > On Saturday 03 January 2015 12:49:03 Mauro Carvalho Chehab wrote: > > The DVB devices are identified via a (major, minor) tuple, > > and not by a random id. Fix it, before we start using it. > > > > Signed-off-by: Mauro Carvalho Chehab <mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> > > > > diff --git a/include/media/media-entity.h b/include/media/media-entity.h > > index e00459185d20..de333cc8261b 100644 > > --- a/include/media/media-entity.h > > +++ b/include/media/media-entity.h > > @@ -97,7 +97,10 @@ struct media_entity { > > u32 device; > > u32 subdevice; > > } alsa; > > - int dvb; > > + struct { > > + u32 major; > > + u32 minor; > > + } dvb; > > > > /* Sub-device specifications */ > > /* Nothing needed yet */ > > diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h > > index d847c760e8f0..7902e800f019 100644 > > --- a/include/uapi/linux/media.h > > +++ b/include/uapi/linux/media.h > > @@ -27,7 +27,7 @@ > > #include <linux/types.h> > > #include <linux/version.h> > > > > -#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) > > +#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 1) > > > > struct media_device_info { > > char driver[16]; > > @@ -88,7 +88,10 @@ struct media_entity_desc { > > __u32 device; > > __u32 subdevice; > > } alsa; > > - int dvb; > > + struct { > > + __u32 major; > > + __u32 minor; > > + } dvb; > > Won't this break compilation of existing userspace code ? As DVB is not > properly supported in MC at the moment we could consider that only mediactl > will be affected, so it shouldn't be a big issue. Well, media-ctl uses a local copy of the videodev2.h header, so it won't break. I'm not aware of any other application using MC for DVB. Yet, imagining that such application exists, then, IMHO, it is better to break compilation for it, as probably such application was written for some OOT driver that might be using its own version of the media controller implementation. Regards, Mauro ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20150111115824.0e4acdf0-+RedX5hVuTR+urZeOPWqwQ@public.gmane.org>]
* Re: [PATCHv2 1/9] media: Fix DVB representation at media controller API [not found] ` <20150111115824.0e4acdf0-+RedX5hVuTR+urZeOPWqwQ@public.gmane.org> @ 2015-01-11 14:05 ` Laurent Pinchart 2015-01-11 14:34 ` Mauro Carvalho Chehab 0 siblings, 1 reply; 6+ messages in thread From: Laurent Pinchart @ 2015-01-11 14:05 UTC (permalink / raw) To: Mauro Carvalho Chehab Cc: Linux Media Mailing List, Mauro Carvalho Chehab, linux-api-u79uwXL29TY76Z2rM5mHXA Hi Mauro, On Sunday 11 January 2015 11:58:24 Mauro Carvalho Chehab wrote: > Em Sun, 11 Jan 2015 15:50:04 +0200 Laurent Pinchart escreveu: > > On Saturday 03 January 2015 12:49:03 Mauro Carvalho Chehab wrote: > >> The DVB devices are identified via a (major, minor) tuple, > >> and not by a random id. Fix it, before we start using it. > >> > >> Signed-off-by: Mauro Carvalho Chehab <mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> > >> > >> diff --git a/include/media/media-entity.h b/include/media/media-entity.h > >> index e00459185d20..de333cc8261b 100644 > >> --- a/include/media/media-entity.h > >> +++ b/include/media/media-entity.h > >> @@ -97,7 +97,10 @@ struct media_entity { > >> u32 device; > >> u32 subdevice; > >> } alsa; > >> - int dvb; > >> + struct { > >> + u32 major; > >> + u32 minor; > >> + } dvb; > >> > >> /* Sub-device specifications */ > >> /* Nothing needed yet */ > >> diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h > >> index d847c760e8f0..7902e800f019 100644 > >> --- a/include/uapi/linux/media.h > >> +++ b/include/uapi/linux/media.h > >> @@ -27,7 +27,7 @@ > >> #include <linux/types.h> > >> #include <linux/version.h> > >> > >> -#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) > >> +#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 1) > >> > >> struct media_device_info { > >> char driver[16]; > >> @@ -88,7 +88,10 @@ struct media_entity_desc { > >> __u32 device; > >> __u32 subdevice; > >> } alsa; > >> - int dvb; > >> + struct { > >> + __u32 major; > >> + __u32 minor; > >> + } dvb; > > > > Won't this break compilation of existing userspace code ? As DVB is not > > properly supported in MC at the moment we could consider that only > > mediactl will be affected, so it shouldn't be a big issue. > > Well, media-ctl uses a local copy of the videodev2.h header, so it won't > break. It's media.h, but you're correct here. > I'm not aware of any other application using MC for DVB. > > Yet, imagining that such application exists, then, IMHO, it is better > to break compilation for it, as probably such application was written for > some OOT driver that might be using its own version of the media > controller implementation. OK. I'll remember that argument the next time I want to break a kernel API though ;-) -- Regards, Laurent Pinchart ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCHv2 1/9] media: Fix DVB representation at media controller API 2015-01-11 14:05 ` Laurent Pinchart @ 2015-01-11 14:34 ` Mauro Carvalho Chehab 0 siblings, 0 replies; 6+ messages in thread From: Mauro Carvalho Chehab @ 2015-01-11 14:34 UTC (permalink / raw) To: Laurent Pinchart Cc: Linux Media Mailing List, Mauro Carvalho Chehab, linux-api-u79uwXL29TY76Z2rM5mHXA Em Sun, 11 Jan 2015 16:05:32 +0200 Laurent Pinchart <laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> escreveu: > Hi Mauro, > > On Sunday 11 January 2015 11:58:24 Mauro Carvalho Chehab wrote: > > Em Sun, 11 Jan 2015 15:50:04 +0200 Laurent Pinchart escreveu: > > > On Saturday 03 January 2015 12:49:03 Mauro Carvalho Chehab wrote: > > >> The DVB devices are identified via a (major, minor) tuple, > > >> and not by a random id. Fix it, before we start using it. > > >> > > >> Signed-off-by: Mauro Carvalho Chehab <mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> > > >> > > >> diff --git a/include/media/media-entity.h b/include/media/media-entity.h > > >> index e00459185d20..de333cc8261b 100644 > > >> --- a/include/media/media-entity.h > > >> +++ b/include/media/media-entity.h > > >> @@ -97,7 +97,10 @@ struct media_entity { > > >> u32 device; > > >> u32 subdevice; > > >> } alsa; > > >> - int dvb; > > >> + struct { > > >> + u32 major; > > >> + u32 minor; > > >> + } dvb; > > >> > > >> /* Sub-device specifications */ > > >> /* Nothing needed yet */ > > >> diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h > > >> index d847c760e8f0..7902e800f019 100644 > > >> --- a/include/uapi/linux/media.h > > >> +++ b/include/uapi/linux/media.h > > >> @@ -27,7 +27,7 @@ > > >> #include <linux/types.h> > > >> #include <linux/version.h> > > >> > > >> -#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 0) > > >> +#define MEDIA_API_VERSION KERNEL_VERSION(0, 1, 1) > > >> > > >> struct media_device_info { > > >> char driver[16]; > > >> @@ -88,7 +88,10 @@ struct media_entity_desc { > > >> __u32 device; > > >> __u32 subdevice; > > >> } alsa; > > >> - int dvb; > > >> + struct { > > >> + __u32 major; > > >> + __u32 minor; > > >> + } dvb; > > > > > > Won't this break compilation of existing userspace code ? As DVB is not > > > properly supported in MC at the moment we could consider that only > > > mediactl will be affected, so it shouldn't be a big issue. > > > > Well, media-ctl uses a local copy of the videodev2.h header, so it won't > > break. > > It's media.h, but you're correct here. Ah, yes, that's what I meant ;) Btw, I have also the patches adding support for DVB at v4l-utils: http://git.linuxtv.org/cgit.cgi/mchehab/experimental-v4l-utils.git/log/?h=dvb-media-ctl > > > I'm not aware of any other application using MC for DVB. > > > > Yet, imagining that such application exists, then, IMHO, it is better > > to break compilation for it, as probably such application was written for > > some OOT driver that might be using its own version of the media > > controller implementation. > > OK. I'll remember that argument the next time I want to break a kernel API > though ;-) :) Actually, we're not breaking the Kernel API here, as DVB support inside the media controller were never added. Next time, we should be sure to not add provision for an API at the Kernel without actually implementing it ;) Btw, eventually we'll end facing the very same issue when we merge support for ALSA. IMHO, it is just easier to use major,minor for all devnodes than to use anything else. Yet, you're right: maybe we should do, instead: union { struct { u32 major; u32 minor; } dev; /* DEPRECATED: old node specifications */ struct { u32 major; u32 minor; } v4l; struct { u32 major; u32 minor; } fb; struct { u32 card; u32 device; u32 subdevice; } alsa; int dvb; /* Sub-device specifications */ /* Nothing needed yet */ } info; And change media-ctl to use info.dev for all devnodes. This will provide a fix when we add support for alsa devnodes too. Regards, Mauro ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <cover.1420294938.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>]
* [PATCHv2 2/9] media: add new types for DVB devnodes [not found] ` <cover.1420294938.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> @ 2015-01-03 14:49 ` Mauro Carvalho Chehab 0 siblings, 0 replies; 6+ messages in thread From: Mauro Carvalho Chehab @ 2015-01-03 14:49 UTC (permalink / raw) To: Laurent Pinchart Cc: Mauro Carvalho Chehab, Linux Media Mailing List, Mauro Carvalho Chehab, linux-api-u79uwXL29TY76Z2rM5mHXA Most of the DVB subdevs have already their own devnode. Add support for them at the media controller API. Signed-off-by: Mauro Carvalho Chehab <mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> diff --git a/include/uapi/linux/media.h b/include/uapi/linux/media.h index 7902e800f019..707db275f92b 100644 --- a/include/uapi/linux/media.h +++ b/include/uapi/linux/media.h @@ -50,7 +50,14 @@ struct media_device_info { #define MEDIA_ENT_T_DEVNODE_V4L (MEDIA_ENT_T_DEVNODE + 1) #define MEDIA_ENT_T_DEVNODE_FB (MEDIA_ENT_T_DEVNODE + 2) #define MEDIA_ENT_T_DEVNODE_ALSA (MEDIA_ENT_T_DEVNODE + 3) -#define MEDIA_ENT_T_DEVNODE_DVB (MEDIA_ENT_T_DEVNODE + 4) +#define MEDIA_ENT_T_DEVNODE_DVB_FE (MEDIA_ENT_T_DEVNODE + 4) +#define MEDIA_ENT_T_DEVNODE_DVB_DEMUX (MEDIA_ENT_T_DEVNODE + 5) +#define MEDIA_ENT_T_DEVNODE_DVB_DVR (MEDIA_ENT_T_DEVNODE + 6) +#define MEDIA_ENT_T_DEVNODE_DVB_CA (MEDIA_ENT_T_DEVNODE + 7) +#define MEDIA_ENT_T_DEVNODE_DVB_NET (MEDIA_ENT_T_DEVNODE + 8) + +/* Legacy symbol. Use it to avoid userspace compilation breakages */ +#define MEDIA_ENT_T_DEVNODE_DVB MEDIA_ENT_T_DEVNODE_DVB_FE #define MEDIA_ENT_T_V4L2_SUBDEV (2 << MEDIA_ENT_TYPE_SHIFT) #define MEDIA_ENT_T_V4L2_SUBDEV_SENSOR (MEDIA_ENT_T_V4L2_SUBDEV + 1) -- 2.1.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-11 14:34 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <cover.1420294938.git.mchehab@osg.samsung.com> 2015-01-03 14:49 ` [PATCHv2 1/9] media: Fix DVB representation at media controller API Mauro Carvalho Chehab [not found] ` <ea1dd8e443b34e2047468866ec423d4334f54eba.1420294938.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> 2015-01-11 13:50 ` Laurent Pinchart 2015-01-11 13:58 ` Mauro Carvalho Chehab [not found] ` <20150111115824.0e4acdf0-+RedX5hVuTR+urZeOPWqwQ@public.gmane.org> 2015-01-11 14:05 ` Laurent Pinchart 2015-01-11 14:34 ` Mauro Carvalho Chehab [not found] ` <cover.1420294938.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> 2015-01-03 14:49 ` [PATCHv2 2/9] media: add new types for DVB devnodes Mauro Carvalho Chehab
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).