Re: [PATCH] [dvb-apps] Remove scan files from dvb-apps repository
On 06-12-13 00:22, Jonathan McCrohan wrote: Hi Oliver, On 20/10/13 11:45, Oliver Schinagl wrote: On 10/20/13 12:14, Jonathan McCrohan wrote: Heh heh. Do you have commit rights for the dvb-apps repository? Would you be able to get Mauro or someone else to delete those files if you don't? Yeah I do, I'll wait a few days to see if the messages show up eventually. I don't think those messages ever showed up. Would you be able to delete those files from the dvb-apps repo? Done as per request. Oliver Thanks, Jon -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2] v4l: sh_vou: Fix warnings due to improper casts and printk formats
On Wednesday 27 November 2013 11:15:27 Laurent Pinchart wrote: Use the %zu printk specifier to print size_t variables, and cast pointers to uintptr_t instead of unsigned int where applicable. This fixes warnings on platforms where pointers and/or dma_addr_t have a different size than int. Let's drop this, I'll resend a patch based on the new %pad printk modifier to print dma_addr_t. Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com --- drivers/media/platform/sh_vou.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Changes compared to v1: - Cast to uintptr_t instead of unsigned long diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c index 4f30341..69e2125 100644 --- a/drivers/media/platform/sh_vou.c +++ b/drivers/media/platform/sh_vou.c @@ -286,7 +286,7 @@ static int sh_vou_buf_prepare(struct videobuf_queue *vq, vb-size = vb-height * bytes_per_line; if (vb-baddr vb-bsize vb-size) { /* User buffer too small */ - dev_warn(vq-dev, User buffer too small: [%u] @ %lx\n, + dev_warn(vq-dev, User buffer too small: [%zu] @ %lx\n, vb-bsize, vb-baddr); return -EINVAL; } @@ -302,9 +302,9 @@ static int sh_vou_buf_prepare(struct videobuf_queue *vq, } dev_dbg(vou_dev-v4l2_dev.dev, - %s(): fmt #%d, %u bytes per line, phys 0x%x, type %d, state %d\n, + %s(): fmt #%d, %u bytes per line, phys 0x%lx, type %d, state %d\n, __func__, vou_dev-pix_idx, bytes_per_line, - videobuf_to_dma_contig(vb), vb-memory, vb-state); + (uintptr_t)videobuf_to_dma_contig(vb), vb-memory, vb-state); return 0; } -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
omap3isp device tree support
Hi, i know there is some work going on for omap3isp device tree support, but right now is it possible to enable it in some other way in a DT kernel? I've tried enabling it in board-generic.c (omap3_init_camera(...) with proper platform data) but it hangs early at boot, do someone know if it's possible and how to do it? Thanks, Enrico -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 07/11] si4713: Added MAINTAINERS entry for radio-usb-si4713 driver
From: Dinesh Ram dinesh@cern.ch Hans Verkuil hverk...@xs4all.nl will maintain the USB driver for si4713 Signed-off-by: Dinesh Ram dinesh@cern.ch Signed-off-by: Hans Verkuil hans.verk...@cisco.com Tested-by: Eduardo Valentin edubez...@gmail.com Acked-by: Eduardo Valentin edubez...@gmail.com --- MAINTAINERS | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 8285ed4..c540ed6 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7621,7 +7621,7 @@ L:linux-media@vger.kernel.org T: git git://linuxtv.org/media_tree.git W: http://linuxtv.org S: Odd Fixes -F: drivers/media/radio/si4713-i2c.? +F: drivers/media/radio/si4713/si4713.? SI4713 FM RADIO TRANSMITTER PLATFORM DRIVER M: Eduardo Valentin edubez...@gmail.com @@ -7629,7 +7629,15 @@ L: linux-media@vger.kernel.org T: git git://linuxtv.org/media_tree.git W: http://linuxtv.org S: Odd Fixes -F: drivers/media/radio/radio-si4713.c +F: drivers/media/radio/si4713/radio-platform-si4713.c + +SI4713 FM RADIO TRANSMITTER USB DRIVER +M: Hans Verkuil hverk...@xs4all.nl +L: linux-media@vger.kernel.org +T: git git://linuxtv.org/media_tree.git +W: http://linuxtv.org +S: Maintained +F: drivers/media/radio/si4713/radio-usb-si4713.c SIANO DVB DRIVER M: Mauro Carvalho Chehab m.che...@samsung.com -- 1.8.4.rc3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 05/11] si4713: HID blacklist Si4713 USB development board
From: Dinesh Ram dinesh@cern.ch The Si4713 development board contains a Si4713 FM transmitter chip and is handled by the radio-usb-si4713 driver. The board reports itself as (10c4:8244) Cygnal Integrated Products, Inc. and misidentifies itself as a HID device in its USB interface descriptor. This patch ignores this device as an HID device and hence loads the custom driver. Signed-off-by: Dinesh Ram dinesh@cern.ch Signed-off-by: Jiri Kosina jkos...@suse.cz Acked-by: Jiri Kosina jkos...@suse.cz Signed-off-by: Hans Verkuil hans.verk...@cisco.com Tested-by: Eduardo Valentin edubez...@gmail.com Acked-by: Eduardo Valentin edubez...@gmail.com --- drivers/hid/hid-core.c | 1 + drivers/hid/hid-ids.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 8c10f27..369a150 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -2117,6 +2117,7 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD) }, { HID_USB_DEVICE(USB_VENDOR_ID_CIDC, 0x0103) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI470X) }, + { HID_USB_DEVICE(USB_VENDOR_ID_CYGNAL, USB_DEVICE_ID_CYGNAL_RADIO_SI4713) }, { HID_USB_DEVICE(USB_VENDOR_ID_CMEDIA, USB_DEVICE_ID_CM109) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_HIDCOM) }, { HID_USB_DEVICE(USB_VENDOR_ID_CYPRESS, USB_DEVICE_ID_CYPRESS_ULTRAMOUSE) }, diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h index 7655962..beee6d6 100644 --- a/drivers/hid/hid-ids.h +++ b/drivers/hid/hid-ids.h @@ -241,6 +241,8 @@ #define USB_VENDOR_ID_CYGNAL 0x10c4 #define USB_DEVICE_ID_CYGNAL_RADIO_SI470X 0x818a +#define USB_DEVICE_ID_CYGNAL_RADIO_SI4713 0x8244 + #define USB_VENDOR_ID_CYPRESS 0x04b4 #define USB_DEVICE_ID_CYPRESS_MOUSE0x0001 #define USB_DEVICE_ID_CYPRESS_HIDCOM 0x5500 -- 1.8.4.rc3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 04/11] si4713: Bug fix for si4713_tx_tune_power() method in the i2c driver
From: Dinesh Ram dinesh@cern.ch In the si4713_tx_tune_power() method, the args array element 'power' can take values between SI4713_MIN_POWER and SI4713_MAX_POWER. power = 0 is also valid. All the values (0 power SI4713_MIN_POWER) are illegal and hence are all mapped to SI4713_MIN_POWER. Signed-off-by: Dinesh Ram dinesh@cern.ch Signed-off-by: Hans Verkuil hans.verk...@cisco.com Tested-by: Eduardo Valentin edubez...@gmail.com Acked-by: Eduardo Valentin edubez...@gmail.com --- drivers/media/radio/si4713/si4713.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.c index 096947c..4931325 100644 --- a/drivers/media/radio/si4713/si4713.c +++ b/drivers/media/radio/si4713/si4713.c @@ -555,14 +555,14 @@ static int si4713_tx_tune_freq(struct si4713_device *sdev, u16 frequency) } /* - * si4713_tx_tune_power - Sets the RF voltage level between 88 and 115 dBuV in + * si4713_tx_tune_power - Sets the RF voltage level between 88 and 120 dBuV in * 1 dB units. A value of 0x00 indicates off. The command * also sets the antenna tuning capacitance. A value of 0 * indicates autotuning, and a value of 1 - 191 indicates * a manual override, which results in a tuning * capacitance of 0.25 pF x @antcap. * @sdev: si4713_device structure for the device we are communicating - * @power: tuning power (88 - 115 dBuV, unit/step 1 dB) + * @power: tuning power (88 - 120 dBuV, unit/step 1 dB) * @antcap: value of antenna tuning capacitor (0 - 191) */ static int si4713_tx_tune_power(struct si4713_device *sdev, u8 power, @@ -576,16 +576,16 @@ static int si4713_tx_tune_power(struct si4713_device *sdev, u8 power, * .Third byte = power * .Fourth byte = antcap */ - const u8 args[SI4713_TXPWR_NARGS] = { + u8 args[SI4713_TXPWR_NARGS] = { 0x00, 0x00, power, antcap, }; - if (((power 0) (power SI4713_MIN_POWER)) || - power SI4713_MAX_POWER || antcap SI4713_MAX_ANTCAP) - return -EDOM; + /* Map power values 1-87 to MIN_POWER (88) */ + if (power 0 power SI4713_MIN_POWER) + args[2] = power = SI4713_MIN_POWER; err = si4713_send_command(sdev, SI4713_CMD_TX_TUNE_POWER, args, ARRAY_SIZE(args), val, @@ -1462,9 +1462,9 @@ static int si4713_probe(struct i2c_client *client, V4L2_CID_TUNE_PREEMPHASIS, V4L2_PREEMPHASIS_75_uS, 0, V4L2_PREEMPHASIS_50_uS); sdev-tune_pwr_level = v4l2_ctrl_new_std(hdl, si4713_ctrl_ops, - V4L2_CID_TUNE_POWER_LEVEL, 0, 120, 1, DEFAULT_POWER_LEVEL); + V4L2_CID_TUNE_POWER_LEVEL, 0, SI4713_MAX_POWER, 1, DEFAULT_POWER_LEVEL); sdev-tune_ant_cap = v4l2_ctrl_new_std(hdl, si4713_ctrl_ops, - V4L2_CID_TUNE_ANTENNA_CAPACITOR, 0, 191, 1, 0); + V4L2_CID_TUNE_ANTENNA_CAPACITOR, 0, SI4713_MAX_ANTCAP, 1, 0); if (hdl-error) { rval = hdl-error; -- 1.8.4.rc3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 08/11] si4713: move supply list to si4713_platform_data
From: Dinesh Ram dinesh@cern.ch The supply list is needed by the platform driver, but not by the usb driver. So this information belongs to the platform data and should not be hardcoded in the subdevice driver. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Tested-by: Eduardo Valentin edubez...@gmail.com Acked-by: Eduardo Valentin edubez...@gmail.com --- arch/arm/mach-omap2/board-rx51-peripherals.c | 7 drivers/media/radio/si4713/si4713.c | 52 ++-- drivers/media/radio/si4713/si4713.h | 3 +- include/media/si4713.h | 2 ++ 4 files changed, 37 insertions(+), 27 deletions(-) diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index f093af1..8760bbe 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c @@ -760,7 +760,14 @@ static struct regulator_init_data rx51_vintdig = { }, }; +static const char * const si4713_supply_names[] = { + vio, + vdd, +}; + static struct si4713_platform_data rx51_si4713_i2c_data __initdata_or_module = { + .supplies = ARRAY_SIZE(si4713_supply_names), + .supply_names = si4713_supply_names, .gpio_reset = RX51_FMTX_RESET_GPIO, }; diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.c index 4931325..097d4e0 100644 --- a/drivers/media/radio/si4713/si4713.c +++ b/drivers/media/radio/si4713/si4713.c @@ -44,11 +44,6 @@ MODULE_AUTHOR(Eduardo Valentin eduardo.valen...@nokia.com); MODULE_DESCRIPTION(I2C driver for Si4713 FM Radio Transmitter); MODULE_VERSION(0.0.1); -static const char *si4713_supply_names[SI4713_NUM_SUPPLIES] = { - vio, - vdd, -}; - #define DEFAULT_RDS_PI 0x00 #define DEFAULT_RDS_PTY0x00 #define DEFAULT_RDS_DEVIATION 0x00C8 @@ -368,11 +363,12 @@ static int si4713_powerup(struct si4713_device *sdev) if (sdev-power_state) return 0; - err = regulator_bulk_enable(ARRAY_SIZE(sdev-supplies), - sdev-supplies); - if (err) { - v4l2_err(sdev-sd, Failed to enable supplies: %d\n, err); - return err; + if (sdev-supplies) { + err = regulator_bulk_enable(sdev-supplies, sdev-supply_data); + if (err) { + v4l2_err(sdev-sd, Failed to enable supplies: %d\n, err); + return err; + } } if (gpio_is_valid(sdev-gpio_reset)) { udelay(50); @@ -396,11 +392,12 @@ static int si4713_powerup(struct si4713_device *sdev) if (client-irq) err = si4713_write_property(sdev, SI4713_GPO_IEN, SI4713_STC_INT | SI4713_CTS); - } else { - if (gpio_is_valid(sdev-gpio_reset)) - gpio_set_value(sdev-gpio_reset, 0); - err = regulator_bulk_disable(ARRAY_SIZE(sdev-supplies), -sdev-supplies); + return err; + } + if (gpio_is_valid(sdev-gpio_reset)) + gpio_set_value(sdev-gpio_reset, 0); + if (sdev-supplies) { + err = regulator_bulk_disable(sdev-supplies, sdev-supply_data); if (err) v4l2_err(sdev-sd, Failed to disable supplies: %d\n, err); @@ -432,11 +429,13 @@ static int si4713_powerdown(struct si4713_device *sdev) v4l2_dbg(1, debug, sdev-sd, Device in reset mode\n); if (gpio_is_valid(sdev-gpio_reset)) gpio_set_value(sdev-gpio_reset, 0); - err = regulator_bulk_disable(ARRAY_SIZE(sdev-supplies), -sdev-supplies); - if (err) - v4l2_err(sdev-sd, -Failed to disable supplies: %d\n, err); + if (sdev-supplies) { + err = regulator_bulk_disable(sdev-supplies, +sdev-supply_data); + if (err) + v4l2_err(sdev-sd, +Failed to disable supplies: %d\n, err); + } sdev-power_state = POWER_OFF; } @@ -1381,13 +1380,14 @@ static int si4713_probe(struct i2c_client *client, } sdev-gpio_reset = pdata-gpio_reset; gpio_direction_output(sdev-gpio_reset, 0); + sdev-supplies = pdata-supplies; } - for (i = 0; i ARRAY_SIZE(sdev-supplies); i++) - sdev-supplies[i].supply = si4713_supply_names[i]; + for (i = 0; i sdev-supplies; i++) + sdev-supply_data[i].supply =
[PATCHv2 03/11] si4713: Reorganized includes in si4713.c/h
From: Dinesh Ram dinesh@cern.ch Moved the header linux/regulator/consumer.h from si4713.c to si4713.h Signed-off-by: Dinesh Ram dinesh@cern.ch Signed-off-by: Hans Verkuil hans.verk...@cisco.com Tested-by: Eduardo Valentin edubez...@gmail.com Acked-by: Eduardo Valentin edubez...@gmail.com --- drivers/media/radio/si4713/si4713.c | 1 - drivers/media/radio/si4713/si4713.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.c index 5d26b9a..096947c 100644 --- a/drivers/media/radio/si4713/si4713.c +++ b/drivers/media/radio/si4713/si4713.c @@ -31,7 +31,6 @@ #include media/v4l2-device.h #include media/v4l2-ioctl.h #include media/v4l2-common.h -#include linux/regulator/consumer.h #include si4713.h diff --git a/drivers/media/radio/si4713/si4713.h b/drivers/media/radio/si4713/si4713.h index 25cdea2..1410cd2 100644 --- a/drivers/media/radio/si4713/si4713.h +++ b/drivers/media/radio/si4713/si4713.h @@ -15,6 +15,7 @@ #ifndef SI4713_I2C_H #define SI4713_I2C_H +#include linux/regulator/consumer.h #include media/v4l2-subdev.h #include media/v4l2-ctrls.h #include media/si4713.h -- 1.8.4.rc3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 09/11] si4713: si4713_set_rds_radio_text overwrites terminating \0
From: Hans Verkuil hans.verk...@cisco.com si4713_set_rds_radio_text will overwrite the terminating zero at the end of the rds radio text string in order to send out a carriage return as per the RDS spec. Use a separate char buffer for the CR instead of corrupting the control string. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Tested-by: Eduardo Valentin edubez...@gmail.com Acked-by: Eduardo Valentin edubez...@gmail.com --- drivers/media/radio/si4713/si4713.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.c index 097d4e0..17e0106 100644 --- a/drivers/media/radio/si4713/si4713.c +++ b/drivers/media/radio/si4713/si4713.c @@ -831,8 +831,9 @@ static int si4713_set_rds_ps_name(struct si4713_device *sdev, char *ps_name) return rval; } -static int si4713_set_rds_radio_text(struct si4713_device *sdev, char *rt) +static int si4713_set_rds_radio_text(struct si4713_device *sdev, const char *rt) { + static const char cr[RDS_RADIOTEXT_BLK_SIZE] = { RDS_CARRIAGE_RETURN, 0 }; int rval = 0, i; u16 t_index = 0; u8 b_index = 0, cr_inserted = 0; @@ -856,7 +857,7 @@ static int si4713_set_rds_radio_text(struct si4713_device *sdev, char *rt) for (i = 0; i RDS_RADIOTEXT_BLK_SIZE; i++) { if (!rt[t_index + i] || rt[t_index + i] == RDS_CARRIAGE_RETURN) { - rt[t_index + i] = RDS_CARRIAGE_RETURN; + rt = cr; cr_inserted = 1; break; } -- 1.8.4.rc3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 10/11] si4713: print product number
From: Eduardo Valentin edubez...@gmail.com Print the PN value, useful to check what chip the dev board has. Signed-off-by: Eduardo Valentin edubez...@gmail.com Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/radio/si4713/si4713.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.c index 17e0106..6f28a2b 100644 --- a/drivers/media/radio/si4713/si4713.c +++ b/drivers/media/radio/si4713/si4713.c @@ -464,7 +464,7 @@ static int si4713_checkrev(struct si4713_device *sdev) v4l2_info(sdev-sd, chip found @ 0x%02x (%s)\n, client-addr 1, client-adapter-name); } else { - v4l2_err(sdev-sd, Invalid product number\n); + v4l2_err(sdev-sd, Invalid product number 0x%X\n, resp[1]); rval = -EINVAL; } return rval; -- 1.8.4.rc3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 06/11] si4713: Added the USB driver for Si4713
From: Dinesh Ram dinesh@cern.ch This is the USB driver for the Silicon Labs development board. It contains the Si4713 FM transmitter chip. Signed-off-by: Dinesh Ram dinesh@cern.ch Signed-off-by: Hans Verkuil hans.verk...@cisco.com Tested-by: Eduardo Valentin edubez...@gmail.com Acked-by: Eduardo Valentin edubez...@gmail.com --- drivers/media/radio/si4713/Kconfig| 15 + drivers/media/radio/si4713/Makefile | 1 + drivers/media/radio/si4713/radio-usb-si4713.c | 540 ++ 3 files changed, 556 insertions(+) create mode 100644 drivers/media/radio/si4713/radio-usb-si4713.c diff --git a/drivers/media/radio/si4713/Kconfig b/drivers/media/radio/si4713/Kconfig index ec640b8..a7c3ba8 100644 --- a/drivers/media/radio/si4713/Kconfig +++ b/drivers/media/radio/si4713/Kconfig @@ -1,3 +1,18 @@ +config USB_SI4713 + tristate Silicon Labs Si4713 FM Radio Transmitter support with USB + depends on USB RADIO_SI4713 + select SI4713 + ---help--- + This is a driver for USB devices with the Silicon Labs SI4713 + chip. Currently these devices are known to work. + - 10c4:8244: Silicon Labs FM Transmitter USB device. + + Say Y here if you want to connect this type of radio to your + computer's USB port. + + To compile this driver as a module, choose M here: the + module will be called radio-usb-si4713. + config PLATFORM_SI4713 tristate Silicon Labs Si4713 FM Radio Transmitter support with I2C depends on I2C RADIO_SI4713 diff --git a/drivers/media/radio/si4713/Makefile b/drivers/media/radio/si4713/Makefile index a8c1194..ddaaf92 100644 --- a/drivers/media/radio/si4713/Makefile +++ b/drivers/media/radio/si4713/Makefile @@ -3,4 +3,5 @@ # obj-$(CONFIG_I2C_SI4713) += si4713.o +obj-$(CONFIG_USB_SI4713) += radio-usb-si4713.o obj-$(CONFIG_PLATFORM_SI4713) += radio-platform-si4713.o diff --git a/drivers/media/radio/si4713/radio-usb-si4713.c b/drivers/media/radio/si4713/radio-usb-si4713.c new file mode 100644 index 000..d978844 --- /dev/null +++ b/drivers/media/radio/si4713/radio-usb-si4713.c @@ -0,0 +1,540 @@ +/* + * Copyright 2013 Cisco Systems, Inc. and/or its affiliates. + * All rights reserved. + * + * This program is free software; you may redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* kernel includes */ +#include linux/kernel.h +#include linux/module.h +#include linux/usb.h +#include linux/init.h +#include linux/slab.h +#include linux/input.h +#include linux/mutex.h +#include linux/i2c.h +/* V4l includes */ +#include linux/videodev2.h +#include media/v4l2-common.h +#include media/v4l2-device.h +#include media/v4l2-ioctl.h +#include media/v4l2-event.h +#include media/si4713.h + +#include si4713.h + +/* driver and module definitions */ +MODULE_AUTHOR(Dinesh Ram dinesh@cern.ch); +MODULE_DESCRIPTION(Si4713 FM Transmitter USB driver); +MODULE_LICENSE(GPL v2); + +/* The Device announces itself as Cygnal Integrated Products, Inc. */ +#define USB_SI4713_VENDOR 0x10c4 +#define USB_SI4713_PRODUCT 0x8244 + +#define BUFFER_LENGTH 64 +#define USB_TIMEOUT1000 +#define USB_RESP_TIMEOUT 5 + +/* USB Device ID List */ +static struct usb_device_id usb_si4713_usb_device_table[] = { + {USB_DEVICE_AND_INTERFACE_INFO(USB_SI4713_VENDOR, USB_SI4713_PRODUCT, + USB_CLASS_HID, 0, 0) }, + { } /* Terminating entry */ +}; + +MODULE_DEVICE_TABLE(usb, usb_si4713_usb_device_table); + +struct si4713_usb_device { + struct usb_device *usbdev; + struct usb_interface*intf; + struct video_device vdev; + struct v4l2_device v4l2_dev; + struct v4l2_subdev *v4l2_subdev; + struct mutexlock; + struct i2c_adapter i2c_adapter; + + u8 *buffer; +}; + +static inline struct si4713_usb_device *to_si4713_dev(struct v4l2_device *v4l2_dev) +{ + return container_of(v4l2_dev, struct si4713_usb_device, v4l2_dev); +} + +static int vidioc_querycap(struct file *file, void *priv, + struct v4l2_capability *v) +{ + struct si4713_usb_device *radio = video_drvdata(file); + +
[PATCHv2 00/11] si4713: add si4713 usb driver
This is the second version of this patch series from Dinesh: http://www.spinics.net/lists/linux-media/msg68927.html It's identical to the first version except for two new patches: patch 10/11 prints the product number of the chip on the board and patch 11/11 fixes checkpatch warnings/errors in si4713.c and radio-usb-si4713.c. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv2 11/11] si4713: coding style cleanups
From: Hans Verkuil hans.verk...@cisco.com Fix most checkpatch errors/warnings. It's mostly whitespace changes, except for replacing msleep with usleep_range and the jiffies comparison with time_is_after_jiffies(). Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/radio/si4713/radio-usb-si4713.c | 4 +- drivers/media/radio/si4713/si4713.c | 104 +- 2 files changed, 55 insertions(+), 53 deletions(-) diff --git a/drivers/media/radio/si4713/radio-usb-si4713.c b/drivers/media/radio/si4713/radio-usb-si4713.c index d978844..691e487 100644 --- a/drivers/media/radio/si4713/radio-usb-si4713.c +++ b/drivers/media/radio/si4713/radio-usb-si4713.c @@ -207,7 +207,7 @@ static int si4713_send_startup_command(struct si4713_usb_device *radio) } if (time_is_before_jiffies(until_jiffies)) return -EIO; - msleep(3); + usleep_range(3000, 5000); } return retval; @@ -354,7 +354,7 @@ static int si4713_i2c_read(struct si4713_usb_device *radio, char *data, int len) data[0] = 0; return 0; } - msleep(3); + usleep_range(3000, 5000); } } diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.c index 6f28a2b..451b9c0 100644 --- a/drivers/media/radio/si4713/si4713.c +++ b/drivers/media/radio/si4713/si4713.c @@ -50,12 +50,12 @@ MODULE_VERSION(0.0.1); #define DEFAULT_RDS_PS_REPEAT_COUNT0x0003 #define DEFAULT_LIMITER_RTIME 0x1392 #define DEFAULT_LIMITER_DEV0x102CA -#define DEFAULT_PILOT_FREQUENCY0x4A38 +#define DEFAULT_PILOT_FREQUENCY0x4A38 #define DEFAULT_PILOT_DEVIATION0x1A5E #define DEFAULT_ACOMP_ATIME0x #define DEFAULT_ACOMP_RTIME0xF4240L #define DEFAULT_ACOMP_GAIN 0x0F -#define DEFAULT_ACOMP_THRESHOLD(-0x28) +#define DEFAULT_ACOMP_THRESHOLD(-0x28) #define DEFAULT_MUTE 0x01 #define DEFAULT_POWER_LEVEL88 #define DEFAULT_FREQUENCY 8800 @@ -252,8 +252,8 @@ static int si4713_send_command(struct si4713_device *sdev, const u8 command, if (client-irq) return -EBUSY; - msleep(1); - } while (jiffies = until_jiffies); + usleep_range(1000, 2000); + } while (time_is_after_jiffies(until_jiffies)); return -EBUSY; } @@ -269,9 +269,9 @@ static int si4713_read_property(struct si4713_device *sdev, u16 prop, u32 *pv) int err; u8 val[SI4713_GET_PROP_NRESP]; /* -* .First byte = 0 -* .Second byte = property's MSB -* .Third byte = property's LSB +* .First byte = 0 +* .Second byte = property's MSB +* .Third byte = property's LSB */ const u8 args[SI4713_GET_PROP_NARGS] = { 0x00, @@ -306,11 +306,11 @@ static int si4713_write_property(struct si4713_device *sdev, u16 prop, u16 val) int rval; u8 resp[SI4713_SET_PROP_NRESP]; /* -* .First byte = 0 -* .Second byte = property's MSB -* .Third byte = property's LSB -* .Fourth byte = value's MSB -* .Fifth byte = value's LSB +* .First byte = 0 +* .Second byte = property's MSB +* .Third byte = property's LSB +* .Fourth byte = value's MSB +* .Fifth byte = value's LSB */ const u8 args[SI4713_SET_PROP_NARGS] = { 0x00, @@ -352,8 +352,8 @@ static int si4713_powerup(struct si4713_device *sdev) int err; u8 resp[SI4713_PWUP_NRESP]; /* -* .First byte = Enabled interrupts and boot function -* .Second byte = Input operation mode +* .First byte = Enabled interrupts and boot function +* .Second byte = Input operation mode */ u8 args[SI4713_PWUP_NARGS] = { SI4713_PWUP_GPO2OEN | SI4713_PWUP_FUNC_TX, @@ -505,18 +505,18 @@ static int si4713_wait_stc(struct si4713_device *sdev, const int usecs) } if (jiffies_to_usecs(jiffies - start_jiffies) usecs) return err 0 ? err : -EIO; - /* We sleep here for 3 ms in order to avoid flooding the device + /* We sleep here for 3-4 ms in order to avoid flooding the device * with USB requests. The si4713 USB driver was developed * by reverse engineering the Windows USB driver. The windows * driver also has a ~2.5 ms delay between responses. */ - msleep(3); + usleep_range(3000, 4000); } } /* * si4713_tx_tune_freq - Sets the state of the RF
[PATCHv2 02/11] si4713: Modified i2c driver to handle cases where interrupts are not used
From: Dinesh Ram dinesh@cern.ch Checks have been introduced at several places in the code to test if an interrupt is set or not. For devices which do not use the interrupt, to get a valid response, within a specified timeout, the device is polled instead. Signed-off-by: Dinesh Ram dinesh@cern.ch Signed-off-by: Hans Verkuil hans.verk...@cisco.com Tested-by: Eduardo Valentin edubez...@gmail.com Acked-by: Eduardo Valentin edubez...@gmail.com --- drivers/media/radio/si4713/si4713.c | 108 +--- 1 file changed, 64 insertions(+), 44 deletions(-) diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.c index 4f3308f..5d26b9a 100644 --- a/drivers/media/radio/si4713/si4713.c +++ b/drivers/media/radio/si4713/si4713.c @@ -27,11 +27,11 @@ #include linux/i2c.h #include linux/slab.h #include linux/gpio.h -#include linux/regulator/consumer.h #include linux/module.h #include media/v4l2-device.h #include media/v4l2-ioctl.h #include media/v4l2-common.h +#include linux/regulator/consumer.h #include si4713.h @@ -213,6 +213,7 @@ static int si4713_send_command(struct si4713_device *sdev, const u8 command, u8 response[], const int respn, const int usecs) { struct i2c_client *client = v4l2_get_subdevdata(sdev-sd); + unsigned long until_jiffies; u8 data1[MAX_ARGS + 1]; int err; @@ -228,30 +229,39 @@ static int si4713_send_command(struct si4713_device *sdev, const u8 command, if (err != argn + 1) { v4l2_err(sdev-sd, Error while sending command 0x%02x\n, command); - return (err 0) ? -EIO : err; + return err 0 ? err : -EIO; } + until_jiffies = jiffies + usecs_to_jiffies(usecs) + 1; + /* Wait response from interrupt */ - if (!wait_for_completion_timeout(sdev-work, + if (client-irq) { + if (!wait_for_completion_timeout(sdev-work, usecs_to_jiffies(usecs) + 1)) - v4l2_warn(sdev-sd, + v4l2_warn(sdev-sd, (%s) Device took too much time to answer.\n, __func__); - - /* Then get the response */ - err = i2c_master_recv(client, response, respn); - if (err != respn) { - v4l2_err(sdev-sd, - Error while reading response for command 0x%02x\n, - command); - return (err 0) ? -EIO : err; } - DBG_BUFFER(sdev-sd, Response, response, respn); - if (check_command_failed(response[0])) - return -EBUSY; + do { + err = i2c_master_recv(client, response, respn); + if (err != respn) { + v4l2_err(sdev-sd, + Error %d while reading response for command 0x%02x\n, + err, command); + return err 0 ? err : -EIO; + } + + DBG_BUFFER(sdev-sd, Response, response, respn); + if (!check_command_failed(response[0])) + return 0; - return 0; + if (client-irq) + return -EBUSY; + msleep(1); + } while (jiffies = until_jiffies); + + return -EBUSY; } /* @@ -344,14 +354,15 @@ static int si4713_write_property(struct si4713_device *sdev, u16 prop, u16 val) */ static int si4713_powerup(struct si4713_device *sdev) { + struct i2c_client *client = v4l2_get_subdevdata(sdev-sd); int err; u8 resp[SI4713_PWUP_NRESP]; /* * .First byte = Enabled interrupts and boot function * .Second byte = Input operation mode */ - const u8 args[SI4713_PWUP_NARGS] = { - SI4713_PWUP_CTSIEN | SI4713_PWUP_GPO2OEN | SI4713_PWUP_FUNC_TX, + u8 args[SI4713_PWUP_NARGS] = { + SI4713_PWUP_GPO2OEN | SI4713_PWUP_FUNC_TX, SI4713_PWUP_OPMOD_ANALOG, }; @@ -369,6 +380,9 @@ static int si4713_powerup(struct si4713_device *sdev) gpio_set_value(sdev-gpio_reset, 1); } + if (client-irq) + args[0] |= SI4713_PWUP_CTSIEN; + err = si4713_send_command(sdev, SI4713_CMD_POWER_UP, args, ARRAY_SIZE(args), resp, ARRAY_SIZE(resp), @@ -380,7 +394,8 @@ static int si4713_powerup(struct si4713_device *sdev) v4l2_dbg(1, debug, sdev-sd, Device in power up mode\n); sdev-power_state = POWER_ON; - err = si4713_write_property(sdev, SI4713_GPO_IEN, + if (client-irq) + err = si4713_write_property(sdev, SI4713_GPO_IEN, SI4713_STC_INT | SI4713_CTS); }
Re: omap3isp device tree support
Hello, On 12/06/2013 11:13 AM, Enrico wrote: Hi, i know there is some work going on for omap3isp device tree support, but right now is it possible to enable it in some other way in a DT kernel? The DT support is not yet ready, but an RFC binding has been proposed. It won't be ready for 3.14. I've tried enabling it in board-generic.c (omap3_init_camera(...) with proper platform data) but it hangs early at boot, do someone know if it's possible and how to do it? I did the same a few days ago, and went through several problems (panics, half DT support,...). Now I am able to probe the ISP, I still have one kernel panic to fix. Hope to send the patches in 1 or 2 days. We are still in a transition period, but things should calm down in the coming releases. Cheers, Florian [1] http://www.spinics.net/lists/linux-media/msg69424.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: omap3isp device tree support
On Fri, Dec 6, 2013 at 11:31 AM, Florian Vaussard florian.vauss...@epfl.ch wrote: Hello, On 12/06/2013 11:13 AM, Enrico wrote: Hi, i know there is some work going on for omap3isp device tree support, but right now is it possible to enable it in some other way in a DT kernel? The DT support is not yet ready, but an RFC binding has been proposed. It won't be ready for 3.14. I've tried enabling it in board-generic.c (omap3_init_camera(...) with proper platform data) but it hangs early at boot, do someone know if it's possible and how to do it? I did the same a few days ago, and went through several problems (panics, half DT support,...). Now I am able to probe the ISP, I still have one kernel panic to fix. Hope to send the patches in 1 or 2 days. We are still in a transition period, but things should calm down in the coming releases. Cheers, Florian [1] http://www.spinics.net/lists/linux-media/msg69424.html Thanks Florian, i will gladly help in testing. Enrico -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv5][ 3/8] staging: imx-drm: Correct BGR666 and the board's dts that use them.
On Thu, Dec 05, 2013 at 07:28:07PM +0100, Denis Carikli wrote: [...] diff --git a/arch/arm/boot/dts/imx51-apf51dev.dts b/arch/arm/boot/dts/imx51-apf51dev.dts index f36a3aa..3b6de6a 100644 --- a/arch/arm/boot/dts/imx51-apf51dev.dts +++ b/arch/arm/boot/dts/imx51-apf51dev.dts @@ -19,7 +19,7 @@ display@di1 { I know this isn't introduced by your patch, but WTF??? Thierry pgpC0LG2R1tDP.pgp Description: PGP signature
Re: [PATCHv5][ 2/8] staging: imx-drm: Add RGB666 support for parallel display.
On Thu, Dec 05, 2013 at 07:28:06PM +0100, Denis Carikli wrote: [...] diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c [...] @@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_BGR666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; Why is this DRM driver even using V4L2 pixel formats in the first place? Thierry pgpCx5QbEe39s.pgp Description: PGP signature
Re: [PATCHv2 11/11] si4713: coding style cleanups
On Fri, Dec 6, 2013 at 6:17 AM, Hans Verkuil hverk...@xs4all.nl wrote: From: Hans Verkuil hans.verk...@cisco.com Fix most checkpatch errors/warnings. It's mostly whitespace changes, except for replacing msleep with usleep_range and the jiffies comparison with time_is_after_jiffies(). Signed-off-by: Hans Verkuil hans.verk...@cisco.com Acked-by: Eduardo Valentin edubez...@gmail.com --- drivers/media/radio/si4713/radio-usb-si4713.c | 4 +- drivers/media/radio/si4713/si4713.c | 104 +- 2 files changed, 55 insertions(+), 53 deletions(-) diff --git a/drivers/media/radio/si4713/radio-usb-si4713.c b/drivers/media/radio/si4713/radio-usb-si4713.c index d978844..691e487 100644 --- a/drivers/media/radio/si4713/radio-usb-si4713.c +++ b/drivers/media/radio/si4713/radio-usb-si4713.c @@ -207,7 +207,7 @@ static int si4713_send_startup_command(struct si4713_usb_device *radio) } if (time_is_before_jiffies(until_jiffies)) return -EIO; - msleep(3); + usleep_range(3000, 5000); } return retval; @@ -354,7 +354,7 @@ static int si4713_i2c_read(struct si4713_usb_device *radio, char *data, int len) data[0] = 0; return 0; } - msleep(3); + usleep_range(3000, 5000); } } diff --git a/drivers/media/radio/si4713/si4713.c b/drivers/media/radio/si4713/si4713.c index 6f28a2b..451b9c0 100644 --- a/drivers/media/radio/si4713/si4713.c +++ b/drivers/media/radio/si4713/si4713.c @@ -50,12 +50,12 @@ MODULE_VERSION(0.0.1); #define DEFAULT_RDS_PS_REPEAT_COUNT0x0003 #define DEFAULT_LIMITER_RTIME 0x1392 #define DEFAULT_LIMITER_DEV0x102CA -#define DEFAULT_PILOT_FREQUENCY0x4A38 +#define DEFAULT_PILOT_FREQUENCY0x4A38 #define DEFAULT_PILOT_DEVIATION0x1A5E #define DEFAULT_ACOMP_ATIME0x #define DEFAULT_ACOMP_RTIME0xF4240L #define DEFAULT_ACOMP_GAIN 0x0F -#define DEFAULT_ACOMP_THRESHOLD(-0x28) +#define DEFAULT_ACOMP_THRESHOLD(-0x28) #define DEFAULT_MUTE 0x01 #define DEFAULT_POWER_LEVEL88 #define DEFAULT_FREQUENCY 8800 @@ -252,8 +252,8 @@ static int si4713_send_command(struct si4713_device *sdev, const u8 command, if (client-irq) return -EBUSY; - msleep(1); - } while (jiffies = until_jiffies); + usleep_range(1000, 2000); + } while (time_is_after_jiffies(until_jiffies)); return -EBUSY; } @@ -269,9 +269,9 @@ static int si4713_read_property(struct si4713_device *sdev, u16 prop, u32 *pv) int err; u8 val[SI4713_GET_PROP_NRESP]; /* -* .First byte = 0 -* .Second byte = property's MSB -* .Third byte = property's LSB +* .First byte = 0 +* .Second byte = property's MSB +* .Third byte = property's LSB */ const u8 args[SI4713_GET_PROP_NARGS] = { 0x00, @@ -306,11 +306,11 @@ static int si4713_write_property(struct si4713_device *sdev, u16 prop, u16 val) int rval; u8 resp[SI4713_SET_PROP_NRESP]; /* -* .First byte = 0 -* .Second byte = property's MSB -* .Third byte = property's LSB -* .Fourth byte = value's MSB -* .Fifth byte = value's LSB +* .First byte = 0 +* .Second byte = property's MSB +* .Third byte = property's LSB +* .Fourth byte = value's MSB +* .Fifth byte = value's LSB */ const u8 args[SI4713_SET_PROP_NARGS] = { 0x00, @@ -352,8 +352,8 @@ static int si4713_powerup(struct si4713_device *sdev) int err; u8 resp[SI4713_PWUP_NRESP]; /* -* .First byte = Enabled interrupts and boot function -* .Second byte = Input operation mode +* .First byte = Enabled interrupts and boot function +* .Second byte = Input operation mode */ u8 args[SI4713_PWUP_NARGS] = { SI4713_PWUP_GPO2OEN | SI4713_PWUP_FUNC_TX, @@ -505,18 +505,18 @@ static int si4713_wait_stc(struct si4713_device *sdev, const int usecs) } if (jiffies_to_usecs(jiffies - start_jiffies) usecs) return err 0 ? err : -EIO; - /* We sleep here for 3 ms in order to avoid flooding the device + /* We sleep here for 3-4 ms in order to avoid flooding the device * with USB requests. The si4713 USB driver was developed * by reverse engineering the Windows USB
Re: [PATCHv5][ 2/8] staging: imx-drm: Add RGB666 support for parallel display.
Am Freitag, den 06.12.2013, 14:14 +0100 schrieb Thierry Reding: On Thu, Dec 05, 2013 at 07:28:06PM +0100, Denis Carikli wrote: [...] diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c [...] @@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_BGR666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; Why is this DRM driver even using V4L2 pixel formats in the first place? Because imx-drm is actually a misnomer. The i.MX IPU is a multifunction device, which as one part has the display controllers, but also camera interfaces and mem-to-mem scaler devices, which are hooked up via the V4L2 interface. The generic IPU part, which is used for example for programming the DMA channels is using V4L2 pixel formats as a common base. We have patches to split this out and make this fact more visible. (The IPU core will be placed aside the Tegra host1x driver) Regards, Lucas -- Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv5][ 2/8] staging: imx-drm: Add RGB666 support for parallel display.
On Fri, Dec 06, 2013 at 02:29:22PM +0100, Lucas Stach wrote: Am Freitag, den 06.12.2013, 14:14 +0100 schrieb Thierry Reding: On Thu, Dec 05, 2013 at 07:28:06PM +0100, Denis Carikli wrote: [...] diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c [...] @@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_BGR666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; Why is this DRM driver even using V4L2 pixel formats in the first place? Because imx-drm is actually a misnomer. The i.MX IPU is a multifunction device, which as one part has the display controllers, but also camera interfaces and mem-to-mem scaler devices, which are hooked up via the V4L2 interface. The generic IPU part, which is used for example for programming the DMA channels is using V4L2 pixel formats as a common base. We have patches to split this out and make this fact more visible. (The IPU core will be placed aside the Tegra host1x driver) Have you considered splitting thing up further and move out the display controller driver to DRM and the camera driver to V4L2? I mean, if that is even possible with a reasonable amount of work. Is the mem-to-mem the same as the DMA channels you mentioned? If it only does DMA, why does it even need to worry about pixel formats? Thierry pgpDJUGj56GQ6.pgp Description: PGP signature
Syslog: no unique id
22:27:40 chris-satellite kernel: [ 177.886634] usb 1-2: new high-speed USB device number 6 using ehci-pci Dec 6 22:27:40 chris-satellite kernel: [ 178.022346] usb 1-2: New USB device found, idVendor=eb1a, idProduct=2870 Dec 6 22:27:40 chris-satellite kernel: [ 178.022365] usb 1-2: New USB device strings: Mfr=0, Product=1, SerialNumber=0 Dec 6 22:27:40 chris-satellite kernel: [ 178.022374] usb 1-2: Product: USB 2870 Device Dec 6 22:27:40 chris-satellite kernel: [ 178.023894] em28xx: New device USB 2870 Device @ 480 Mbps (eb1a:2870, interface 0, class 0) Dec 6 22:27:40 chris-satellite kernel: [ 178.023910] em28xx: Video interface 0 found: isoc Dec 6 22:27:40 chris-satellite kernel: [ 178.023916] em28xx: DVB interface 0 found: isoc Dec 6 22:27:40 chris-satellite kernel: [ 178.024833] em28xx: chip ID is em2870 Dec 6 22:27:40 chris-satellite kernel: [ 178.103801] em2870 #0: i2c eeprom 00: 1a eb 67 95 1a eb 70 28 c0 12 81 00 6a 22 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.103839] em2870 #0: i2c eeprom 10: 00 00 04 57 02 0d 00 00 00 00 00 00 00 00 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.103868] em2870 #0: i2c eeprom 20: 44 00 00 00 f0 10 02 00 00 00 00 00 5b 00 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.103896] em2870 #0: i2c eeprom 30: 00 00 20 40 20 80 02 20 01 01 00 00 44 1c 42 49 Dec 6 22:27:40 chris-satellite kernel: [ 178.103925] em2870 #0: i2c eeprom 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.103952] em2870 #0: i2c eeprom 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.103980] em2870 #0: i2c eeprom 60: 00 00 00 00 00 00 00 00 00 00 22 03 55 00 53 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.104008] em2870 #0: i2c eeprom 70: 42 00 20 00 32 00 38 00 37 00 30 00 20 00 44 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.104035] em2870 #0: i2c eeprom 80: 65 00 76 00 69 00 63 00 65 00 00 00 00 00 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.104062] em2870 #0: i2c eeprom 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.104089] em2870 #0: i2c eeprom a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.104116] em2870 #0: i2c eeprom b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.104144] em2870 #0: i2c eeprom c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.104171] em2870 #0: i2c eeprom d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.104286] em2870 #0: i2c eeprom e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.104314] em2870 #0: i2c eeprom f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Dec 6 22:27:40 chris-satellite kernel: [ 178.104348] em2870 #0: EEPROM ID = 1a eb 67 95, EEPROM hash = 0xde2bf8c0 Dec 6 22:27:40 chris-satellite kernel: [ 178.104357] em2870 #0: EEPROM info: Dec 6 22:27:40 chris-satellite kernel: [ 178.104363] em2870 #0: No audio on board. Dec 6 22:27:40 chris-satellite kernel: [ 178.104368] em2870 #0: 500mA max power Dec 6 22:27:40 chris-satellite kernel: [ 178.104376] em2870 #0: Table at offset 0x04, strings=0x226a, 0x, 0x Dec 6 22:27:40 chris-satellite kernel: [ 178.106971] em2870 #0: No sensor detected Dec 6 22:27:40 chris-satellite kernel: [ 178.139691] em2870 #0: found i2c device @ 0xa0 on bus 0 [eeprom] Dec 6 22:27:40 chris-satellite kernel: [ 178.145674] em2870 #0: found i2c device @ 0xc0 on bus 0 [tuner (analog)] Dec 6 22:27:40 chris-satellite kernel: [ 178.158169] em2870 #0: Your board has no unique USB ID and thus need a hint to be detected. Dec 6 22:27:40 chris-satellite kernel: [ 178.158188] em2870 #0: You may try to use card=n insmod option to workaround that. Dec 6 22:27:40 chris-satellite kernel: [ 178.158194] em2870 #0: Please send an email with this log to: Dec 6 22:27:40 chris-satellite kernel: [ 178.158200] em2870 #0: V4L Mailing List linux-media@vger.kernel.org Dec 6 22:27:40 chris-satellite kernel: [ 178.158207] em2870 #0: Board eeprom hash is 0xde2bf8c0 Dec 6 22:27:40 chris-satellite kernel: [ 178.158213] em2870 #0: Board i2c devicelist hash is 0x4b800080 Dec 6 22:27:40 chris-satellite kernel: [ 178.158218] em2870 #0: Here is a list of valid choices for the card=n insmod option: Dec 6 22:27:40 chris-satellite kernel: [ 178.158225] em2870 #0: card=0 - Unknown EM2800 video grabber Dec 6 22:27:40 chris-satellite kernel: [ 178.158232] em2870 #0: card=1 - Unknown EM2750/28xx video grabber Dec 6 22:27:40 chris-satellite kernel: [ 178.158238] em2870 #0: card=2 - Terratec Cinergy 250 USB Dec 6 22:27:40 chris-satellite kernel: [ 178.158244] em2870 #0: card=3 - Pinnacle PCTV USB 2 Dec 6 22:27:40
Re: [PATCH V2 -next] [media] media: i2c: lm3560: fix missing unlock on error in lm3560_get_ctrl().
Hi Daniel, Thanks for the update. On Fri, Dec 06, 2013 at 02:43:27PM +0900, Daniel Jeong wrote: Sorry I should have checked below things before sending the first patch. Applied to my tree with the above line removed, and subject changed slightly to mention the other change. I hope that's ok for you. The subject becomes media: i2c: lm3560: fix missing unlock on error, fault handling. I'll send a pull req over the week-end. -- Kind regards. Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: RFC: Properties, Configuration Storage, Selections and Matrices
Hi Hans, Thank you for working on this, and my apologies for not reviewing it earlier. On 11/23/2013 03:07 PM, Hans Verkuil wrote: Another update: While attempting to add fake 'shadow register' support to vivi I realized that the API to set up configuration stores didn't quite work out. Supporting shadow registers is one of the main goals of the configuration storage idea, so this should work smoothly. In the original proposal a configuration store is set by VIDIOC_S_EXT_CTRLS and any controls not in the control list will also be absent from the configuration store. That makes no sense for shadow registers: i.e. you will always have N sets of X registers and when switching from one set to another you switch them all. So the API has been changed a bit: all the driver-defined configuration stores are always there and you can enumerate, get and set all the controls in each store. If controls are implemented as shadow registers, then the driver will tell the framework which of the configuration stores is the current store (i.e. which store maps to the currently selected shadow register) and switching from one configuration store to another will just update the current store of a control to the new one. If controls are not implemented as a shadow register and you really just want to apply the new values from a configuration store, then that will actually involve copying the values from the selected store to the current control values. This approach made implementing fake shadow registers in vivi a trivial exercise and worked out much better. In addition, internal data structures became simpler as well (always a good sign). My next step will be to add selection support as properties and see if I can add per-frame crop/compose support to vivi. Regards, Hans On 11/19/2013 09:10 AM, Hans Verkuil wrote: Just a quick update: I've been working on this for the past four days and I am now in the process of testing this. Adding matrix support to the control framework was actually the hardest part, particularly since I wanted it to be efficient. The code is still a bit too complex for my liking, but once testing verifies that everything is working I plan to clean things up some more. I hope to be able to post a first version during or just after the weekend. Please review this RFC: other than some small changes this is pretty much how it will turn out. Some of the changes are: - The property bit is 26, not 27. Bit 27 clashes with the PRIVATE_BASE define so it can't be used. - Any control/property type can be changed into a matrix by setting bit 15 in the type. E.g. V4l2_PROP_TYPE_MATRIX | V4L2_CTRL_TYPE_INTEGER. When passing the data of a matrix the data is always preceded by a struct v4l2_rect which tells the driver which subset of the matrix the application wants to set/get. - We definitely need a V4L2_CTRL_FLAG_CAN_STORE flag. Stores take memory and you only want to allocate that for those controls that actually need to be stored. - Regarding implementing stores for matrices: I store it in the internal format, but with additional information regarding the parts of the matrix that need to be updated. Basically the best of both worlds. With some careful tweaking of data structure this turned out to be fairly easy to do. This systems allows you to update only parts of a matrix in a config store efficiently without having to convert from one format to another. Regards, Hans On 11/15/2013 03:19 PM, Hans Verkuil wrote: Properties, Configuration Storage, Selections and Matrices == This proposal is an attempt to solve multiple issues with one single solution. There have been various discussions in the past regarding a property-based API. Basically similar to the way controls are handled but without having to deal with the GUI-related aspects of controls and with more flexibility with regards to supported types. Another discussion is about how to atomically set certain pipeline configurations, selections in particular. And for Android's camera3 library we also need to switch configuration on a per-buffer or per-frame basis, so we need some sort of configuration store. Also, I proposed an API extension for matrices: http://www.spinics.net/lists/linux-media/msg67326.html This would fit better in a property-based API. Recent discussions regarding multi-selection also ran into the same atomicity problems and unhappiness about the impact of the API changes necessary to support multi-selection. It is quite easy to extend the control framework to support pretty much all of the requirements stated above. It already satisfies the atomicity requirements (by far the hardest to implement), and extending it to support compound, array and matrix types isn't hard either. Neither is implementing a configuration store. One important observation regarding configuration stores: the information it can contain should be information
cron job: media_tree daily build: ERRORS
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Sat Dec 7 04:00:24 CET 2013 git branch: test git hash: 3f823e094b935c1882605f8720336ee23433a16d gcc version:i686-linux-gcc (GCC) 4.8.1 sparse version: 0.4.5-rc1 host hardware: x86_64 host os:3.12-0.slh.2-amd64 linux-git-arm-at91: OK linux-git-arm-davinci: OK linux-git-arm-exynos: OK linux-git-arm-mx: OK linux-git-arm-omap: OK linux-git-arm-omap1: OK linux-git-arm-pxa: OK linux-git-blackfin: OK linux-git-i686: OK linux-git-m32r: OK linux-git-mips: OK linux-git-powerpc64: OK linux-git-sh: OK linux-git-x86_64: OK linux-2.6.31.14-i686: ERRORS linux-2.6.32.27-i686: ERRORS linux-2.6.33.7-i686: WARNINGS linux-2.6.34.7-i686: WARNINGS linux-2.6.35.9-i686: WARNINGS linux-2.6.36.4-i686: WARNINGS linux-2.6.37.6-i686: WARNINGS linux-2.6.38.8-i686: WARNINGS linux-2.6.39.4-i686: WARNINGS linux-3.0.60-i686: WARNINGS linux-3.1.10-i686: WARNINGS linux-3.2.37-i686: OK linux-3.3.8-i686: OK linux-3.4.27-i686: WARNINGS linux-3.5.7-i686: WARNINGS linux-3.6.11-i686: WARNINGS linux-3.7.4-i686: WARNINGS linux-3.8-i686: WARNINGS linux-3.9.2-i686: WARNINGS linux-3.10.1-i686: OK linux-3.11.1-i686: OK linux-3.12-i686: OK linux-3.13-rc1-i686: OK linux-2.6.31.14-x86_64: ERRORS linux-2.6.32.27-x86_64: ERRORS linux-2.6.33.7-x86_64: WARNINGS linux-2.6.34.7-x86_64: WARNINGS linux-2.6.35.9-x86_64: WARNINGS linux-2.6.36.4-x86_64: WARNINGS linux-2.6.37.6-x86_64: WARNINGS linux-2.6.38.8-x86_64: WARNINGS linux-2.6.39.4-x86_64: WARNINGS linux-3.0.60-x86_64: WARNINGS linux-3.1.10-x86_64: WARNINGS linux-3.2.37-x86_64: OK linux-3.3.8-x86_64: OK linux-3.4.27-x86_64: WARNINGS linux-3.5.7-x86_64: WARNINGS linux-3.6.11-x86_64: WARNINGS linux-3.7.4-x86_64: WARNINGS linux-3.8-x86_64: WARNINGS linux-3.9.2-x86_64: WARNINGS linux-3.10.1-x86_64: OK linux-3.11.1-x86_64: OK linux-3.12-x86_64: OK linux-3.13-rc1-x86_64: OK apps: WARNINGS spec-git: OK sparse version: 0.4.5-rc1 sparse: ERRORS Detailed results are available here: http://www.xs4all.nl/~hverkuil/logs/Saturday.log Full logs are available here: http://www.xs4all.nl/~hverkuil/logs/Saturday.tar.bz2 The Media Infrastructure API from this daily build is here: http://www.xs4all.nl/~hverkuil/spec/media.html -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html