linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Keene
@ 2013-04-12  0:11 Antti Palosaari
  2013-04-15  6:55 ` Keene Hans Verkuil
  0 siblings, 1 reply; 11+ messages in thread
From: Antti Palosaari @ 2013-04-12  0:11 UTC (permalink / raw)
  To: Hans Verkuil, LMML

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

2) What is that log printing?
ALSA sound/usb/mixer.c:932 13:0: cannot get min/max values for control 2 
(id 13)


usb 5-2: new full-speed USB device number 3 using ohci_hcd
usb 5-2: New USB device found, idVendor=046d, idProduct=0a0e
usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 5-2: Product: B-LINK USB Audio
usb 5-2: Manufacturer: HOLTEK
ALSA sound/usb/mixer.c:932 13:0: cannot get min/max values for control 2 
(id 13)
radio-keene 5-2:1.2: V4L2 device registered as radio0


$ v4l2-ctl -d /dev/radio0 --all -L
Driver Info (not using libv4l2):
	Driver name   : radio-keene
	Card type     : Keene FM Transmitter
	Bus info      : usb-0000:00:13.0-2
	Driver version: 3.9.0
	Capabilities  : 0x800C0000
		Modulator
		Radio
Frequency: 1522560 (95.160000 MHz)
Modulator:
	Name                 : FM
	Capabilities         : 62.5 Hz stereo
	Frequency range      : 76.0 MHz - 108.0 MHz
	Subchannel modulation: stereo
Priority: 2

User Controls

                            mute (bool)   : default=0 value=0

FM Radio Modulator Controls

          audio_compression_gain (int)    : min=-15 max=18 step=3 
default=0 value=0 flags=slider
                    pre_emphasis (menu)   : min=0 max=2 default=1 value=1
				1: 50 Microseconds
				2: 75 Microseconds
                tune_power_level (int)    : min=84 max=118 step=1 
default=118 value=118 flags=slider


regards
Antti

-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Keene
  2013-04-12  0:11 Keene Antti Palosaari
@ 2013-04-15  6:55 ` Hans Verkuil
  2013-04-17 19:45   ` Keene Antti Palosaari
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Verkuil @ 2013-04-15  6:55 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: LMML

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:

diff --git a/drivers/media/radio/radio-keene.c b/drivers/media/radio/radio-keene.c
index 4c9ae76..99da3d4 100644
--- a/drivers/media/radio/radio-keene.c
+++ b/drivers/media/radio/radio-keene.c
@@ -93,7 +93,7 @@ static int keene_cmd_main(struct keene_device *radio, unsigned freq, bool play)
 	/* If bit 4 is set, then tune to the frequency.
 	   If bit 3 is set, then unmute; if bit 2 is set, then mute.
 	   If bit 1 is set, then enter idle mode; if bit 0 is set,
-	   then enter transit mode.
+	   then enter transmit mode.
 	 */
 	radio->buffer[5] = (radio->muted ? 4 : 8) | (play ? 1 : 2) |
 							(freq ? 0x10 : 0);
@@ -350,7 +350,6 @@ static int usb_keene_probe(struct usb_interface *intf,
 	radio->pa = 118;
 	radio->tx = 0x32;
 	radio->stereo = true;
-	radio->curfreq = 95.16 * FREQ_MUL;
 	if (hdl->error) {
 		retval = hdl->error;
 
@@ -383,6 +382,8 @@ 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);
 
+	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");


> 2) What is that log printing?
> ALSA sound/usb/mixer.c:932 13:0: cannot get min/max values for control 2 
> (id 13)
> 
> 
> usb 5-2: new full-speed USB device number 3 using ohci_hcd
> usb 5-2: New USB device found, idVendor=046d, idProduct=0a0e
> usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> usb 5-2: Product: B-LINK USB Audio
> usb 5-2: Manufacturer: HOLTEK
> ALSA sound/usb/mixer.c:932 13:0: cannot get min/max values for control 2 
> (id 13)
> radio-keene 5-2:1.2: V4L2 device registered as radio0

No idea, and I don't get that message either.

Regards,

	Hans

> 
> 
> $ v4l2-ctl -d /dev/radio0 --all -L
> Driver Info (not using libv4l2):
> 	Driver name   : radio-keene
> 	Card type     : Keene FM Transmitter
> 	Bus info      : usb-0000:00:13.0-2
> 	Driver version: 3.9.0
> 	Capabilities  : 0x800C0000
> 		Modulator
> 		Radio
> Frequency: 1522560 (95.160000 MHz)
> Modulator:
> 	Name                 : FM
> 	Capabilities         : 62.5 Hz stereo
> 	Frequency range      : 76.0 MHz - 108.0 MHz
> 	Subchannel modulation: stereo
> Priority: 2
> 
> User Controls
> 
>                             mute (bool)   : default=0 value=0
> 
> FM Radio Modulator Controls
> 
>           audio_compression_gain (int)    : min=-15 max=18 step=3 
> default=0 value=0 flags=slider
>                     pre_emphasis (menu)   : min=0 max=2 default=1 value=1
> 				1: 50 Microseconds
> 				2: 75 Microseconds
>                 tune_power_level (int)    : min=84 max=118 step=1 
> default=118 value=118 flags=slider
> 
> 
> regards
> Antti
> 
> 

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: Keene
  2013-04-15  6:55 ` Keene Hans Verkuil
