* [PATCH 0/1] Add support for TEA5761 (from linux-omap)
@ 2008-06-03 15:25 Eduardo Valentin
2008-06-03 15:25 ` [PATCH 1/1] Add support for tea5761 chip Eduardo Valentin
2008-06-03 15:44 ` [PATCH 0/1] Add support for TEA5761 (from linux-omap) Michael Krufky
0 siblings, 2 replies; 14+ messages in thread
From: Eduardo Valentin @ 2008-06-03 15:25 UTC (permalink / raw)
To: Linux and Kernel Video; +Cc: Tony Lindgren, Eduardo Valentin, Sakari Ailus
From: Eduardo Valentin <eduardo.valentin@indt.org.br>
Hi guys,
This patch is just an update from linux-omap tree.
It is a v4l2 driver which is only in linux-omap tree.
I'm just sendint it to proper repository.
It adds support for tea5761 chip.
It is a v4l2 driver which exports a radio interface.
Comments are wellcome!
Cheers,
Eduardo Valentin (1):
Add support for tea5761 chip
drivers/media/radio/Kconfig | 13 +
drivers/media/radio/Makefile | 1 +
drivers/media/radio/radio-tea5761.c | 516 +++++++++++++++++++++++++++++++++++
3 files changed, 530 insertions(+), 0 deletions(-)
create mode 100644 drivers/media/radio/radio-tea5761.c
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/1] Add support for tea5761 chip
2008-06-03 15:25 [PATCH 0/1] Add support for TEA5761 (from linux-omap) Eduardo Valentin
@ 2008-06-03 15:25 ` Eduardo Valentin
2008-06-03 15:44 ` [PATCH 0/1] Add support for TEA5761 (from linux-omap) Michael Krufky
1 sibling, 0 replies; 14+ messages in thread
From: Eduardo Valentin @ 2008-06-03 15:25 UTC (permalink / raw)
To: Linux and Kernel Video; +Cc: Tony Lindgren, Eduardo Valentin, Sakari Ailus
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=unknown-8bit, Size: 15634 bytes --]
From: Eduardo Valentin <eduardo.valentin@indt.org.br>
This patch adds support for tea5761 chip. This chip
is a FM receiver. It basically exports a radio interface
through V4L2 api. This support uses i2c protocol to
communicate with this chip.
Signed-off-by: Eduardo Valentin <eduardo.valentin@indt.org.br>
---
drivers/media/radio/Kconfig | 13 +
drivers/media/radio/Makefile | 1 +
drivers/media/radio/radio-tea5761.c | 516 +++++++++++++++++++++++++++++++++++
3 files changed, 530 insertions(+), 0 deletions(-)
create mode 100644 drivers/media/radio/radio-tea5761.c
diff --git a/drivers/media/radio/Kconfig b/drivers/media/radio/Kconfig
index 1b41b3f..de6ca27 100644
--- a/drivers/media/radio/Kconfig
+++ b/drivers/media/radio/Kconfig
@@ -339,6 +339,19 @@ config RADIO_ZOLTRIX_PORT
help
Enter the I/O port of your Zoltrix radio card.
+config RADIO_TEA5761
+ tristate "Philips Semiconductors TEA5761 I2C FM Radio"
+ help
+ Choose Y here if you have one of these AM/FM radio cards.
+
+ In order to control your radio card, you will need to use programs
+ that are compatible with the Video For Linux 2 API. Information on
+ this API and pointers to "v4l" programs may be found at
+ <file:Documentation/video4linux/API.html>.
+
+ To compile this driver as a module, choose M here: the
+ module will be called radio-tea5761.
+
config USB_DSBR
tristate "D-Link/GemTek USB FM radio support"
depends on USB && VIDEO_V4L2
diff --git a/drivers/media/radio/Makefile b/drivers/media/radio/Makefile
index a30159f..f5bffcc 100644
--- a/drivers/media/radio/Makefile
+++ b/drivers/media/radio/Makefile
@@ -20,6 +20,7 @@ obj-$(CONFIG_RADIO_GEMTEK) += radio-gemtek.o
obj-$(CONFIG_RADIO_GEMTEK_PCI) += radio-gemtek-pci.o
obj-$(CONFIG_RADIO_TRUST) += radio-trust.o
obj-$(CONFIG_RADIO_MAESTRO) += radio-maestro.o
+obj-$(CONFIG_RADIO_TEA5761) += radio-tea5761.o
obj-$(CONFIG_USB_DSBR) += dsbr100.o
obj-$(CONFIG_USB_SI470X) += radio-si470x.o
diff --git a/drivers/media/radio/radio-tea5761.c b/drivers/media/radio/radio-tea5761.c
new file mode 100644
index 0000000..e8ccf29
--- /dev/null
+++ b/drivers/media/radio/radio-tea5761.c
@@ -0,0 +1,516 @@
+/*
+ * drivers/media/radio/radio-tea5761.c
+ *
+ * Copyright (C) 2005 Nokia Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include <linux/module.h>
+#include <linux/version.h>
+#include <linux/init.h>
+#include <linux/i2c.h>
+#include <linux/delay.h>
+#include <media/v4l2-common.h>
+
+#define DRIVER_NAME "tea5761"
+
+#define TEA5761_VERSION KERNEL_VERSION(0, 0, 1)
+
+#define TEA5761_I2C_ADDR 0x10
+
+#define TEA5761_MANID 0x002b
+#define TEA5761_CHIPID 0x5761
+
+#define TEA5761_INTREG_BLMSK 0x0001
+#define TEA5761_INTREG_FRRMSK 0x0002
+#define TEA5761_INTREG_LEVMSK 0x0008
+#define TEA5761_INTREG_IFMSK 0x0010
+#define TEA5761_INTREG_BLMFLAG 0x0100
+#define TEA5761_INTREG_FRRFLAG 0x0200
+#define TEA5761_INTREG_LEVFLAG 0x0800
+#define TEA5761_INTREG_IFFLAG 0x1000
+
+#define TEA5761_FRQSET_SUD 0x8000
+#define TEA5761_FRQSET_SM 0x4000
+
+#define TEA5761_TNCTRL_PUPD0 0x4000
+#define TEA5761_TNCTRL_BLIM 0x2000
+#define TEA5761_TNCTRL_SWPM 0x1000
+#define TEA5761_TNCTRL_IFCTC 0x0800
+#define TEA5761_TNCTRL_AFM 0x0400
+#define TEA5761_TNCTRL_SMUTE 0x0200
+#define TEA5761_TNCTRL_SNC 0x0100
+#define TEA5761_TNCTRL_MU 0x0080
+#define TEA5761_TNCTRL_SSL1 0x0040
+#define TEA5761_TNCTRL_SSL0 0x0020
+#define TEA5761_TNCTRL_HLSI 0x0010
+#define TEA5761_TNCTRL_MST 0x0008
+#define TEA5761_TNCTRL_SWP 0x0004
+#define TEA5761_TNCTRL_DTC 0x0002
+#define TEA5761_TNCTRL_AHLSI 0x0001
+
+#define TEA5761_TUNCHK_LEVEL(x) (((x) & 0x00F0) >> 4)
+#define TEA5761_TUNCHK_IFCNT(x) (((x) & 0xFE00) >> 9)
+#define TEA5761_TUNCHK_TUNTO 0x0100
+#define TEA5761_TUNCHK_LD 0x0008
+#define TEA5761_TUNCHK_STEREO 0x0004
+
+#define TEA5761_TESTREG_TRIGFR 0x0800
+
+#define TEA5761_FREQ_LOW 87500
+#define TEA5761_FREQ_HIGH 108000
+
+struct tea5761_regs {
+ u16 intreg;
+ u16 frqset;
+ u16 tnctrl;
+ u16 frqchk;
+ u16 tunchk;
+ u16 testreg;
+ u16 manid;
+ u16 chipid;
+} __attribute__ ((packed));
+
+struct tea5761_write_regs {
+ u8 intreg;
+ u16 frqset;
+ u16 tnctrl;
+ u16 testreg;
+} __attribute__ ((packed));
+
+struct tea5761_device {
+ struct video_device *video_dev;
+ struct i2c_client *i2c_dev;
+ struct tea5761_regs regs;
+ struct mutex mutex;
+ int users;
+};
+
+static struct tea5761_device tea5761;
+
+static struct i2c_driver tea5761_driver;
+static int radio_nr = -1;
+
+static int tea5761_read_regs(struct tea5761_device *tea)
+{
+ int rc, i;
+ u16 *p = (u16 *) &tea->regs;
+ struct i2c_client *client = tea->i2c_dev;
+
+ rc = i2c_master_recv(client, (void*) &tea->regs, sizeof(tea->regs));
+ for (i = 0; i < 8; i++) {
+ p[i] = __be16_to_cpu(p[i]);
+ }
+
+ dev_dbg(&client->dev,
+ "chip state: %04x %04x %04x %04x %04x %04x %04x %04x\n",
+ p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]);
+
+ if (rc < 0)
+ dev_err(&client->dev, "read\n");
+
+ return rc;
+}
+
+static void tea5761_write_regs(struct tea5761_device *tea)
+{
+ struct tea5761_write_regs wr;
+ struct tea5761_regs *r = &tea->regs;
+ struct i2c_client *client = tea->i2c_dev;
+ u8 *p = (u8 *) r;
+
+ wr.intreg = r->intreg & 0xff;
+ wr.frqset = __cpu_to_be16(r->frqset);
+ wr.tnctrl = __cpu_to_be16(r->tnctrl);
+ wr.testreg = __cpu_to_be16(r->testreg);
+
+ dev_dbg(&client->dev,
+ "writing state: %02x %02x %02x %02x %02x %02x %02x\n",
+ p[0], p[1], p[2], p[3], p[4], p[5], p[6]);
+ if (i2c_master_send(client, (void *) &wr, sizeof(wr)) < 0)
+ dev_err(&client->dev, "write\n");
+}
+
+static void tea5761_power_up(struct tea5761_device *tea)
+{
+ struct tea5761_regs *r = &tea->regs;
+
+ if (!(r->tnctrl & TEA5761_TNCTRL_PUPD0)) {
+ r->tnctrl &= ~(TEA5761_TNCTRL_AFM | TEA5761_TNCTRL_MU |
+ TEA5761_TNCTRL_HLSI);
+ r->testreg |= TEA5761_TESTREG_TRIGFR;
+ r->tnctrl |= TEA5761_TNCTRL_PUPD0;
+ return tea5761_write_regs(tea);
+ }
+}
+
+static void tea5761_power_down(struct tea5761_device *tea)
+{
+ struct tea5761_regs *r = &tea->regs;
+
+ if (r->tnctrl & TEA5761_TNCTRL_PUPD0) {
+ r->tnctrl &= ~TEA5761_TNCTRL_PUPD0;
+ return tea5761_write_regs(tea);
+ }
+}
+
+static void tea5761_set_freq(struct tea5761_device *tea, int freq)
+{
+ struct tea5761_regs *r = &tea->regs;
+
+ if (r->tnctrl & TEA5761_TNCTRL_HLSI)
+ r->frqset = (freq + 225000) / 8192;
+ else
+ r->frqset = (freq - 225000) / 8192;
+}
+
+static int tea5761_get_freq(struct tea5761_device *tea)
+{
+ struct tea5761_regs *r = &tea->regs;
+
+ if (r->tnctrl & TEA5761_TNCTRL_HLSI)
+ return (r->frqchk * 8192) - 225000;
+ else
+ return (r->frqchk * 8192) + 225000;
+}
+
+static void tea5761_tune(struct tea5761_device *tea, int freq)
+{
+ tea5761_set_freq(tea, freq);
+ tea5761_write_regs(tea);
+}
+
+static void tea5761_set_audout_mode(struct tea5761_device *tea, int audmode)
+{
+ struct tea5761_regs *r = &tea->regs;
+ int tnctrl = r->tnctrl;
+
+ if (audmode == V4L2_TUNER_MODE_MONO)
+ r->tnctrl |= TEA5761_TNCTRL_MST;
+ else
+ r->tnctrl &= ~TEA5761_TNCTRL_MST;
+ if (tnctrl != r->tnctrl)
+ tea5761_write_regs(tea);
+}
+
+static int tea5761_get_audout_mode(struct tea5761_device *tea)
+{
+ struct tea5761_regs *r = &tea->regs;
+
+ if (r->tnctrl & TEA5761_TNCTRL_MST)
+ return V4L2_TUNER_MODE_MONO;
+ else
+ return V4L2_TUNER_MODE_STEREO;
+}
+
+static void tea5761_mute(struct tea5761_device *tea, int on)
+{
+ struct tea5761_regs *r = &tea->regs;
+ int tnctrl = r->tnctrl;
+
+ if (on)
+ r->tnctrl |= TEA5761_TNCTRL_MU;
+ else
+ r->tnctrl &= ~TEA5761_TNCTRL_MU;
+ if (tnctrl != r->tnctrl)
+ tea5761_write_regs(tea);
+}
+
+static int tea5761_is_muted(struct tea5761_device *tea)
+{
+ return tea->regs.tnctrl & TEA5761_TNCTRL_MU;
+}
+
+static int tea5761_do_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, void *arg)
+{
+ struct tea5761_device *tea = file->private_data;
+ struct video_device *dev = tea->video_dev;
+ struct i2c_client *client = tea->i2c_dev;
+ struct tea5761_regs *r = &tea->regs;
+
+ union {
+ struct v4l2_capability c;
+ struct v4l2_tuner t;
+ struct v4l2_frequency f;
+ struct v4l2_queryctrl qc;
+ struct v4l2_control ct;
+ } *u = arg;
+
+ tea5761_read_regs(tea);
+
+ switch (cmd) {
+ case VIDIOC_QUERYCAP:
+ dev_dbg(&client->dev, "VIDIOC_QUERYCAP\n");
+ memset(&u->c, 0, sizeof(u->c));
+ strlcpy(u->c.driver, dev->dev->driver->name,
+ sizeof(u->c.driver));
+ strlcpy(u->c.card, dev->name, sizeof(u->c.card));
+ snprintf(u->c.bus_info, sizeof(u->c.bus_info), "I2C:%s",
+ dev->dev->bus_id);
+ u->c.version = TEA5761_VERSION;
+ u->c.capabilities = V4L2_CAP_TUNER | V4L2_CAP_RADIO;
+ break;
+
+ case VIDIOC_G_TUNER:
+ /* Only one tuner chip */
+ dev_dbg(&client->dev, "VIDIOC_G_TUNER\n");
+ if (u->t.index != 0)
+ return -EINVAL;
+
+ memset(&u->t, 0, sizeof(u->t));
+ u->t.type = V4L2_TUNER_RADIO;
+ strlcpy(u->t.name, "FM", sizeof(u->t.name));
+ /* Freq in 62.5Hz units */
+ u->t.rangelow = TEA5761_FREQ_LOW * 16;
+ u->t.rangehigh = TEA5761_FREQ_HIGH * 16;
+ u->t.capability = V4L2_TUNER_CAP_LOW | V4L2_TUNER_CAP_STEREO;
+ if (r->tunchk & TEA5761_TUNCHK_STEREO)
+ u->t.rxsubchans = V4L2_TUNER_SUB_STEREO;
+ u->t.audmode = tea5761_get_audout_mode(tea);
+ u->t.signal = TEA5761_TUNCHK_LEVEL(r->tunchk) * 0xffff / 0xf;
+ u->t.afc = TEA5761_TUNCHK_IFCNT(r->tunchk);
+ break;
+
+ case VIDIOC_S_TUNER:
+ /* Only tuner nro 0 can be selected. */
+ dev_dbg(&client->dev, "VIDIOC_S_TUNER\n");
+ if (u->t.index != 0)
+ return -EINVAL;
+ tea5761_set_audout_mode(tea, u->t.audmode);
+ break;
+
+ case VIDIOC_G_FREQUENCY:
+ dev_dbg(&client->dev, "VIDIOC_G_FREQUENCY\n");
+ memset(&u->f, 0, sizeof(u->f));
+ u->f.type = V4L2_TUNER_RADIO;
+ if (r->tnctrl & TEA5761_TNCTRL_PUPD0)
+ u->f.frequency = (tea5761_get_freq(tea) * 2) / 125;
+ else
+ u->f.frequency = 0;
+ break;
+
+ case VIDIOC_S_FREQUENCY:
+ dev_dbg(&client->dev, "VIDIOC_S_FREQUENCY %u\n",
+ u->f.frequency);
+ if (u->f.tuner != 0)
+ return -EINVAL;
+ if (u->f.frequency == 0) {
+ /* We special case this as a power down
+ * control. */
+ tea5761_power_down(tea);
+ break;
+ }
+ if (u->f.frequency < 16 * TEA5761_FREQ_LOW)
+ return -EINVAL;
+ if (u->f.frequency > 16 * TEA5761_FREQ_HIGH)
+ return -EINVAL;
+
+ tea5761_power_up(tea);
+ tea5761_tune(tea, (u->f.frequency * 125) / 2);
+ break;
+
+ case VIDIOC_QUERYCTRL:
+ dev_dbg(&client->dev, "VIDIOC_QUERYCTRL %d\n", u->qc.id);
+ if (u->qc.id != V4L2_CID_AUDIO_MUTE)
+ return -EINVAL;
+ strlcpy(u->qc.name, "Mute", sizeof(u->qc.name));
+ u->qc.minimum = 0;
+ u->qc.maximum = 1;
+ u->qc.step = 1;
+ u->qc.default_value = 0;
+ u->qc.type = V4L2_CTRL_TYPE_BOOLEAN;
+ break;
+
+ case VIDIOC_G_CTRL:
+ dev_dbg(&client->dev, "VIDIOC_G_CTRL %d\n", u->ct.id);
+ if (u->ct.id != V4L2_CID_AUDIO_MUTE)
+ return -EINVAL;
+ if (r->tnctrl & TEA5761_TNCTRL_PUPD0)
+ u->ct.value = tea5761_is_muted(tea) ? 1 : 0;
+ else
+ u->ct.value = 0;
+ break;
+
+ case VIDIOC_S_CTRL:
+ dev_dbg(&client->dev, "VIDIOC_S_CTRL %d\n", u->ct.id);
+ if (u->ct.id != V4L2_CID_AUDIO_MUTE)
+ return -EINVAL;
+ tea5761_mute(tea, u->ct.value);
+ break;
+
+ default:
+ return -ENOIOCTLCMD;
+ }
+
+ return 0;
+}
+
+static int tea5761_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
+{
+ return video_usercopy(inode, file, cmd, arg, tea5761_do_ioctl);
+}
+
+static int tea5761_open(struct inode *inode, struct file *file)
+{
+ int minor = iminor(file->f_dentry->d_inode);
+ /* Currently we support only one device */
+ struct tea5761_device *tea = &tea5761;
+
+ if (tea->video_dev->minor != minor)
+ return -ENODEV;
+
+ mutex_lock(&tea->mutex);
+ /* Only exclusive access */
+ if (tea->users) {
+ mutex_unlock(&tea->mutex);
+ return -EBUSY;
+ }
+ tea->users++;
+ mutex_unlock(&tea->mutex);
+
+ file->private_data = tea;
+ return 0;
+}
+
+static int tea5761_release(struct inode *inode, struct file *file)
+{
+ struct tea5761_device *tea = file->private_data;
+
+ mutex_lock(&tea->mutex);
+ tea->users--;
+ mutex_unlock(&tea->mutex);
+
+ return 0;
+}
+
+static struct file_operations tea5761_fops = {
+ .owner = THIS_MODULE,
+ .open = tea5761_open,
+ .release = tea5761_release,
+ .ioctl = tea5761_ioctl,
+ .llseek = no_llseek,
+};
+
+static struct video_device tea5761_video_device = {
+ .owner = THIS_MODULE,
+ .name = "TEA5761 FM-Radio",
+ .type = VID_TYPE_TUNER,
+ .fops = &tea5761_fops,
+ .release = video_device_release
+};
+
+static int tea5761_i2c_driver_probe(struct i2c_client *client,
+ const struct i2c_device_id *id)
+{
+ struct video_device *video_dev;
+ int err = 0;
+ struct tea5761_device *tea = &tea5761;
+
+ mutex_init(&tea->mutex);
+
+ tea->i2c_dev = client;
+
+ /* V4L initialization */
+ video_dev = video_device_alloc();
+ if (video_dev == NULL) {
+ dev_err(&client->dev, "couldn't allocate memory\n");
+ err = -ENOMEM;
+ goto exit;
+ }
+ tea->video_dev = video_dev;
+
+ *video_dev = tea5761_video_device;
+ video_dev->dev = &client->dev;
+ i2c_set_clientdata(client, video_dev);
+
+ /* initialize and power off the chip */
+ tea5761_read_regs(tea);
+ tea5761_set_audout_mode(tea, V4L2_TUNER_MODE_STEREO);
+ tea5761_mute(tea, 0);
+ tea5761_power_down(tea);
+
+ tea5761.video_dev = video_dev;
+ tea5761.i2c_dev = client;
+
+ err = video_register_device(video_dev, VFL_TYPE_RADIO, radio_nr);
+ if (err) {
+ dev_err(&client->dev, "couldn't register video device\n");
+ goto err_video_alloc;
+ }
+
+ dev_info(&client->dev, "tea5761 (version %d) detected\n",
+ (tea->regs.manid >> 12) & 0xf);
+
+ return 0;
+
+err_video_alloc:
+ video_device_release(video_dev);
+exit:
+ kfree(client);
+ return err;
+}
+
+static int tea5761_i2c_driver_remove(struct i2c_client *client)
+{
+ struct video_device *vd = i2c_get_clientdata(client);
+
+ video_unregister_device(vd);
+
+ return 0;
+}
+
+static const struct i2c_device_id tea5761_id[] = {
+ { DRIVER_NAME, 0 },
+ { },
+};
+MODULE_DEVICE_TABLE(i2c, tea5761_id);
+
+static struct i2c_driver tea5761_driver = {
+ .driver = {
+ .name = DRIVER_NAME,
+ },
+ .probe = tea5761_i2c_driver_probe,
+ .remove = __devexit_p(tea5761_i2c_driver_remove),
+ .id_table = tea5761_id,
+};
+
+static int __init tea5761_init(void)
+{
+ int res;
+
+ if ((res = i2c_add_driver(&tea5761_driver))) {
+ printk(KERN_ERR DRIVER_NAME ": driver registration failed\n");
+ return res;
+ }
+
+ return 0;
+}
+
+static void __exit tea5761_exit(void)
+{
+ i2c_del_driver(&tea5761_driver);
+}
+
+MODULE_AUTHOR("Timo Teräs");
+MODULE_DESCRIPTION("I2C interface for TEA5761.");
+MODULE_LICENSE("GPL");
+
+module_param(radio_nr, int, 0);
+MODULE_PARM_DESC(nr_radio, "video4linux device number to use");
+
+module_init(tea5761_init)
+module_exit(tea5761_exit)
--
1.5.6.rc0.84.g06f60.dirty
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 0/1] Add support for TEA5761 (from linux-omap)
2008-06-03 15:25 [PATCH 0/1] Add support for TEA5761 (from linux-omap) Eduardo Valentin
2008-06-03 15:25 ` [PATCH 1/1] Add support for tea5761 chip Eduardo Valentin
@ 2008-06-03 15:44 ` Michael Krufky
2008-06-03 21:56 ` Mauro Carvalho Chehab
1 sibling, 1 reply; 14+ messages in thread
From: Michael Krufky @ 2008-06-03 15:44 UTC (permalink / raw)
To: Eduardo Valentin
Cc: Tony Lindgren, Eduardo Valentin, Linux and Kernel Video,
Sakari Ailus, Mauro Carvalho Chehab
On Tue, Jun 3, 2008 at 11:25 AM, Eduardo Valentin <edubezval@gmail.com> wrote:
> From: Eduardo Valentin <eduardo.valentin@indt.org.br>
>
> Hi guys,
>
> This patch is just an update from linux-omap tree.
> It is a v4l2 driver which is only in linux-omap tree.
> I'm just sendint it to proper repository.
>
> It adds support for tea5761 chip.
> It is a v4l2 driver which exports a radio interface.
>
> Comments are wellcome!
>
> Cheers,
>
> Eduardo Valentin (1):
> Add support for tea5761 chip
>
> drivers/media/radio/Kconfig | 13 +
> drivers/media/radio/Makefile | 1 +
> drivers/media/radio/radio-tea5761.c | 516 +++++++++++++++++++++++++++++++++++
> 3 files changed, 530 insertions(+), 0 deletions(-)
> create mode 100644 drivers/media/radio/radio-tea5761.c
Eduardo,
We already have a tea5761 driver in our tree -- can you use that one,
instead? Mauro Carvalho Chehab (cc added) wrote that driver based on
a datasheet -- it should work for you. If it needs changes, please
generate patches against
linux/drivers/media/common/tuners/tea5761.[ch]
Regards,
Mike Krufky
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/1] Add support for TEA5761 (from linux-omap)
2008-06-03 15:44 ` [PATCH 0/1] Add support for TEA5761 (from linux-omap) Michael Krufky
@ 2008-06-03 21:56 ` Mauro Carvalho Chehab
2008-06-04 14:25 ` Eduardo Valentin
0 siblings, 1 reply; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2008-06-03 21:56 UTC (permalink / raw)
To: Michael Krufky
Cc: Tony Lindgren, Linux and Kernel Video, Eduardo Valentin,
Sakari Ailus
On Tue, 3 Jun 2008 11:44:36 -0400
"Michael Krufky" <mkrufky@linuxtv.org> wrote:
> On Tue, Jun 3, 2008 at 11:25 AM, Eduardo Valentin <edubezval@gmail.com> wrote:
> > From: Eduardo Valentin <eduardo.valentin@indt.org.br>
> >
> > Hi guys,
> >
> > This patch is just an update from linux-omap tree.
> > It is a v4l2 driver which is only in linux-omap tree.
> > I'm just sendint it to proper repository.
> >
> > It adds support for tea5761 chip.
> > It is a v4l2 driver which exports a radio interface.
> >
> > Comments are wellcome!
> >
> > Cheers,
> >
> > Eduardo Valentin (1):
> > Add support for tea5761 chip
> >
> > drivers/media/radio/Kconfig | 13 +
> > drivers/media/radio/Makefile | 1 +
> > drivers/media/radio/radio-tea5761.c | 516 +++++++++++++++++++++++++++++++++++
> > 3 files changed, 530 insertions(+), 0 deletions(-)
> > create mode 100644 drivers/media/radio/radio-tea5761.c
>
> Eduardo,
>
> We already have a tea5761 driver in our tree -- can you use that one,
> instead? Mauro Carvalho Chehab (cc added) wrote that driver based on
> a datasheet -- it should work for you. If it needs changes, please
> generate patches against
> linux/drivers/media/common/tuners/tea5761.[ch]
Michael,
Thanks for noticing this. I'm very busy those days, still trying to figure out
what patches are missed.
Olá Eduardo,
We should avoid to duplicate drivers. Feel free to fix tea5761, if it is not
working, but don't add another version.
If you have any doubts about it, feel free to send it to me.
Thanks.
Cheers,
Mauro
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/1] Add support for TEA5761 (from linux-omap)
2008-06-03 21:56 ` Mauro Carvalho Chehab
@ 2008-06-04 14:25 ` Eduardo Valentin
2008-06-04 14:44 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 14+ messages in thread
From: Eduardo Valentin @ 2008-06-04 14:25 UTC (permalink / raw)
To: Mauro Carvalho Chehab
Cc: Tony Lindgren, Eduardo Valentin, Linux and Kernel Video,
Michael Krufky, Sakari Ailus
Hi Mauro and Michael,
Thanks for pointing that there were a duplicated work. If there is any
update on the current driver, I'll contact you. I'm not the author of
this driver, but I'm interested in some points here.
This chip is used on n800 FM radio. That's why this version came from
linux-omap.
Anyway, one quest that came from my mind, taking a brief look into
this two drivers,
I see they use different interfaces to register a FM radio driver, and
more they are located
under different places inside the tree. So, what is more recommended
for FM radio drivers?
being under drivers/media/radio/ or under drivers/media/common/tunners/ ?
What is the API more recommended dvb_tuner_ops or video_device ? I
wonder also what current applications are using.
Cheers,
On 6/3/08, Mauro Carvalho Chehab <mchehab@infradead.org> wrote:
> On Tue, 3 Jun 2008 11:44:36 -0400
> "Michael Krufky" <mkrufky@linuxtv.org> wrote:
>
>> On Tue, Jun 3, 2008 at 11:25 AM, Eduardo Valentin <edubezval@gmail.com>
>> wrote:
>> > From: Eduardo Valentin <eduardo.valentin@indt.org.br>
>> >
>> > Hi guys,
>> >
>> > This patch is just an update from linux-omap tree.
>> > It is a v4l2 driver which is only in linux-omap tree.
>> > I'm just sendint it to proper repository.
>> >
>> > It adds support for tea5761 chip.
>> > It is a v4l2 driver which exports a radio interface.
>> >
>> > Comments are wellcome!
>> >
>> > Cheers,
>> >
>> > Eduardo Valentin (1):
>> > Add support for tea5761 chip
>> >
>> > drivers/media/radio/Kconfig | 13 +
>> > drivers/media/radio/Makefile | 1 +
>> > drivers/media/radio/radio-tea5761.c | 516
>> > +++++++++++++++++++++++++++++++++++
>> > 3 files changed, 530 insertions(+), 0 deletions(-)
>> > create mode 100644 drivers/media/radio/radio-tea5761.c
>>
>> Eduardo,
>>
>> We already have a tea5761 driver in our tree -- can you use that one,
>> instead? Mauro Carvalho Chehab (cc added) wrote that driver based on
>> a datasheet -- it should work for you. If it needs changes, please
>> generate patches against
>> linux/drivers/media/common/tuners/tea5761.[ch]
>
> Michael,
>
> Thanks for noticing this. I'm very busy those days, still trying to figure
> out
> what patches are missed.
>
> Olá Eduardo,
>
> We should avoid to duplicate drivers. Feel free to fix tea5761, if it is not
> working, but don't add another version.
>
> If you have any doubts about it, feel free to send it to me.
>
> Thanks.
>
>
> Cheers,
> Mauro
>
--
Eduardo Bezerra Valentin
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/1] Add support for TEA5761 (from linux-omap)
2008-06-04 14:25 ` Eduardo Valentin
@ 2008-06-04 14:44 ` Mauro Carvalho Chehab
2008-06-04 15:20 ` mkrufky
0 siblings, 1 reply; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2008-06-04 14:44 UTC (permalink / raw)
To: Eduardo Valentin
Cc: Tony Lindgren, Eduardo Valentin, Linux and Kernel Video,
Michael Krufky, Sakari Ailus
Hi Eduardo,
On Wed, 4 Jun 2008 10:25:23 -0400
"Eduardo Valentin" <edubezval@gmail.com> wrote:
> Hi Mauro and Michael,
>
> Thanks for pointing that there were a duplicated work. If there is any
> update on the current driver, I'll contact you. I'm not the author of
> this driver, but I'm interested in some points here.
>
> This chip is used on n800 FM radio. That's why this version came from
> linux-omap.
> Anyway, one quest that came from my mind, taking a brief look into
> this two drivers,
> I see they use different interfaces to register a FM radio driver, and
> more they are located
> under different places inside the tree. So, what is more recommended
> for FM radio drivers?
> being under drivers/media/radio/ or under drivers/media/common/tunners/ ?
> What is the API more recommended dvb_tuner_ops or video_device ? I
> wonder also what current applications are using.
Good point. some radio tuners are used inside video boards. Before, this were
located inside drivers/media/video. Now, they are at common/tuners. This seems
to be a better place.
It should be noticed that tea5761 is an I2C device. So, you'll probably need a
counterpart module, at media/radio, that will provice I2C access methods needed
on N800.
Cheers,
Mauro
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/1] Add support for TEA5761 (from linux-omap)
2008-06-04 14:44 ` Mauro Carvalho Chehab
@ 2008-06-04 15:20 ` mkrufky
2008-06-04 20:13 ` Eduardo Valentin
0 siblings, 1 reply; 14+ messages in thread
From: mkrufky @ 2008-06-04 15:20 UTC (permalink / raw)
To: mchehab; +Cc: tony, video4linux-list, eduardo.valentin, sakari.ailus
Mauro Carvalho Chehab wrote:
> Hi Eduardo,
>
> On Wed, 4 Jun 2008 10:25:23 -0400
> "Eduardo Valentin" <edubezval@gmail.com> wrote:
>
>
>> Hi Mauro and Michael,
>>
>> Thanks for pointing that there were a duplicated work. If there is any
>> update on the current driver, I'll contact you. I'm not the author of
>> this driver, but I'm interested in some points here.
>>
>> This chip is used on n800 FM radio. That's why this version came from
>> linux-omap.
>> Anyway, one quest that came from my mind, taking a brief look into
>> this two drivers,
>> I see they use different interfaces to register a FM radio driver, and
>> more they are located
>> under different places inside the tree. So, what is more recommended
>> for FM radio drivers?
>> being under drivers/media/radio/ or under drivers/media/common/tunners/ ?
>> What is the API more recommended dvb_tuner_ops or video_device ? I
>> wonder also what current applications are using.
>>
>
> Good point. some radio tuners are used inside video boards. Before, this
were
> located inside drivers/media/video. Now, they are at common/tuners. This
seems
> to be a better place.
>
> It should be noticed that tea5761 is an I2C device. So, you'll probably
need a
> counterpart module, at media/radio, that will provice I2C access methods
needed
> on N800.
>
Basically, what you will have to do is create a n800 driver under
media/radio. This n800 driver will provide the userspace interface via
v4l2, and it will use internal tuner API to interface to the tea5761 module.
When all is said and done, most likely all of the tea5761-specific code
would be removed from the driver that you submit -- the remaining code
would merely handle glue between userspace and internal tuner api.
Regards,
Mike
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/1] Add support for TEA5761 (from linux-omap)
2008-06-04 15:20 ` mkrufky
@ 2008-06-04 20:13 ` Eduardo Valentin
2008-06-04 20:22 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 14+ messages in thread
From: Eduardo Valentin @ 2008-06-04 20:13 UTC (permalink / raw)
To: mkrufky; +Cc: tony, eduardo.valentin, video4linux-list, sakari.ailus, mchehab
Hi Mike,
On Wed, Jun 4, 2008 at 11:20 AM, <mkrufky@linuxtv.org> wrote:
> Mauro Carvalho Chehab wrote:
>> Hi Eduardo,
>>
>> On Wed, 4 Jun 2008 10:25:23 -0400
>> "Eduardo Valentin" <edubezval@gmail.com> wrote:
>>
>>
>>> Hi Mauro and Michael,
>>>
>>> Thanks for pointing that there were a duplicated work. If there is any
>>> update on the current driver, I'll contact you. I'm not the author of
>>> this driver, but I'm interested in some points here.
>>>
>>> This chip is used on n800 FM radio. That's why this version came from
>>> linux-omap.
>>> Anyway, one quest that came from my mind, taking a brief look into
>>> this two drivers,
>>> I see they use different interfaces to register a FM radio driver, and
>>> more they are located
>>> under different places inside the tree. So, what is more recommended
>>> for FM radio drivers?
>>> being under drivers/media/radio/ or under drivers/media/common/tunners/ ?
>>> What is the API more recommended dvb_tuner_ops or video_device ? I
>>> wonder also what current applications are using.
>>>
>>
>> Good point. some radio tuners are used inside video boards. Before, this
> were
>> located inside drivers/media/video. Now, they are at common/tuners. This
> seems
>> to be a better place.
>>
>> It should be noticed that tea5761 is an I2C device. So, you'll probably
> need a
>> counterpart module, at media/radio, that will provice I2C access methods
> needed
>> on N800.
>>
> Basically, what you will have to do is create a n800 driver under
> media/radio. This n800 driver will provide the userspace interface via
> v4l2, and it will use internal tuner API to interface to the tea5761 module.
>
Yeah, true.
> When all is said and done, most likely all of the tea5761-specific code
> would be removed from the driver that you submit -- the remaining code
> would merely handle glue between userspace and internal tuner api.
Humm.. some code may remain inside this driver. Functions to power on/down
the device, for example. They are not exported through this tuner API.
>
> Regards,
>
> Mike
>
--
Eduardo Bezerra Valentin
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/1] Add support for TEA5761 (from linux-omap)
2008-06-04 20:13 ` Eduardo Valentin
@ 2008-06-04 20:22 ` Mauro Carvalho Chehab
2008-06-04 21:06 ` mkrufky
0 siblings, 1 reply; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2008-06-04 20:22 UTC (permalink / raw)
To: Eduardo Valentin
Cc: tony, eduardo.valentin, video4linux-list, mkrufky, sakari.ailus
On Wed, 4 Jun 2008 16:13:57 -0400
"Eduardo Valentin" <edubezval@gmail.com> wrote:
> Hi Mike,
>
> On Wed, Jun 4, 2008 at 11:20 AM, <mkrufky@linuxtv.org> wrote:
> > Mauro Carvalho Chehab wrote:
> >> Hi Eduardo,
> >>
> >> On Wed, 4 Jun 2008 10:25:23 -0400
> >> "Eduardo Valentin" <edubezval@gmail.com> wrote:
> >>
> >>
> >>> Hi Mauro and Michael,
> >>>
> >>> Thanks for pointing that there were a duplicated work. If there is any
> >>> update on the current driver, I'll contact you. I'm not the author of
> >>> this driver, but I'm interested in some points here.
> >>>
> >>> This chip is used on n800 FM radio. That's why this version came from
> >>> linux-omap.
> >>> Anyway, one quest that came from my mind, taking a brief look into
> >>> this two drivers,
> >>> I see they use different interfaces to register a FM radio driver, and
> >>> more they are located
> >>> under different places inside the tree. So, what is more recommended
> >>> for FM radio drivers?
> >>> being under drivers/media/radio/ or under drivers/media/common/tunners/ ?
> >>> What is the API more recommended dvb_tuner_ops or video_device ? I
> >>> wonder also what current applications are using.
> >>>
> >>
> >> Good point. some radio tuners are used inside video boards. Before, this
> > were
> >> located inside drivers/media/video. Now, they are at common/tuners. This
> > seems
> >> to be a better place.
> >>
> >> It should be noticed that tea5761 is an I2C device. So, you'll probably
> > need a
> >> counterpart module, at media/radio, that will provice I2C access methods
> > needed
> >> on N800.
> >>
> > Basically, what you will have to do is create a n800 driver under
> > media/radio. This n800 driver will provide the userspace interface via
> > v4l2, and it will use internal tuner API to interface to the tea5761 module.
> >
>
> Yeah, true.
>
> > When all is said and done, most likely all of the tea5761-specific code
> > would be removed from the driver that you submit -- the remaining code
> > would merely handle glue between userspace and internal tuner api.
>
> Humm.. some code may remain inside this driver. Functions to power on/down
> the device, for example. They are not exported through this tuner API.
Please map what functions you're needing. It makes sense to extend tuner API to
handle such things. In the case of power down, I think there's one callback for
it already.
Cheers,
Mauro
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/1] Add support for TEA5761 (from linux-omap)
2008-06-04 20:22 ` Mauro Carvalho Chehab
@ 2008-06-04 21:06 ` mkrufky
2008-06-04 21:44 ` Eduardo Valentin
0 siblings, 1 reply; 14+ messages in thread
From: mkrufky @ 2008-06-04 21:06 UTC (permalink / raw)
To: mchehab; +Cc: tony, video4linux-list, eduardo.valentin, sakari.ailus
Mauro Carvalho Chehab wrote:
> On Wed, 4 Jun 2008 16:13:57 -0400
> "Eduardo Valentin" <edubezval@gmail.com> wrote:
>
>
>> Hi Mike,
>>
>> On Wed, Jun 4, 2008 at 11:20 AM, <mkrufky@linuxtv.org> wrote:
>>
>>> Mauro Carvalho Chehab wrote:
>>>
>>>> Hi Eduardo,
>>>>
>>>> On Wed, 4 Jun 2008 10:25:23 -0400
>>>> "Eduardo Valentin" <edubezval@gmail.com> wrote:
>>>>
>>>>
>>>>
>>>>> Hi Mauro and Michael,
>>>>>
>>>>> Thanks for pointing that there were a duplicated work. If there is any
>>>>> update on the current driver, I'll contact you. I'm not the author of
>>>>> this driver, but I'm interested in some points here.
>>>>>
>>>>> This chip is used on n800 FM radio. That's why this version came from
>>>>> linux-omap.
>>>>> Anyway, one quest that came from my mind, taking a brief look into
>>>>> this two drivers,
>>>>> I see they use different interfaces to register a FM radio driver, and
>>>>> more they are located
>>>>> under different places inside the tree. So, what is more recommended
>>>>> for FM radio drivers?
>>>>> being under drivers/media/radio/ or under
drivers/media/common/tunners/ ?
>>>>> What is the API more recommended dvb_tuner_ops or video_device ? I
>>>>> wonder also what current applications are using.
>>>>>
>>>>>
>>>> Good point. some radio tuners are used inside video boards. Before,
this
>>>>
>>> were
>>>
>>>> located inside drivers/media/video. Now, they are at common/tuners.
This
>>>>
>>> seems
>>>
>>>> to be a better place.
>>>>
>>>> It should be noticed that tea5761 is an I2C device. So, you'll probably
>>>>
>>> need a
>>>
>>>> counterpart module, at media/radio, that will provice I2C access
methods
>>>>
>>> needed
>>>
>>>> on N800.
>>>>
>>>>
>>> Basically, what you will have to do is create a n800 driver under
>>> media/radio. This n800 driver will provide the userspace interface via
>>> v4l2, and it will use internal tuner API to interface to the tea5761
module.
>>>
>>>
>> Yeah, true.
>>
>>
>>> When all is said and done, most likely all of the tea5761-specific code
>>> would be removed from the driver that you submit -- the remaining code
>>> would merely handle glue between userspace and internal tuner api.
>>>
>> Humm.. some code may remain inside this driver. Functions to power
on/down
>> the device, for example. They are not exported through this tuner API.
>>
>
> Please map what functions you're needing. It makes sense to extend tuner
API to
> handle such things. In the case of power down, I think there's one
callback for
> it already.
.sleep for power down
.init for power up
It's all there. Is there anything else missing, Eduardo?
-Mike
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/1] Add support for TEA5761 (from linux-omap)
2008-06-04 21:06 ` mkrufky
@ 2008-06-04 21:44 ` Eduardo Valentin
2008-06-05 15:24 ` Eduardo Valentin
0 siblings, 1 reply; 14+ messages in thread
From: Eduardo Valentin @ 2008-06-04 21:44 UTC (permalink / raw)
To: mkrufky; +Cc: tony, eduardo.valentin, video4linux-list, sakari.ailus, mchehab
Ok guys,
Sorry, my bad. I'll try to rewrite it. I'll re-send this as soon as possible.
Maybe some doubts will come up, but I'll be polling you :).
Cheers,
On Wed, Jun 4, 2008 at 5:06 PM, <mkrufky@linuxtv.org> wrote:
> Mauro Carvalho Chehab wrote:
>> On Wed, 4 Jun 2008 16:13:57 -0400
>> "Eduardo Valentin" <edubezval@gmail.com> wrote:
>>
>>
>>> Hi Mike,
>>>
>>> On Wed, Jun 4, 2008 at 11:20 AM, <mkrufky@linuxtv.org> wrote:
>>>
>>>> Mauro Carvalho Chehab wrote:
>>>>
>>>>> Hi Eduardo,
>>>>>
>>>>> On Wed, 4 Jun 2008 10:25:23 -0400
>>>>> "Eduardo Valentin" <edubezval@gmail.com> wrote:
>>>>>
>>>>>
>>>>>
>>>>>> Hi Mauro and Michael,
>>>>>>
>>>>>> Thanks for pointing that there were a duplicated work. If there is any
>>>>>> update on the current driver, I'll contact you. I'm not the author of
>>>>>> this driver, but I'm interested in some points here.
>>>>>>
>>>>>> This chip is used on n800 FM radio. That's why this version came from
>>>>>> linux-omap.
>>>>>> Anyway, one quest that came from my mind, taking a brief look into
>>>>>> this two drivers,
>>>>>> I see they use different interfaces to register a FM radio driver, and
>>>>>> more they are located
>>>>>> under different places inside the tree. So, what is more recommended
>>>>>> for FM radio drivers?
>>>>>> being under drivers/media/radio/ or under
> drivers/media/common/tunners/ ?
>>>>>> What is the API more recommended dvb_tuner_ops or video_device ? I
>>>>>> wonder also what current applications are using.
>>>>>>
>>>>>>
>>>>> Good point. some radio tuners are used inside video boards. Before,
> this
>>>>>
>>>> were
>>>>
>>>>> located inside drivers/media/video. Now, they are at common/tuners.
> This
>>>>>
>>>> seems
>>>>
>>>>> to be a better place.
>>>>>
>>>>> It should be noticed that tea5761 is an I2C device. So, you'll probably
>>>>>
>>>> need a
>>>>
>>>>> counterpart module, at media/radio, that will provice I2C access
> methods
>>>>>
>>>> needed
>>>>
>>>>> on N800.
>>>>>
>>>>>
>>>> Basically, what you will have to do is create a n800 driver under
>>>> media/radio. This n800 driver will provide the userspace interface via
>>>> v4l2, and it will use internal tuner API to interface to the tea5761
> module.
>>>>
>>>>
>>> Yeah, true.
>>>
>>>
>>>> When all is said and done, most likely all of the tea5761-specific code
>>>> would be removed from the driver that you submit -- the remaining code
>>>> would merely handle glue between userspace and internal tuner api.
>>>>
>>> Humm.. some code may remain inside this driver. Functions to power
> on/down
>>> the device, for example. They are not exported through this tuner API.
>>>
>>
>> Please map what functions you're needing. It makes sense to extend tuner
> API to
>> handle such things. In the case of power down, I think there's one
> callback for
>> it already.
>
> .sleep for power down
>
> .init for power up
>
> It's all there. Is there anything else missing, Eduardo?
>
> -Mike
>
>
>
--
Eduardo Bezerra Valentin
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/1] Add support for TEA5761 (from linux-omap)
2008-06-04 21:44 ` Eduardo Valentin
@ 2008-06-05 15:24 ` Eduardo Valentin
2008-06-05 15:29 ` mkrufky
0 siblings, 1 reply; 14+ messages in thread
From: Eduardo Valentin @ 2008-06-05 15:24 UTC (permalink / raw)
To: mkrufky; +Cc: tony, eduardo.valentin, video4linux-list, sakari.ailus, mchehab
Hi guys,
About this Tuner API, what is the best way to [s,g]et mute state?
cheers,
On Wed, Jun 4, 2008 at 5:44 PM, Eduardo Valentin <edubezval@gmail.com> wrote:
> Ok guys,
>
> Sorry, my bad. I'll try to rewrite it. I'll re-send this as soon as possible.
> Maybe some doubts will come up, but I'll be polling you :).
>
> Cheers,
>
> On Wed, Jun 4, 2008 at 5:06 PM, <mkrufky@linuxtv.org> wrote:
>> Mauro Carvalho Chehab wrote:
>>> On Wed, 4 Jun 2008 16:13:57 -0400
>>> "Eduardo Valentin" <edubezval@gmail.com> wrote:
>>>
>>>
>>>> Hi Mike,
>>>>
>>>> On Wed, Jun 4, 2008 at 11:20 AM, <mkrufky@linuxtv.org> wrote:
>>>>
>>>>> Mauro Carvalho Chehab wrote:
>>>>>
>>>>>> Hi Eduardo,
>>>>>>
>>>>>> On Wed, 4 Jun 2008 10:25:23 -0400
>>>>>> "Eduardo Valentin" <edubezval@gmail.com> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> Hi Mauro and Michael,
>>>>>>>
>>>>>>> Thanks for pointing that there were a duplicated work. If there is any
>>>>>>> update on the current driver, I'll contact you. I'm not the author of
>>>>>>> this driver, but I'm interested in some points here.
>>>>>>>
>>>>>>> This chip is used on n800 FM radio. That's why this version came from
>>>>>>> linux-omap.
>>>>>>> Anyway, one quest that came from my mind, taking a brief look into
>>>>>>> this two drivers,
>>>>>>> I see they use different interfaces to register a FM radio driver, and
>>>>>>> more they are located
>>>>>>> under different places inside the tree. So, what is more recommended
>>>>>>> for FM radio drivers?
>>>>>>> being under drivers/media/radio/ or under
>> drivers/media/common/tunners/ ?
>>>>>>> What is the API more recommended dvb_tuner_ops or video_device ? I
>>>>>>> wonder also what current applications are using.
>>>>>>>
>>>>>>>
>>>>>> Good point. some radio tuners are used inside video boards. Before,
>> this
>>>>>>
>>>>> were
>>>>>
>>>>>> located inside drivers/media/video. Now, they are at common/tuners.
>> This
>>>>>>
>>>>> seems
>>>>>
>>>>>> to be a better place.
>>>>>>
>>>>>> It should be noticed that tea5761 is an I2C device. So, you'll probably
>>>>>>
>>>>> need a
>>>>>
>>>>>> counterpart module, at media/radio, that will provice I2C access
>> methods
>>>>>>
>>>>> needed
>>>>>
>>>>>> on N800.
>>>>>>
>>>>>>
>>>>> Basically, what you will have to do is create a n800 driver under
>>>>> media/radio. This n800 driver will provide the userspace interface via
>>>>> v4l2, and it will use internal tuner API to interface to the tea5761
>> module.
>>>>>
>>>>>
>>>> Yeah, true.
>>>>
>>>>
>>>>> When all is said and done, most likely all of the tea5761-specific code
>>>>> would be removed from the driver that you submit -- the remaining code
>>>>> would merely handle glue between userspace and internal tuner api.
>>>>>
>>>> Humm.. some code may remain inside this driver. Functions to power
>> on/down
>>>> the device, for example. They are not exported through this tuner API.
>>>>
>>>
>>> Please map what functions you're needing. It makes sense to extend tuner
>> API to
>>> handle such things. In the case of power down, I think there's one
>> callback for
>>> it already.
>>
>> .sleep for power down
>>
>> .init for power up
>>
>> It's all there. Is there anything else missing, Eduardo?
>>
>> -Mike
>>
>>
>>
>
>
>
> --
> Eduardo Bezerra Valentin
>
--
Eduardo Bezerra Valentin
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/1] Add support for TEA5761 (from linux-omap)
2008-06-05 15:24 ` Eduardo Valentin
@ 2008-06-05 15:29 ` mkrufky
2008-06-29 12:04 ` Mauro Carvalho Chehab
0 siblings, 1 reply; 14+ messages in thread
From: mkrufky @ 2008-06-05 15:29 UTC (permalink / raw)
To: edubezval; +Cc: tony, eduardo.valentin, video4linux-list, sakari.ailus, mchehab
Eduardo Valentin wrote:
> Hi guys,
>
> About this Tuner API, what is the best way to [s,g]et mute state?
>
> cheers,
>
You would usually have the bridge driver handle mute / unmute
operation. The tuner driver handles the operations of the tuner chip,
itself. Mute is not normally controlled within the tuner silicon.
For cases where mute IS controlled by the tuner, we tend to call sleep
to mute the tuner, and we re-tune to unmute and ensure that we're on the
correct channel.
-Mike
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 0/1] Add support for TEA5761 (from linux-omap)
2008-06-05 15:29 ` mkrufky
@ 2008-06-29 12:04 ` Mauro Carvalho Chehab
0 siblings, 0 replies; 14+ messages in thread
From: Mauro Carvalho Chehab @ 2008-06-29 12:04 UTC (permalink / raw)
To: edubezval; +Cc: tony, eduardo.valentin, video4linux-list, mkrufky, sakari.ailus
On Thu, 5 Jun 2008 11:29:47 -0400
mkrufky@linuxtv.org wrote:
> Eduardo Valentin wrote:
> > Hi guys,
> >
> > About this Tuner API, what is the best way to [s,g]et mute state?
> >
> > cheers,
> >
> You would usually have the bridge driver handle mute / unmute
> operation. The tuner driver handles the operations of the tuner chip,
> itself. Mute is not normally controlled within the tuner silicon.
>
> For cases where mute IS controlled by the tuner, we tend to call sleep
> to mute the tuner, and we re-tune to unmute and ensure that we're on the
> correct channel.
>
> -Mike
Eduardo,
Any news about this subject?
Cheers,
Mauro
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2008-06-29 12:04 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-03 15:25 [PATCH 0/1] Add support for TEA5761 (from linux-omap) Eduardo Valentin
2008-06-03 15:25 ` [PATCH 1/1] Add support for tea5761 chip Eduardo Valentin
2008-06-03 15:44 ` [PATCH 0/1] Add support for TEA5761 (from linux-omap) Michael Krufky
2008-06-03 21:56 ` Mauro Carvalho Chehab
2008-06-04 14:25 ` Eduardo Valentin
2008-06-04 14:44 ` Mauro Carvalho Chehab
2008-06-04 15:20 ` mkrufky
2008-06-04 20:13 ` Eduardo Valentin
2008-06-04 20:22 ` Mauro Carvalho Chehab
2008-06-04 21:06 ` mkrufky
2008-06-04 21:44 ` Eduardo Valentin
2008-06-05 15:24 ` Eduardo Valentin
2008-06-05 15:29 ` mkrufky
2008-06-29 12:04 ` 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