Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread David Howells
Sean Young wrote: > device_create() will register the device in sysfs and send uevent. So, your > original udev rule/code will not work, since it always would read > a mac address of 0, as proposed_mac is not populated when the device is > announced. That is, unless udev is scheduled after the ma

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread David Howells
David Howells wrote: > > > > Devices without a mac address shouldn't have a mac_dvb sysfs attribute, > > > > I think. > > > > > > I'm not sure that's possible within the core infrastructure. It's a > > > class attribute se

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread David Howells
Sean Young wrote: > > > Devices without a mac address shouldn't have a mac_dvb sysfs attribute, > > > I think. > > > > I'm not sure that's possible within the core infrastructure. It's a class > > attribute set when the class is created; I'm not sure it can be overridden > > on > > a per-devic

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread David Howells
Sean Young wrote: > > How do I tell? If it's all zeros it's not there? > > The mac gets populated through read_mac_address member of > dvb_usb_device_properties. That doesn't seem to be true for all drivers. The cx23885 driver does things differently, for instance. David

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread David Howells
Sean Young wrote: > With this patch, with a usb Hauppauge Nova-T Stick I get: > > $ tail /sys/class/dvb/*/dvb_* > ... > ==> /sys/class/dvb/dvb0.demux0/dvb_mac <== > 00:00:00:00:00:00 I presume you're complaining, then, that the file exists in this instance rather than it doesn't have the real M

Re: [PATCH] dvb: Allow MAC addresses to be mapped to stable device names with udev

2018-10-31 Thread David Howells
Sean Young wrote: > > > Devices have a MAC address available, which is printed during boot: > > Not all dvb devices have a mac address. How do I tell? If it's all zeros it's not there? > Devices without a mac address shouldn't have a mac_dvb sysfs attribute, > I think. I'm not sure that's po

Re: [PATCH] dvb: Save port number and provide sysfs attributes to pass values to udev

2018-03-08 Thread David Howells
Mauro Carvalho Chehab wrote: > > + dvb_class->dev_groups = dvb_class_groups, > > dvb_class->dev_uevent = dvb_uevent; > > dvb_class->devnode = dvb_devnode; > > return 0; > > The patch itself looks good, but I'm not seeing any documentation. I should probably add something to Docume

[PATCH] dvb: Save port number and provide sysfs attributes to pass values to udev

2018-01-10 Thread David Howells
Note that binding the dvb-net device to a network interface and changing it there does not reflect back into the the dvb_adapter struct and doesn't change the MAC address here. This means that a system with two identical cards in it may need to distinguish them by some other means t

[PATCH 28/38] Annotate hardware config module parameters in drivers/staging/media/

2017-04-05 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/staging/media/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Mauro Carvalho Chehab cc: Greg Kroah-Hartman cc: linux-media@vger.kernel.o

[PATCH 13/38] Annotate hardware config module parameters in drivers/media/

2017-04-05 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/media/. Suggested-by: Alan Cox Signed-off-by: David Howells cc: Mauro Carvalho Chehab cc: mjpeg-us...@lists.sourceforge.net cc: linux-media@vger.kerne

[no subject]

2017-01-13 Thread David Howells
> -header-y += msr-index.h I see it on my desktop as /usr/include/asm/msr-index.h and it's been there at least four years - and as such it's part of the UAPI. I don't think you can remove it unless you can guarantee there are no userspace users. David -- To unsubscribe from this list: send the l

[no subject]

2017-01-13 Thread David Howells
Nicolas Dichtel wrote: > This header file is exported, thus move it to uapi. Exported how? > +#ifdef __INT32_TYPE__ > +#undef __INT32_TYPE__ > +#define __INT32_TYPE__ int > +#endif > + > +#ifdef __UINT32_TYPE__ > +#undef __UINT32_TYPE__ > +#define __UINT32_TYPE__ unsigned int

Re: [PATCH 29/39] Annotate hardware config module parameters in drivers/staging/media/

2016-12-01 Thread David Howells
Mauro Carvalho Chehab wrote: > drivers/staging/media/lirc/lirc_parallel.c:728:19: error: Expected ) in > function declarator Did you apply patch 1 first? That defines module_param_hw*. David -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to

[PATCH 29/39] Annotate hardware config module parameters in drivers/staging/media/

2016-12-01 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/staging/media/. Suggested-by: One Thousand Gnomes Signed-off-by: David Howells cc: Mauro Carvalho Chehab cc: Greg Kroah-Hartman cc: linux-

[PATCH 13/39] Annotate hardware config module parameters in drivers/media/

2016-12-01 Thread David Howells
some drivers support automatic configuration (e.g. PNP or PCI) in addition to manually coded parameters. This patch annotates drivers in drivers/media/. Suggested-by: One Thousand Gnomes Signed-off-by: David Howells cc: Mauro Carvalho Chehab cc: mjpeg-us...@lists.sourceforge.net cc: linux-

Trying to pass the port number to udev for a multiport DVB card

2016-07-15 Thread David Howells
er() in cx23885-dvb.c. Does anyone know what's going on? I should also add that the MAC address *does* go through, though I can't see where it's copied. David --- commit c100b0ddc9436152e770a80eedfdd90644c1ee3d Author: David Howells Date: Wed Jul 13 23:05:34 2016 +0100 dvb

Re: [PATCH] [media] cx23885-dvb: move initialization of a8293_pdata

2015-12-18 Thread David Howells
ch(), making smatch to > shut up one warning. > > Signed-off-by: Mauro Carvalho Chehab Yeah - checked with the compiler people: it's not really expected to initialise as expected. Acked-by: David Howells -- To unsubscribe from this list: send the line "unsubscribe linux-media&

Re: [PATCH 00/38] Fixes related to incorrect usage of unsigned types

2015-09-21 Thread David Howells
Andrzej Hajda wrote: > Semantic patch finds comparisons of types: > unsigned < 0 > unsigned >= 0 > The former is always false, the latter is always true. > Such comparisons are useless, so theoretically they could be > safely removed, but their presence quite often indicates bugs. Or som

Re: [PATCH 2/2] ts2020: Provide DVBv5 API signal strength

2015-06-03 Thread David Howells
Antti Palosaari wrote: > Malcolm misses some pending patches where attach() is wrapped to I2C model > probe(). > http://git.linuxtv.org/cgit.cgi/anttip/media_tree.git/log/?h=ts2020 Aha! That explains it. ts2020: register I2C driver from legacy media attach removes the allocation from

Re: [PATCH 2/2] ts2020: Provide DVBv5 API signal strength

2015-06-03 Thread David Howells
Malcolm Priestley wrote: > >> Yes, also, the workqueue appears not to be initialized when using the dvb > >> attached method. > > > > I'm not sure what you're referring to. It's initialised in ts2020_probe() > > just after the ts2020_priv struct is allocated - the only place it is > > allocated.

[PATCH] ts2020: Allow stats polling to be suppressed

2015-06-03 Thread David Howells
ey Signed-off-by: David Howells cc: Malcolm Priestley --- drivers/media/dvb-frontends/ts2020.c | 18 ++ drivers/media/dvb-frontends/ts2020.h |3 +++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/drivers/media/dvb-frontends/ts2020.c b/drivers/media/dvb

[PATCH] ts2020: Copy loop_through from the config to the internal data

2015-06-03 Thread David Howells
Copy the loop_through setting from the ts2020_config struct to the internal ts2020_priv struct so that it can actually be used. Whilst we're at it, group the bitfields together in the same order in both structs so that the compiler has a good chance to copy them in one go. Signed-off-by:

Re: [PATCH 2/2] ts2020: Provide DVBv5 API signal strength

2015-06-03 Thread David Howells
Malcolm Priestley wrote: > Yes, also, the workqueue appears not to be initialized when using the dvb > attached method. I'm not sure what you're referring to. It's initialised in ts2020_probe() just after the ts2020_priv struct is allocated - the only place it is allocated. David -- To unsubsc

Re: [PATCH 2/2] ts2020: Provide DVBv5 API signal strength

2015-05-28 Thread David Howells
Malcolm Priestley wrote: > Statistics polling can not be done by lmedm04 driver's implementation of > M88RS2000/TS2020 because I2C messages stop the devices demuxer. > > So any polling must be a config option for this driver. Ummm... I presume a runtime config option is okay. Also, does that

[PATCH 2/2] ts2020: Provide DVBv5 API signal strength

2015-05-26 Thread David Howells
scale set to FE_SCALE_DECIBEL. (3) The DVBv3 format signal strength then needed to be calculated from the signal strength stored in the dtv_property_cache rather than accessing the value when ts2020_read_signal_strength() is called. Signed-off-by: David Howells --- driv

[PATCH 1/2] TS2020: Calculate tuner gain correctly

2015-05-26 Thread David Howells
Thanks to Montage for providing access to information about the workings of these parts. Signed-off-by: David Howells --- drivers/media/dvb-frontends/m88ds3103.c | 16 drivers/media/dvb-frontends/m88ds3103.h |2 drivers/media/dvb-frontends/ts2020.c| 138 +++

[PATCH] libdvbv5: Retry FE_GET_PROPERTY ioctl if it returns EAGAIN

2015-04-14 Thread David Howells
-off-by: David Howells --- dvb-fe.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/libdvbv5/dvb-fe.c b/lib/libdvbv5/dvb-fe.c index 04ad907..3657334 100644 --- a/lib/libdvbv5/dvb-fe.c +++ b/lib/libdvbv5/dvb-fe.c @@ -171,9 +171,12 @@ struct dvb_v5_fe_parms

[PATCH] dvb: Document FE_SCALE_DECIBEL units consistently

2015-04-09 Thread David Howells
suggesting that the 1/1000 is correct. Settle on millidecibels, ie. 1/1000dB or 0.001dB. Signed-off-by: David Howells --- Documentation/DocBook/media/dvb/dvbproperty.xml |4 ++-- include/uapi/linux/dvb/frontend.h |4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH] cx23885: Always initialise dev->slock spinlock

2015-03-26 Thread David Howells
/0x474 [] ? file_has_perm+0x5b/0x7f [] ? __audit_syscall_entry+0xbc/0xde [] SyS_ioctl+0x55/0x7a [] system_call_fastpath+0x12/0x17 Signed-off-by: David Howells --- drivers/media/pci/cx23885/cx23885-core.c |1 + drivers/media/pci/cx23885/cx23885-video.c |1 - 2 files changed, 1

[PATCH] m88ts2022: Nested loops shouldn't use the same index variable

2015-03-20 Thread David Howells
There are a pair of nested loops inside m88ts2022_cmd() that use the same index variable, but for different things. Split the variable. Signed-off-by: David Howells --- drivers/media/tuners/m88ts2022.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers

[PATCH] cxusb: Use enum to represent table offsets rather than hard-coding numbers [ver #3]

2015-02-17 Thread David Howells
Use enum to represent table offsets rather than hard-coding numbers to avoid problems with the numbers becoming out of sync with the table. Signed-off-by: David Howells --- drivers/media/usb/dvb-usb/cxusb.c | 155 ++--- 1 file changed, 111 insertions(+), 44

[PATCH] cxusb: Use enum to represent table offsets rather than hard-coding numbers [ver #2]

2015-02-17 Thread David Howells
Use enum to represent table offsets rather than hard-coding numbers to avoid problems with the numbers becoming out of sync with the table. Signed-off-by: David Howells --- drivers/media/usb/dvb-usb/cxusb.c | 113 +++-- 1 file changed, 69 insertions(+), 44

Re: [PATCH] cxusb: Use enum to represent table offsets rather than hard-coding numbers

2015-02-17 Thread David Howells
David Howells wrote: > That should really be: > > [VID_MEDION_MD95700] = {USB_VID_MEDION, USB_PID_MEDION_MD95700}, > > since the index number is the model, not the vendor, which brings me to: > > [DVICO_BLUEBIRD_DVB_T_NANO_2_NFW_W

Re: [PATCH] cxusb: Use enum to represent table offsets rather than hard-coding numbers

2015-02-17 Thread David Howells
Mauro Carvalho Chehab wrote: > I would do a s/ix_USB_PID_// in the above, in order to simplify the > namespace and to avoid giving the false impression that those are vendor > IDs. Okay. > If you look below on your patch, even you forgot to add a "ix_" prefix into > one of the entires ;) Bah.

[PATCH] cxusb: Use enum to represent table offsets rather than hard-coding numbers

2015-02-16 Thread David Howells
Use enum to represent table offsets rather than hard-coding numbers to avoid problems with the numbers becoming out of sync with the table. Signed-off-by: David Howells --- drivers/media/usb/dvb-usb/cxusb.c | 115 +++-- 1 file changed, 71 insertions(+), 44

[PATCH] CONFIG_VIDEO_DEV needs to be enabled by MEDIA_DIGITAL_TV_SUPPORT also

2015-02-15 Thread David Howells
CONFIG_VIDEO_DEV needs to be enabled by MEDIA_DIGITAL_TV_SUPPORT so that DVB TV receiver drivers can be enabled. Signed-off-by: David Howells --- drivers/media/Kconfig |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/Kconfig b/drivers/media/Kconfig index

Re: I2C transfer logs for Antti's DS3103 driver and DVBSky's DS3103 driver

2013-11-15 Thread David Howells
Antti Palosaari wrote: > >> I guess I need to check the tuner writes too. > > > >>From dvbsky: > > > > TUNER_write(10, [0a]) > > TUNER_write(11, [40]) > > > > and from your driver: > > > > TUNER_write(10, [0b40]) > > > > That would appear to be some sort of tuner frequency setting? >

Re: I2C transfer logs for Antti's DS3103 driver and DVBSky's DS3103 driver

2013-11-15 Thread David Howells
Antti Palosaari wrote: > > But you don't give me the option of _not_ setting it. The dvbsky driver > > sets it to 0x35 in its init_tab[] - as does yours - and then leaves it > > alone. > > So what? Do you understand meaning of init tables? Yes. You misunderstand what I'm saying. You uncondit

Re: I2C transfer logs for Antti's DS3103 driver and DVBSky's DS3103 driver

2013-11-15 Thread David Howells
David Howells wrote: > > I guess I need to check the tuner writes too. > > From dvbsky: > > TUNER_write(10, [0a]) > TUNER_write(11, [40]) > > and from your driver: > > TUNER_write(10, [0b40]) > > That would appear to be some sort of

Re: I2C transfer logs for Antti's DS3103 driver and DVBSky's DS3103 driver

2013-11-15 Thread David Howells
David Howells wrote: > I guess I need to check the tuner writes too. >From dvbsky: TUNER_write(10, [0a]) TUNER_write(11, [40]) and from your driver: TUNER_write(10, [0b40]) That would appear to be some sort of tuner frequency setting? David -- To unsubscrib

Re: I2C transfer logs for Antti's DS3103 driver and DVBSky's DS3103 driver

2013-11-15 Thread David Howells
Antti Palosaari wrote: > > demod_write(33, [00]) YES > > That is config option already. Did you set value? If yes, then there is driver > bug. If not, then add value. But you don't give me the option of _not_ setting it. The dvbsky driver sets it to 0x35 in its in

Re: I2C transfer logs for Antti's DS3103 driver and DVBSky's DS3103 driver

2013-11-15 Thread David Howells
I think I've isolated the significant part of the demod register setup. Discarding the reads and sorting them in address order, I see ANTTI DVBSKY DIFFER? === === === demod_write(22, [ac]) demod_write(22, [ac]) no

Re: I2C transfer logs for Antti's DS3103 driver and DVBSky's DS3103 driver

2013-11-14 Thread David Howells
David Howells wrote: > Here are four logs from doing: > > scandvb -a1 ./e.1 > > where the contents of file e.1 are: > > S 11919000 V 2750 3/4 > > which is probing a region on the Eutelsat-9A satellite broadcast. Here's a script for turning the

Deadlock between M88DS3103 and M88TS2022 drivers from I2C parentage

2013-11-08 Thread David Howells
Hi Antti, This patch: http://git.linuxtv.org/anttip/media_tree.git/commit/a0e4024e85ec053699bb4878ccc0800333f84a42 That sets the parentage relationship between the M88DS3103 and M88TS2022 drivers that you have here: http://git.linuxtv.org/anttip/media_tree.git/shortlog/refs/h

[PATCH 04/28] proc: Supply PDE attribute setting accessor functions [RFC]

2013-04-16 Thread David Howells
Supply accessor functions to set attributes in proc_dir_entry structs. The following are supplied: proc_set_size() and proc_set_user(). Signed-off-by: David Howells cc: linuxppc-...@lists.ozlabs.org cc: linux-media@vger.kernel.org cc: net...@vger.kernel.org cc: linux-wirel...@vger.kernel.org cc

[PATCH 16/28] zoran: Don't print proc_dir_entry data in debug [RFC]

2013-04-16 Thread David Howells
Don't print proc_dir_entry data in debug as we're soon to have no direct access to the contents of the PDE. Print what was put in there instead. Signed-off-by: David Howells cc: mjpeg-us...@lists.sourceforge.net cc: linux-media@vger.kernel.org --- drivers/media/pci/zoran/zoran_procf

Re: [GIT PULL] Disintegrate UAPI for media

2012-10-11 Thread David Howells
Mauro Carvalho Chehab wrote: > My understanding here is that, as the file location will change > with this series, your original concern is now void, as userspace > will require patches to use the new location. So, if we're willing > to do it, let's put this one-driver-only obsolete API on a sepa

Re: [GIT PULL] Disintegrate UAPI for media

2012-10-10 Thread David Howells
Mauro Carvalho Chehab wrote: > Hmm... last year, it was decided that we would be putting the DVB av7110-only > API files on a separate place, as the API there conflicts with V4L/alsa APIs > and are used only by one upstream driver (there were two drivers using them, > at that time). As you might

[GIT PULL] Disintegrate UAPI for media

2012-10-09 Thread David Howells
09:48:42 +0100) UAPI Disintegration 2012-10-09 -------- David Howells (1): UAPI: (Scripted) Disintegrate include/linux/dvb include/linux/dvb/Kbuild| 8 - include/linux/dvb/dmx.h

Soft lockup in mb86a16_search()

2011-09-22 Thread David Howells
My mythtv receiver machine crashes when I start mythbackend with a soft lockup warning in mb86a16_search(). Shortly thereafter the machine becomes unresponsive and has to be reset. Relevant highlights of dmesg attached below. The kernel is Fedora 15's kernel-2.6.40.4-5.fc15.x86_64. David --- I

[PATCH] V4L/DVB: lgs8gxx: Use shifts rather than multiply/divide when possible

2009-12-11 Thread David Howells
/built-in.o: In function `lgs8gxx_get_afc_phase': drivers/media/dvb/frontends/lgs8gxx.c:250: undefined reference to `__udivdi3' Signed-off-by: David Howells --- drivers/media/dvb/frontends/lgs8gxx.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/