@ 2013-04-17 19:45   ` Antti Palosaari
  2013-04-19  7:12     ` Keene Hans Verkuil
  0 siblings, 1 reply; 11+ messages in thread
From: Antti Palosaari @ 2013-04-17 19:45 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: LMML

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.

Possible timing issue?


Is there some flag API flag to tell start / stop device? For my mind 
correct behavior is to stop TX and sleep when device is plugged/module 
load. Something like set freq 0 when device is not active to tell user 
it is not sending/receiving and must be tuned in order to operate.


regards
Antti






> diff --git a/drivers/media/radio/radio-keene.c b/drivers/media/radio/radio-keene.c
> index 4c9ae76..99da3d4 100644
> --- a/drivers/media/radio/radio-keene.c
> +++ b/drivers/media/radio/radio-keene.c
> @@ -93,7 +93,7 @@ static int keene_cmd_main(struct keene_device *radio, unsigned freq, bool play)
>   	/* If bit 4 is set, then tune to the frequency.
>   	   If bit 3 is set, then unmute; if bit 2 is set, then mute.
>   	   If bit 1 is set, then enter idle mode; if bit 0 is set,
> -	   then enter transit mode.
> +	   then enter transmit mode.
>   	 */
>   	radio->buffer[5] = (radio->muted ? 4 : 8) | (play ? 1 : 2) |
>   							(freq ? 0x10 : 0);
> @@ -350,7 +350,6 @@ static int usb_keene_probe(struct usb_interface *intf,
>   	radio->pa = 118;
>   	radio->tx = 0x32;
>   	radio->stereo = true;
> -	radio->curfreq = 95.16 * FREQ_MUL;
>   	if (hdl->error) {
>   		retval = hdl->error;
>
> @@ -383,6 +382,8 @@ 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);
>
> +	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");
>
>
>> 2) What is that log printing?
>> ALSA sound/usb/mixer.c:932 13:0: cannot get min/max values for control 2
>> (id 13)
>>
>>
>> usb 5-2: new full-speed USB device number 3 using ohci_hcd
>> usb 5-2: New USB device found, idVendor=046d, idProduct=0a0e
>> usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
>> usb 5-2: Product: B-LINK USB Audio
>> usb 5-2: Manufacturer: HOLTEK
>> ALSA sound/usb/mixer.c:932 13:0: cannot get min/max values for control 2
>> (id 13)
>> radio-keene 5-2:1.2: V4L2 device registered as radio0
>
> No idea, and I don't get that message either.
>
> Regards,
>
> 	Hans
>
>>
>>
>> $ v4l2-ctl -d /dev/radio0 --all -L
>> Driver Info (not using libv4l2):
>> 	Driver name   : radio-keene
>> 	Card type     : Keene FM Transmitter
>> 	Bus info      : usb-0000:00:13.0-2
>> 	Driver version: 3.9.0
>> 	Capabilities  : 0x800C0000
>> 		Modulator
>> 		Radio
>> Frequency: 1522560 (95.160000 MHz)
>> Modulator:
>> 	Name                 : FM
>> 	Capabilities         : 62.5 Hz stereo
>> 	Frequency range      : 76.0 MHz - 108.0 MHz
>> 	Subchannel modulation: stereo
>> Priority: 2
>>
>> User Controls
>>
>>                              mute (bool)   : default=0 value=0
>>
>> FM Radio Modulator Controls
>>
>>            audio_compression_gain (int)    : min=-15 max=18 step=3
>> default=0 value=0 flags=slider
>>                      pre_emphasis (menu)   : min=0 max=2 default=1 value=1
>> 				1: 50 Microseconds
>> 				2: 75 Microseconds
>>                  tune_power_level (int)    : min=84 max=118 step=1
>> default=118 value=118 flags=slider
>>
>>
>> regards
>> Antti
>>
>>


