public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Dmitri Belimov <d.belimov@gmail.com>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Stefan Ringel <stefan.ringel@arcor.de>,
	Bee Hock Goh <beehock@gmail.com>
Subject: Re: xc5000 and switch RF input
Date: Wed, 06 Oct 2010 09:25:54 -0300	[thread overview]
Message-ID: <4CAC6AD2.6050600@redhat.com> (raw)
In-Reply-To: <20101006155256.11ec6d6d@glory.local>

Em 06-10-2010 16:52, Dmitri Belimov escreveu:
> Hi
> 
> Our TV card Behold X7 has two different RF input. This RF inputs can switch between
> different RF sources. 
> 
> ANT 1 for analog and digital TV
> ANT 2 for FM radio
> 
> The switch controlled by zl10353.
> 
> How to I can control this switch?
> 
> I found 2 way
> 
> 1. 
> Use tuner callback to saa1734. add some params like XC5000_TUNER_SET/XC5000_TUNER_SET_TV to the xc5000.h
> call tuner callback from xc5000_set_analog_params with new params about switching.
> In this case inside saa7134 need know about zl10353 and configuration. I don't understand how to do.
> The structure saa7134_dev hasn't pointer to the structure dvb_frontend. 
> Or use hardcoded i2c_addr and params.
> 
> 2.
> Direct call switch the switcher from the tuner code. In this case need know TV card type. I think it is not so good idea.


Alternative 2 is not a good idea.

There's another alternative: just call some code at saa7134-video, when changing from TV or from video, 
for example, at s_freq. It may be hard to track when this happens, as the user may be using a program 
like kradio, that may keep the device open even while not using it.

This problem looks like one I'm currently having where both DVB and analog parts are trying to access
tda18271 tuner and mb86a20s demod at the same time. The same problem also happened on em28xx and cx231xx.
The solution there were to (ab)use of the device lock, but it is not perfect.

There's a better alternative that requires adding more glue at frontend.

I'll post soon an email with a proposal for that. It would also solve other problems that we're currently
experiencing.

Cheers,
Mauro

  reply	other threads:[~2010-10-06 12:26 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-18  7:30 [PATCH] xc5000, rework xc_write_reg Dmitri Belimov
2010-05-24  2:38 ` Devin Heitmueller
2010-05-25  1:49   ` Dmitri Belimov
2010-07-05 16:11     ` Mauro Carvalho Chehab
2010-07-05 19:07       ` Devin Heitmueller
2010-10-06 19:52         ` xc5000 and switch RF input Dmitri Belimov
2010-10-06 12:25           ` Mauro Carvalho Chehab [this message]
2010-10-06 12:40           ` [RFC] Resource reservation for frontend - Was: " Mauro Carvalho Chehab
2010-10-07 13:00             ` Dmitri Belimov
2010-10-07  0:28               ` Mauro Carvalho Chehab
2010-10-12 18:32                 ` Dmitri Belimov
2010-10-14  8:33             ` Antti Palosaari
2010-10-14  8:41               ` Devin Heitmueller
2010-10-15 15:33                 ` Antti Palosaari
2010-10-13 21:30         ` [PATCH] " Dmitri Belimov
2010-10-14  0:50           ` Devin Heitmueller
2010-10-14 16:12             ` Dmitri Belimov
2010-10-14 19:27               ` hermann pitton
2010-10-26  3:31         ` [PATCH] saa7134 behold A7 and H7 Dmitri Belimov

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=4CAC6AD2.6050600@redhat.com \
    --to=mchehab@redhat.com \
    --cc=beehock@gmail.com \
    --cc=d.belimov@gmail.com \
    --cc=dheitmueller@kernellabs.com \
    --cc=linux-media@vger.kernel.org \
    --cc=stefan.ringel@arcor.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox