All of lore.kernel.org
 help / color / mirror / Atom feed
From: Antti Palosaari <crope@iki.fi>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: LMML <linux-media@vger.kernel.org>
Subject: Re: Keene
Date: Thu, 30 May 2013 02:52:02 +0300	[thread overview]
Message-ID: <51A694A2.10807@iki.fi> (raw)
In-Reply-To: <51A641DE.9020403@iki.fi>

[-- Attachment #1: Type: text/plain, Size: 2192 bytes --]

On 05/29/2013 08:58 PM, Antti Palosaari wrote:
> On 05/29/2013 05:26 PM, Hans Verkuil wrote:
>> On Fri April 19 2013 11:11:27 Antti Palosaari wrote:
>>> On 04/19/2013 10:12 AM, Hans Verkuil wrote:
>>>> On Wed April 17 2013 21:45:24 Antti Palosaari wrote:
>>>>> On 04/15/2013 09:55 AM, Hans Verkuil wrote:
>>>>>> On Fri April 12 2013 02:11:41 Antti Palosaari wrote:
>>>>>>> Hello Hans,
>>>>>>> That device is working very, thank you for it. Anyhow, I noticed
>>>>>>> two things.
>>>>>>>
>>>>>>> 1) it does not start transmitting just after I plug it - I have to
>>>>>>> retune it!
>>>>>>> Output says it is tuned to 95.160000 MHz by default, but it is not.
>>>>>>> After I issue retune, just to same channel it starts working.
>>>>>>> $ v4l2-ctl -d /dev/radio0 --set-freq=95.16
>>>>>>
>>>>>> Can you try this patch:
>>>>>>
>>>>>
>>>>> It does not resolve the problem. It is quite strange behavior. After I
>>>>> install modules, and modules are unload, plug stick in first time, it
>>>>> usually (not every-time) starts TX. But when I replug it without
>>>>> unloading modules, it will never start TX. Tx is started always when I
>>>>> set freq using v4l2-ctl.
>>>>
>>>> If you replace 'false' by 'true' in the cmd_main, does that make it
>>>> work?
>>>> I'm fairly certain that's the problem.
>>>
>>> Nope, I replaces all 'false' with 'true' and problem remains. When
>>> modules were unload and device is plugged it starts TX. When I replug it
>>> doesn't start anymore.
>>>
>>> I just added msleep(1000); just before keene_cmd_main() in .probe() and
>>> now it seems to work every-time. So it is definitely timing issue. I
>>> will try to find out some smallest suitable value for sleep and and sent
>>> patch.
>>
>> Have you had time to find a smaller msleep value?
>
> Nope, but I will do it today (if I don't meet any problems when
> upgrading to latest master).
>
> regards
> Antti
>

Attached patch gives some idea. Do what you want, I have no idea how it 
should be.

Interesting thing I saw there was some automatic on/off Tx logic, but 
unfortunately it was enabled randomly.

Also keene_cmd_main() play parameter does not have any effect.

regards
Antti


-- 
http://palosaari.fi/

[-- Attachment #2: 0001-Keene-start-Tx-by-default.patch --]
[-- Type: text/x-patch, Size: 1399 bytes --]

>From 59257e5556a5ac4d19111e35001ced5b4d53b5c2 Mon Sep 17 00:00:00 2001
From: Antti Palosaari <crope@iki.fi>
Date: Thu, 30 May 2013 02:45:47 +0300
Subject: [PATCH] Keene: start Tx by default

Signed-off-by: Antti Palosaari <crope@iki.fi>
---
 drivers/media/radio/radio-keene.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/media/radio/radio-keene.c b/drivers/media/radio/radio-keene.c
index 4c9ae76..d710529 100644
--- a/drivers/media/radio/radio-keene.c
+++ b/drivers/media/radio/radio-keene.c
@@ -383,6 +383,20 @@ static int usb_keene_probe(struct usb_interface *intf,
 	video_set_drvdata(&radio->vdev, radio);
 	set_bit(V4L2_FL_USE_FH_PRIO, &radio->vdev.flags);
 
+	/*
+	 * mdelay(11) needed in order to apply keene_cmd_main() command.
+	 * mdelay(10) is not enough, it works sometimes but usually not.
+	 *
+	 * keene_cmd_main() 3rd parameter (play) does not has any effect.
+	 * It starts Tx regardless of that parameter.
+	 *
+	 * Sometimes it enters mode where it stops Tx automatically after input
+	 * is silent 60 sec and also starts Tx automatically when there is
+	 * noise on input. It is not clear how to enable that...
+	 */
+	mdelay(11);
+	keene_cmd_main(radio, 95.16 * FREQ_MUL, false);
+
 	retval = video_register_device(&radio->vdev, VFL_TYPE_RADIO, -1);
 	if (retval < 0) {
 		dev_err(&intf->dev, "could not register video device\n");
-- 
1.7.11.7


  reply	other threads:[~2013-05-29 23:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12  0:11 Keene Antti Palosaari
2013-04-15  6:55 ` Keene Hans Verkuil
2013-04-17 19:45   ` Keene Antti Palosaari
2013-04-19  7:12     ` Keene Hans Verkuil
2013-04-19  9:11       ` Keene Antti Palosaari
2013-04-19  9:58         ` Keene Hans Verkuil
2013-04-19 13:16           ` Keene Devin Heitmueller
2013-05-29 14:26         ` Keene Hans Verkuil
2013-05-29 17:58           ` Keene Antti Palosaari
2013-05-29 23:52             ` Antti Palosaari [this message]
2013-05-31  8:07               ` Keene Hans Verkuil

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=51A694A2.10807@iki.fi \
    --to=crope@iki.fi \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /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.