-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Keene
  2013-04-17 19:45   ` Keene Antti Palosaari
@ 2013-04-19  7:12     ` Hans Verkuil
  2013-04-19  9:11       ` Keene Antti Palosaari
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Verkuil @ 2013-04-19  7:12 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: LMML

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.

> 
> Possible timing issue?
> 
> 
> Is there some flag API flag to tell start / stop device? For my mind 
> correct behavior is to stop TX and sleep when device is plugged/module 
> load. Something like set freq 0 when device is not active to tell user 
> it is not sending/receiving and must be tuned in order to operate.

This is actually a core problem with the radio API: there is no clear
way of turning the tuner or modulator on and off on command. With video
you know that you can turn off the tuner if no filehandle is open. But
with radio you do not have that luxury since audio can go through alsa
or through an audio jack.

One option is to use mute. Most radio receivers start off muted and you
have to unmute first. This could be used as a signal for receivers to
turn the tuner on/off. But for a modulator that's not an option: turning
off the modulator means turning off the transmitter, and that's not what
you want if you are, say, the presenter of a radio program and you want
to quickly mute because you feel a sneeze coming :-)

I think we need a specific API for this, but in the absence of one we should
just leave the modulator enabled from the start.

Regards,

	Hans

> 
> 
> regards
> Antti
> 
> 
> 
> 
> 
> 
> > diff --git a/drivers/media/radio/radio-keene.c b/drivers/media/radio/radio-keene.c
> > index 4c9ae76..99da3d4 100644
> > --- a/drivers/media/radio/radio-keene.c
> > +++ b/drivers/media/radio/radio-keene.c
> > @@ -93,7 +93,7 @@ static int keene_cmd_main(struct keene_device *radio, unsigned freq, bool play)
> >   	/* If bit 4 is set, then tune to the frequency.
> >   	   If bit 3 is set, then unmute; if bit 2 is set, then mute.
> >   	   If bit 1 is set, then enter idle mode; if bit 0 is set,
> > -	   then enter transit mode.
> > +	   then enter transmit mode.
> >   	 */
> >   	radio->buffer[5] = (radio->muted ? 4 : 8) | (play ? 1 : 2) |
> >   							(freq ? 0x10 : 0);
> > @@ -350,7 +350,6 @@ static int usb_keene_probe(struct usb_interface *intf,
> >   	radio->pa = 118;
> >   	radio->tx = 0x32;
> >   	radio->stereo = true;
> > -	radio->curfreq = 95.16 * FREQ_MUL;
> >   	if (hdl->error) {
> >   		retval = hdl->error;
> >
> > @@ -383,6 +382,8 @@ 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);
> >
> > +	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");
> >
> >
> >> 2) What is that log printing?
> >> ALSA sound/usb/mixer.c:932 13:0: cannot get min/max values for control 2
> >> (id 13)
> >>
> >>
> >> usb 5-2: new full-speed USB device number 3 using ohci_hcd
> >> usb 5-2: New USB device found, idVendor=046d, idProduct=0a0e
> >> usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> >> usb 5-2: Product: B-LINK USB Audio
> >> usb 5-2: Manufacturer: HOLTEK
> >> ALSA sound/usb/mixer.c:932 13:0: cannot get min/max values for control 2
> >> (id 13)
> >> radio-keene 5-2:1.2: V4L2 device registered as radio0
> >
> > No idea, and I don't get that message either.
> >
> > Regards,
> >
> > 	Hans
> >
> >>
> >>
> >> $ v4l2-ctl -d /dev/radio0 --all -L
> >> Driver Info (not using libv4l2):
> >> 	Driver name   : radio-keene
> >> 	Card type     : Keene FM Transmitter
> >> 	Bus info      : usb-0000:00:13.0-2
> >> 	Driver version: 3.9.0
> >> 	Capabilities  : 0x800C0000
> >> 		Modulator
> >> 		Radio
> >> Frequency: 1522560 (95.160000 MHz)
> >> Modulator:
> >> 	Name                 : FM
> >> 	Capabilities         : 62.5 Hz stereo
> >> 	Frequency range      : 76.0 MHz - 108.0 MHz
> >> 	Subchannel modulation: stereo
> >> Priority: 2
> >>
> >> User Controls
> >>
> >>                              mute (bool)   : default=0 value=0
> >>
> >> FM Radio Modulator Controls
> >>
> >>            audio_compression_gain (int)    : min=-15 max=18 step=3
> >> default=0 value=0 flags=slider
> >>                      pre_emphasis (menu)   : min=0 max=2 default=1 value=1
> >> 				1: 50 Microseconds
> >> 				2: 75 Microseconds
> >>                  tune_power_level (int)    : min=84 max=118 step=1
> >> default=118 value=118 flags=slider
> >>
> >>
> >> regards
> >> Antti
> >>
> >>
> 
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Keene
  2013-04-19  7:12     ` Keene Hans Verkuil
