All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Ringel <stefan.ringel@arcor.de>
To: Dmitri Belimov <d.belimov@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] tm6000: fix s-video input
Date: Sat, 19 Mar 2011 07:46:56 +0100	[thread overview]
Message-ID: <4D845160.8030509@arcor.de> (raw)
In-Reply-To: <20110318090855.773af168@glory.local>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
Am 18.03.2011 01:08, schrieb Dmitri Belimov:
> Hi
>
> Add compatibility for composite and s-video inputs. Some TV cards
hasn't it.
> Fix S-Video input, the s-video cable has only video signals no audio.
Call the function of audio configure kill chroma in signal. only b/w video.
>
> Known bugs:
> after s-video the audio for radio didn't work, TV crashed hardly
> after composite TV crashed hardly too.
>
> P.S. After this patch I'll want to rework the procedure of configure
video. Now it has a lot of junk and dubles.
>

Why you use caps to define video input and audio with avideo and/or
aradio as flags? Better is , I think,  we use a struct for edge
virtual input (Video type (s-vhs, composite, tuner), video input pin
(video port a, video port b or both), video mode gpio, audio type ,
audio input pin (adc 1, adc 2 or sif)). If we are called
vidioc_s_input or radio_g_input setting input number. In tm6000_std.c
we can use this input number and the input struct with the same number
and can use all setting from here to set it.

Stefan Ringel