@ 2013-04-19  9:11       ` Antti Palosaari
  2013-04-19  9:58         ` Keene Hans Verkuil
  2013-05-29 14:26         ` Keene Hans Verkuil
  0 siblings, 2 replies; 11+ messages in thread
From: Antti Palosaari @ 2013-04-19  9:11 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: LMML

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.


>
>>
>> Possible timing issue?
>>
>>
>> Is there some flag API flag to tell start / stop device? For my mind
>> correct behavior is to stop TX and sleep when device is plugged/module
>> load. Something like set freq 0 when device is not active to tell user
>> it is not sending/receiving and must be tuned in order to operate.
>
> This is actually a core problem with the radio API: there is no clear
> way of turning the tuner or modulator on and off on command. With video
> you know that you can turn off the tuner if no filehandle is open. But
> with radio you do not have that luxury since audio can go through alsa
> or through an audio jack.
>
> One option is to use mute. Most radio receivers start off muted and you
> have to unmute first. This could be used as a signal for receivers to
> turn the tuner on/off. But for a modulator that's not an option: turning
> off the modulator means turning off the transmitter, and that's not what
> you want if you are, say, the presenter of a radio program and you want
> to quickly mute because you feel a sneeze coming :-)
>
> I think we need a specific API for this, but in the absence of one we should
> just leave the modulator enabled from the start.

yeah, that's just the issue I was wondering. Is there some reason 
frequency value could not be used? Defining frequency to 0MHz or -1MHz 
and Tx (maybe Rx too) is off?

Here is power consumption I measured:
26.5mA play=false (idle mode)
39.0mA Tx on 95.16 MHz

It wastes 12.5mA (from USB Vcc 5v) when Tx is enabled.

regards
Antti

>
> Regards,
>
> 	Hans
>
>>
>>
>> regards
>> Antti
>>
>>
>>
>>
>>
>>
>>> diff --git a/drivers/media/radio/radio-keene.c b/drivers/media/radio/radio-keene.c
>>> index 4c9ae76..99da3d4 100644
>>> --- a/drivers/media/radio/radio-keene.c
>>> +++ b/drivers/media/radio/radio-keene.c
>>> @@ -93,7 +93,7 @@ static int keene_cmd_main(struct keene_device *radio, unsigned freq, bool play)
>>>    	/* If bit 4 is set, then tune to the frequency.
>>>    	   If bit 3 is set, then unmute; if bit 2 is set, then mute.
>>>    	   If bit 1 is set, then enter idle mode; if bit 0 is set,
>>> -	   then enter transit mode.
>>> +	   then enter transmit mode.
>>>    	 */
>>>    	radio->buffer[5] = (radio->muted ? 4 : 8) | (play ? 1 : 2) |
>>>    							(freq ? 0x10 : 0);
>>> @@ -350,7 +350,6 @@ static int usb_keene_probe(struct usb_interface *intf,
>>>    	radio->pa = 118;
>>>    	radio->tx = 0x32;
>>>    	radio->stereo = true;
>>> -	radio->curfreq = 95.16 * FREQ_MUL;
>>>    	if (hdl->error) {
>>>    		retval = hdl->error;
>>>
>>> @@ -383,6 +382,8 @@ 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);
>>>
>>> +	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");
>>>
>>>
>>>> 2) What is that log printing?
>>>> ALSA sound/usb/mixer.c:932 13:0: cannot get min/max values for control 2
>>>> (id 13)
>>>>
>>>>
>>>> usb 5-2: new full-speed USB device number 3 using ohci_hcd
>>>> usb 5-2: New USB device found, idVendor=046d, idProduct=0a0e
>>>> usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
>>>> usb 5-2: Product: B-LINK USB Audio
>>>> usb 5-2: Manufacturer: HOLTEK
>>>> ALSA sound/usb/mixer.c:932 13:0: cannot get min/max values for control 2
>>>> (id 13)
>>>> radio-keene 5-2:1.2: V4L2 device registered as radio0
>>>
>>> No idea, and I don't get that message either.
>>>
>>> Regards,
>>>
>>> 	Hans
>>>
>>>>
>>>>
>>>> $ v4l2-ctl -d /dev/radio0 --all -L
>>>> Driver Info (not using libv4l2):
>>>> 	Driver name   : radio-keene
>>>> 	Card type     : Keene FM Transmitter
>>>> 	Bus info      : usb-0000:00:13.0-2
>>>> 	Driver version: 3.9.0
>>>> 	Capabilities  : 0x800C0000
>>>> 		Modulator
>>>> 		Radio
>>>> Frequency: 1522560 (95.160000 MHz)
>>>> Modulator:
>>>> 	Name                 : FM
>>>> 	Capabilities         : 62.5 Hz stereo
>>>> 	Frequency range      : 76.0 MHz - 108.0 MHz
>>>> 	Subchannel modulation: stereo
>>>> Priority: 2
>>>>
>>>> User Controls
>>>>
>>>>                               mute (bool)   : default=0 value=0
>>>>
>>>> FM Radio Modulator Controls
>>>>
>>>>             audio_compression_gain (int)    : min=-15 max=18 step=3
>>>> default=0 value=0 flags=slider
>>>>                       pre_emphasis (menu)   : min=0 max=2 default=1 value=1
>>>> 				1: 50 Microseconds
>>>> 				2: 75 Microseconds
>>>>                   tune_power_level (int)    : min=84 max=118 step=1
>>>> default=118 value=118 flags=slider
>>>>
>>>>
>>>> regards
>>>> Antti
>>>>
>>>>
>>
>>
>>


-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Keene
  2013-04-19  9:11       ` Keene Antti Palosaari
@ 2013-04-19  9:58         ` Hans Verkuil
  2013-04-19 13:16           ` Keene Devin Heitmueller
  2013-05-29 14:26         ` Keene Hans Verkuil
  1 sibling, 1 reply; 11+ messages in thread
From: Hans Verkuil @ 2013-04-19  9:58 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: LMML

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.
> 
> 
> >
> >>
> >> Possible timing issue?
> >>
> >>
> >> Is there some flag API flag to tell start / stop device? For my mind
> >> correct behavior is to stop TX and sleep when device is plugged/module
> >> load. Something like set freq 0 when device is not active to tell user
> >> it is not sending/receiving and must be tuned in order to operate.
> >
> > This is actually a core problem with the radio API: there is no clear
> > way of turning the tuner or modulator on and off on command. With video
> > you know that you can turn off the tuner if no filehandle is open. But
> > with radio you do not have that luxury since audio can go through alsa
> > or through an audio jack.
> >
> > One option is to use mute. Most radio receivers start off muted and you
> > have to unmute first. This could be used as a signal for receivers to
> > turn the tuner on/off. But for a modulator that's not an option: turning
> > off the modulator means turning off the transmitter, and that's not what
> > you want if you are, say, the presenter of a radio program and you want
> > to quickly mute because you feel a sneeze coming :-)
> >
> > I think we need a specific API for this, but in the absence of one we should
> > just leave the modulator enabled from the start.
> 
> yeah, that's just the issue I was wondering. Is there some reason 
> frequency value could not be used? Defining frequency to 0MHz or -1MHz 
> and Tx (maybe Rx too) is off?

It's one option, yes. But I'm not entirely pleased with that as I'd like the
driver to remember the last frequency. I would prefer to handle this as a
separate setting. There may be other solutions as well, I'm not sure.

The core problem is of course a poor design of the radio API: it really should
behave like a video node where it is possible to power off if nobody has the
node open. But that breaks compatibility...

Since this is all very specific to radio devices I am inclined to introduce
a radio-specific ioctl or control for this.

But there is a related issue with USB video devices: after the last close()
do you power off the device immediately, wait a bit before doing that or keep
it alive all the time? This becomes relevant if powering up takes a long time
because of e.g. having to reload firmware or intializing i2c devices.

So perhaps this can be solved with two generic controls:

bool CID_POWER_OFF_AT_LAST_CLOSE
int CID_POWER_OFF_DELAY (unit: seconds)

If POWER_OFF_AT_LAST_CLOSE is false, then you never power off. If it is true,
then power off after a given delay. If the delay == 0 then power off immediately.

Drivers can decide on proper default values. But radio devices must start
with CID_POWER_OFF_AT_LAST_CLOSE set to false for compatibility reasons.

I don't have time for the next few weeks to investigate this further, so if
you are interested...

Regards,

	Hans

> Here is power consumption I measured:
> 26.5mA play=false (idle mode)
> 39.0mA Tx on 95.16 MHz
> 
> It wastes 12.5mA (from USB Vcc 5v) when Tx is enabled.
> 
> regards
> Antti
> 
> >
> > Regards,
> >
> > 	Hans
> >
> >>
> >>
> >> regards
> >> Antti
> >>
> >>
> >>
> >>
> >>
> >>
> >>> diff --git a/drivers/media/radio/radio-keene.c b/drivers/media/radio/radio-keene.c
> >>> index 4c9ae76..99da3d4 100644
> >>> --- a/drivers/media/radio/radio-keene.c
> >>> +++ b/drivers/media/radio/radio-keene.c
> >>> @@ -93,7 +93,7 @@ static int keene_cmd_main(struct keene_device *radio, unsigned freq, bool play)
> >>>    	/* If bit 4 is set, then tune to the frequency.
> >>>    	   If bit 3 is set, then unmute; if bit 2 is set, then mute.
> >>>    	   If bit 1 is set, then enter idle mode; if bit 0 is set,
> >>> -	   then enter transit mode.
> >>> +	   then enter transmit mode.
> >>>    	 */
> >>>    	radio->buffer[5] = (radio->muted ? 4 : 8) | (play ? 1 : 2) |
> >>>    							(freq ? 0x10 : 0);
> >>> @@ -350,7 +350,6 @@ static int usb_keene_probe(struct usb_interface *intf,
> >>>    	radio->pa = 118;
> >>>    	radio->tx = 0x32;
> >>>    	radio->stereo = true;
> >>> -	radio->curfreq = 95.16 * FREQ_MUL;
> >>>    	if (hdl->error) {
> >>>    		retval = hdl->error;
> >>>
> >>> @@ -383,6 +382,8 @@ 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);
> >>>
> >>> +	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");
> >>>
> >>>
> >>>> 2) What is that log printing?
> >>>> ALSA sound/usb/mixer.c:932 13:0: cannot get min/max values for control 2
> >>>> (id 13)
> >>>>
> >>>>
> >>>> usb 5-2: new full-speed USB device number 3 using ohci_hcd
> >>>> usb 5-2: New USB device found, idVendor=046d, idProduct=0a0e
> >>>> usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> >>>> usb 5-2: Product: B-LINK USB Audio
> >>>> usb 5-2: Manufacturer: HOLTEK
> >>>> ALSA sound/usb/mixer.c:932 13:0: cannot get min/max values for control 2
> >>>> (id 13)
> >>>> radio-keene 5-2:1.2: V4L2 device registered as radio0
> >>>
> >>> No idea, and I don't get that message either.
> >>>
> >>> Regards,
> >>>
> >>> 	Hans
> >>>
> >>>>
> >>>>
> >>>> $ v4l2-ctl -d /dev/radio0 --all -L
> >>>> Driver Info (not using libv4l2):
> >>>> 	Driver name   : radio-keene
> >>>> 	Card type     : Keene FM Transmitter
> >>>> 	Bus info      : usb-0000:00:13.0-2
> >>>> 	Driver version: 3.9.0
> >>>> 	Capabilities  : 0x800C0000
> >>>> 		Modulator
> >>>> 		Radio
> >>>> Frequency: 1522560 (95.160000 MHz)
> >>>> Modulator:
> >>>> 	Name                 : FM
> >>>> 	Capabilities         : 62.5 Hz stereo
> >>>> 	Frequency range      : 76.0 MHz - 108.0 MHz
> >>>> 	Subchannel modulation: stereo
> >>>> Priority: 2
> >>>>
> >>>> User Controls
> >>>>
> >>>>                               mute (bool)   : default=0 value=0
> >>>>
> >>>> FM Radio Modulator Controls
> >>>>
> >>>>             audio_compression_gain (int)    : min=-15 max=18 step=3
> >>>> default=0 value=0 flags=slider
> >>>>                       pre_emphasis (menu)   : min=0 max=2 default=1 value=1
> >>>> 				1: 50 Microseconds
> >>>> 				2: 75 Microseconds
> >>>>                   tune_power_level (int)    : min=84 max=118 step=1
> >>>> default=118 value=118 flags=slider
> >>>>
> >>>>
> >>>> regards
> >>>> Antti
> >>>>
> >>>>
> >>
> >>
> >>
> 
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Keene
  2013-04-19  9:58         ` Keene Hans Verkuil