> diff --git a/drivers/staging/tm6000/tm6000-cards.c
b/drivers/staging/tm6000/tm6000-cards.c
> index 88144a1..146c7e8 100644
> --- a/drivers/staging/tm6000/tm6000-cards.c
> +++ b/drivers/staging/tm6000/tm6000-cards.c
> @@ -235,11 +235,13 @@ struct tm6000_board tm6000_boards[] = {
> .avideo = TM6000_AIP_SIF1,
> .aradio = TM6000_AIP_LINE1,
> .caps = {
> - .has_tuner = 1,
> - .has_dvb = 1,
> - .has_zl10353 = 1,
> - .has_eeprom = 1,
> - .has_remote = 1,
> + .has_tuner = 1,
> + .has_dvb = 1,
> + .has_zl10353 = 1,
> + .has_eeprom = 1,
> + .has_remote = 1,
> + .has_input_comp = 1,
> + .has_input_svid = 1,
> },
> .gpio = {
> .tuner_reset = TM6010_GPIO_0,
> @@ -255,11 +257,13 @@ struct tm6000_board tm6000_boards[] = {
> .avideo = TM6000_AIP_SIF1,
> .aradio = TM6000_AIP_LINE1,
> .caps = {
> - .has_tuner = 1,
> - .has_dvb = 0,
> - .has_zl10353 = 0,
> - .has_eeprom = 1,
> - .has_remote = 1,
> + .has_tuner = 1,
> + .has_dvb = 0,
> + .has_zl10353 = 0,
> + .has_eeprom = 1,
> + .has_remote = 1,
> + .has_input_comp = 1,
> + .has_input_svid = 1,
> },
> .gpio = {
> .tuner_reset = TM6010_GPIO_0,
> @@ -327,10 +331,13 @@ struct tm6000_board tm6000_boards[] = {
> .avideo = TM6000_AIP_SIF1,
> .aradio = TM6000_AIP_LINE1,
> .caps = {
> - .has_tuner = 1,
> - .has_dvb = 1,
> - .has_zl10353 = 1,
> - .has_eeprom = 1,
> + .has_tuner = 1,
> + .has_dvb = 1,
> + .has_zl10353 = 1,
> + .has_eeprom = 1,
> + .has_remote = 0,
> + .has_input_comp = 0,
> + .has_input_svid = 0,
> },
> .gpio = {
> .tuner_reset = TM6010_GPIO_0,
> @@ -346,10 +353,13 @@ struct tm6000_board tm6000_boards[] = {
> .avideo = TM6000_AIP_SIF1,
> .aradio = TM6000_AIP_LINE1,
> .caps = {
> - .has_tuner = 1,
> - .has_dvb = 0,
> - .has_zl10353 = 0,
> - .has_eeprom = 1,
> + .has_tuner = 1,
> + .has_dvb = 0,
> + .has_zl10353 = 0,
> + .has_eeprom = 1,
> + .has_remote = 0,
> + .has_input_comp = 0,
> + .has_input_svid = 0,
> },
> .gpio = {
> .tuner_reset = TM6010_GPIO_0,
> diff --git a/drivers/staging/tm6000/tm6000-stds.c
b/drivers/staging/tm6000/tm6000-stds.c
> index a4c07e5..da3e51b 100644
> --- a/drivers/staging/tm6000/tm6000-stds.c
> +++ b/drivers/staging/tm6000/tm6000-stds.c
> @@ -1161,8 +1161,6 @@ int tm6000_set_standard(struct tm6000_core *dev,
v4l2_std_id * norm)
> rc = tm6000_load_std(dev, svideo_stds[i].common,
> sizeof(svideo_stds[i].
> common));
> - tm6000_set_audio_std(dev, svideo_stds[i].audio_default_std);
> -
> goto ret;
> }
> }
> diff --git a/drivers/staging/tm6000/tm6000-video.c
b/drivers/staging/tm6000/tm6000-video.c
> index b550340..c80a316 100644
> --- a/drivers/staging/tm6000/tm6000-video.c
> +++ b/drivers/staging/tm6000/tm6000-video.c
> @@ -1080,18 +1080,27 @@ static int vidioc_s_std (struct file *file,
void *priv, v4l2_std_id *norm)
> static int vidioc_enum_input(struct file *file, void *priv,
> struct v4l2_input *inp)
> {
> + struct tm6000_fh *fh = priv;
> + struct tm6000_core *dev = fh->dev;
> +
> switch (inp->index) {
> case TM6000_INPUT_TV:
> inp->type = V4L2_INPUT_TYPE_TUNER;
> strcpy(inp->name, "Television");
> break;
> case TM6000_INPUT_COMPOSITE:
> - inp->type = V4L2_INPUT_TYPE_CAMERA;
> - strcpy(inp->name, "Composite");
> + if (dev->caps.has_input_comp) {
> + inp->type = V4L2_INPUT_TYPE_CAMERA;
> + strcpy(inp->name, "Composite");
> + } else
> + return -EINVAL;
> break;
> case TM6000_INPUT_SVIDEO:
> - inp->type = V4L2_INPUT_TYPE_CAMERA;
> - strcpy(inp->name, "S-Video");
> + if (dev->caps.has_input_svid) {
> + inp->type = V4L2_INPUT_TYPE_CAMERA;
> + strcpy(inp->name, "S-Video");
> + } else
> + return -EINVAL;
> break;
> default:
> return -EINVAL;
> diff --git a/drivers/staging/tm6000/tm6000.h
b/drivers/staging/tm6000/tm6000.h
> index ccd120f..99ae50e 100644
> --- a/drivers/staging/tm6000/tm6000.h
> +++ b/drivers/staging/tm6000/tm6000.h
> @@ -129,6 +129,8 @@ struct tm6000_capabilities {
> unsigned int has_zl10353:1;
> unsigned int has_eeprom:1;
> unsigned int has_remote:1;
> + unsigned int has_input_comp:1;
> + unsigned int has_input_svid:1;
> };
>
> struct tm6000_dvb {
>
> Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
>
> With my best regards, Dmitry.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
iQEcBAEBAgAGBQJNhFFgAAoJEAWtPFjxMvFGATAH/RZnxOBnRF7bvpInTVcvDr3f
siYCB6O+JKKLwA8dWzh5ejOi+cBcYWPqcgJcZ2s/0dedqEQ8/RVxGflrnYk66/vT
KP3JkysbH3Nme9mE9AlSXSrCpGg6AG9u99SgyHkCJQKASkQX7dHg/prz4iMySIgi
Ii05FHR2f5P5FmaH96eKjgzd8J8WSHe2excr07gKg2FL2bX8icnqt0Lz7S1/V0rQ
ewdL9cOh+IBsIG8dOLBetB3rxlfEtheph7bHtBqJ2s9+yo9KVj8tynpGghgoNrAw
ntDttbSrnCjcXaALKFfXBvAnv349jwbBLnyZU3PWjK560sdjg9bhLi515xYXwhM=
=eldX
-----END PGP SIGNATURE-----


  reply	other threads:[~2011-03-19  6:48 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07  5:28 [RFC PATCH] Audio standards on tm6000 Mauro Carvalho Chehab
2010-10-08 19:03 ` Dmitri Belimov
2010-10-08 11:52   ` Mauro Carvalho Chehab
2010-10-12 18:28     ` Dmitri Belimov
2010-10-12 16:54       ` Stefan Ringel
2010-10-13 14:13         ` Dmitri Belimov
     [not found]         ` <20101129174412.08f2001c@glory.local>
     [not found]           ` <4CF51C9E.6040600@arcor.de>
     [not found]             ` <20101201144704.43b58f2c@glory.local>
     [not found]               ` <4CF67AB9.6020006@arcor.de>
     [not found]                 ` <20101202134128.615bbfa0@glory.local>
     [not found]                   ` <4CF71CF6.7080603@redhat.com>
     [not found]                     ` <20101206010934.55d07569@glory.local>
     [not found]                       ` <4CFBF62D.7010301@arcor.de>
     [not found]                         ` <20101206190230.2259d7ab@glory.local>
     [not found]                           ` <4CFEA3D2.4050309@arcor.de>
     [not found]                             ` <20101208125539.739e2ed2@glory.local>
     [not found]                               ` <4CFFAD1E.7040004@arcor.de>
2010-12-14  3:23                                 ` tm6000 and IR Dmitri Belimov
2010-12-14 16:27                                   ` Stefan Ringel
2010-12-15  7:46                                     ` Dmitri Belimov
2010-12-15 15:52                                       ` Stefan Ringel
2010-12-16  3:26                                         ` Dmitri Belimov
2010-12-16  9:38                                         ` Dmitri Belimov
2010-12-16 17:12                                           ` Stefan Ringel
2010-12-17  1:46                                             ` Dmitri Belimov
2010-12-17  5:18                                               ` Stefan Ringel
2010-12-17  7:08                                                 ` Dmitri Belimov
2010-12-18  0:24                                                   ` Mauro Carvalho Chehab
2010-12-18 13:56                                                     ` Andy Walls
2010-12-18 15:55                                                       ` Stefan Ringel
2010-12-20  5:41                                                     ` Dmitri Belimov
2010-12-21 22:36                                                       ` Jarod Wilson
2010-12-22  8:57                                                         ` [PATCH] Rework and fix IR Dmitri Belimov
2011-01-13  3:46                                                     ` [PATCH] tm6000: rework init code Dmitri Belimov
2011-01-20  6:05                                                     ` [PATCH] tm6000: add/rework reg.defines Dmitri Belimov
2011-01-20 19:25                                                       ` Stefan Ringel
2011-01-20 23:20                                                         ` Dmitri Belimov
2011-02-17  5:12                                                         ` tm6000 and radio Dmitri Belimov
2011-02-17 20:58                                                           ` Mauro Carvalho Chehab
2011-02-18  1:11                                                             ` [PATCH] tm6000: add radio Dmitri Belimov
2011-03-01  4:55                                                             ` [PATCH] tm6000: add audio conf for new cards Dmitri Belimov
2011-03-18  0:08                                                             ` [PATCH] tm6000: fix s-video input Dmitri Belimov
2011-03-19  6:46                                                               ` Stefan Ringel [this message]
2011-03-23  2:49                                                                 ` Dmitri Belimov
2011-04-19  5:29                                                             ` [PATCH v1] tm6000: rework standards Dmitri Belimov
2011-04-19  6:42                                                               ` Stefan Ringel
2011-05-04 16:18                                                                 ` Stefan Ringel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D845160.8030509@arcor.de \
    --to=stefan.ringel@arcor.de \
    --cc=d.belimov@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.