@ 2013-04-19 13:16           ` Devin Heitmueller
  0 siblings, 0 replies; 11+ messages in thread
From: Devin Heitmueller @ 2013-04-19 13:16 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: Antti Palosaari, LMML

On Fri, Apr 19, 2013 at 5:58 AM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> So perhaps this can be solved with two generic controls:
>
> bool CID_POWER_OFF_AT_LAST_CLOSE
> int CID_POWER_OFF_DELAY (unit: seconds)
>
> If POWER_OFF_AT_LAST_CLOSE is false, then you never power off. If it is true,
> then power off after a given delay. If the delay == 0 then power off immediately.
>
> Drivers can decide on proper default values. But radio devices must start
> with CID_POWER_OFF_AT_LAST_CLOSE set to false for compatibility reasons.
>
> I don't have time for the next few weeks to investigate this further, so if
> you are interested...

Bear in mind that deferred shutdown opens a huge set of problems with
hybrid tuners.  We already have many, many race known conditions
related to closing V4L and then immediately opening the corresponding
DVB device (and closing DVB then immediately opening the V4L device).
Without a proper framework, a change such as this will exacerbate the
problem.

These race conditions typically result in completely undefined
behavior, as you either having both sides of the device powered up at
the same time, or you have the second half powered up and then
conflicting commands are received to power it down because of deferred
commands for the first half to go to sleep.

It's an absolute mess.

And please don't forget that this isn't just about a shared tuner chip
- it's about the state of video decoders and demodulators as well.
You cannot just introduce simple locking in tuner-core and hope that
resolves the problem.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Keene
  2013-04-19  9:11       ` Keene Antti Palosaari
  2013-04-19  9:58         ` Keene Hans Verkuil
@ 2013-05-29 14:26         ` Hans Verkuil
  2013-05-29 17:58           ` Keene Antti Palosaari
  1 sibling, 1 reply; 11+ messages in thread
From: Hans Verkuil @ 2013-05-29 14:26 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: LMML

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?

Regards,

	Hans

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Keene
  2013-05-29 14:26         ` Keene Hans Verkuil
@ 2013-05-29 17:58           ` Antti Palosaari
  2013-05-29 23:52             ` Keene Antti Palosaari
  0 siblings, 1 reply; 11+ messages in thread
From: Antti Palosaari @ 2013-05-29 17:58 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: LMML

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

-- 
http://palosaari.fi/

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Keene
  2013-05-29 17:58           ` Keene Antti Palosaari
@ 2013-05-29 23:52             ` Antti Palosaari
  2013-05-31  8:07               ` Keene Hans Verkuil
  0 siblings, 1 reply; 11+ messages in thread
From: Antti Palosaari @ 2013-05-29 23:52 UTC (permalink / raw)
  To: Hans Verkuil; +Cc: LMML

[-- 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


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: Keene
  2013-05-29 23:52             ` Keene Antti Palosaari
@ 2013-05-31  8:07               ` Hans Verkuil
  0 siblings, 0 replies; 11+ messages in thread
From: Hans Verkuil @ 2013-05-31  8:07 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: LMML

On Thu May 30 2013 01:52:02 Antti Palosaari wrote:
> 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.

Can you replace mdelay(11) with msleep(20)? If that works, then I'll use
that. That's still very short but it is non-blocking and has more margin.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-05-31  8:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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             ` Keene Antti Palosaari
2013-05-31  8:07               ` Keene Hans Verkuil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).