All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] radio-si470x: Don't unnecesarily read registers on G_TUNER
@ 2012-06-14 13:43 Hans de Goede
  2012-06-14 13:43 ` [PATCH 2/4] radio-si470x: Always use interrupt to wait for tune/seek completion Hans de Goede
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Hans de Goede @ 2012-06-14 13:43 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: hverkuil, Hans de Goede

Reading registers from the pcear USB dongles with the si470x causes a
loud pop (and an alsa buffer overrun). Since most radio apps periodically
call G_TUNER to update mono/stereo, signal and afc status this leads
to the music . pop . music . pop . music -> not good.

On the internet there is an howto for flashing the pcear with a newer
firmware from the silabs reference boardto fix this, but:
1) This howto relies on a special version of the driver which allows
   firmware flashing
2) We should try to avoid the answer to a bug report being upgrade your
   firmware, if at all possible
3) Windows does not suffer from the pop sounds

After a quick look at the driver I found at that the register reads are
not necessary at all, as the device gives us the necessary status through
usb interrupt packets, and the driver already uses these!

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/media/radio/si470x/radio-si470x-common.c |   10 ++++++----
 drivers/media/radio/si470x/radio-si470x-usb.c    |   12 +++++++++---
 drivers/media/radio/si470x/radio-si470x.h        |    1 +
 3 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/media/radio/si470x/radio-si470x-common.c b/drivers/media/radio/si470x/radio-si470x-common.c
index d485b79..5dbb897 100644
--- a/drivers/media/radio/si470x/radio-si470x-common.c
+++ b/drivers/media/radio/si470x/radio-si470x-common.c
@@ -583,14 +583,16 @@ static int si470x_vidioc_g_tuner(struct file *file, void *priv,
 		struct v4l2_tuner *tuner)
 {
 	struct si470x_device *radio = video_drvdata(file);
-	int retval;
+	int retval = 0;
 
 	if (tuner->index != 0)
 		return -EINVAL;
 
-	retval = si470x_get_register(radio, STATUSRSSI);
-	if (retval < 0)
-		return retval;
+	if (!radio->status_rssi_auto_update) {
+		retval = si470x_get_register(radio, STATUSRSSI);
+		if (retval < 0)
+			return retval;
+	}
 
 	/* driver constants */
 	strcpy(tuner->name, "FM");
diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c b/drivers/media/radio/si470x/radio-si470x-usb.c
index f412f7a..0da5c98 100644
--- a/drivers/media/radio/si470x/radio-si470x-usb.c
+++ b/drivers/media/radio/si470x/radio-si470x-usb.c
@@ -399,12 +399,16 @@ static void si470x_int_in_callback(struct urb *urb)
 		}
 	}
 
-	if ((radio->registers[SYSCONFIG1] & SYSCONFIG1_RDS) == 0)
+	/* Sometimes the device returns len 0 packets */
+	if (urb->actual_length != RDS_REPORT_SIZE)
 		goto resubmit;
 
-	if (urb->actual_length > 0) {
+	radio->registers[STATUSRSSI] =
+		get_unaligned_be16(&radio->int_in_buffer[1]);
+
+	if ((radio->registers[SYSCONFIG1] & SYSCONFIG1_RDS)) {
 		/* Update RDS registers with URB data */
-		for (regnr = 0; regnr < RDS_REGISTER_NUM; regnr++)
+		for (regnr = 1; regnr < RDS_REGISTER_NUM; regnr++)
 			radio->registers[STATUSRSSI + regnr] =
 			    get_unaligned_be16(&radio->int_in_buffer[
 				regnr * RADIO_REGISTER_SIZE + 1]);
@@ -480,6 +484,7 @@ resubmit:
 			radio->int_in_running = 0;
 		}
 	}
+	radio->status_rssi_auto_update = radio->int_in_running;
 }
 
 
@@ -560,6 +565,7 @@ static int si470x_start_usb(struct si470x_device *radio)
 				"submitting int urb failed (%d)\n", retval);
 		radio->int_in_running = 0;
 	}
+	radio->status_rssi_auto_update = radio->int_in_running;
 	return retval;
 }
 
diff --git a/drivers/media/radio/si470x/radio-si470x.h b/drivers/media/radio/si470x/radio-si470x.h
index 4921cab..2a0a46f 100644
--- a/drivers/media/radio/si470x/radio-si470x.h
+++ b/drivers/media/radio/si470x/radio-si470x.h
@@ -161,6 +161,7 @@ struct si470x_device {
 
 	struct completion completion;
 	bool stci_enabled;		/* Seek/Tune Complete Interrupt */
+	bool status_rssi_auto_update;	/* Does RSSI get updated automatic? */
 
 #if defined(CONFIG_USB_SI470X) || defined(CONFIG_USB_SI470X_MODULE)
 	/* reference to USB and video device */
-- 
1.7.10.2


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

* [PATCH 2/4] radio-si470x: Always use interrupt to wait for tune/seek completion
  2012-06-14 13:43 [PATCH 1/4] radio-si470x: Don't unnecesarily read registers on G_TUNER Hans de Goede
@ 2012-06-14 13:43 ` Hans de Goede
  2012-06-14 13:43 ` [PATCH 3/4] radio-si470x: Lower hardware freq seek signal treshold Hans de Goede
  2012-06-14 13:43 ` [PATCH 4/4] radio-si470x: Lower firmware version requirements Hans de Goede
  2 siblings, 0 replies; 19+ messages in thread
From: Hans de Goede @ 2012-06-14 13:43 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: hverkuil, Hans de Goede

Since USB receives STATUS_RSSI updates through the interrupt endpoint,
there is no need to poll with USB, so get rid of the polling.

Note this also changes the order in which the probing of USB devices is done,
to avoid si470x_set_chan getting called before the interrupt endpoint is being
monitored.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/media/radio/si470x/radio-si470x-common.c |   56 +++++-----------------
 drivers/media/radio/si470x/radio-si470x-i2c.c    |    5 +-
 drivers/media/radio/si470x/radio-si470x-usb.c    |   25 ++++++----
 drivers/media/radio/si470x/radio-si470x.h        |    1 -
 4 files changed, 28 insertions(+), 59 deletions(-)

diff --git a/drivers/media/radio/si470x/radio-si470x-common.c b/drivers/media/radio/si470x/radio-si470x-common.c
index 5dbb897..9f8b675 100644
--- a/drivers/media/radio/si470x/radio-si470x-common.c
+++ b/drivers/media/radio/si470x/radio-si470x-common.c
@@ -164,7 +164,6 @@ MODULE_PARM_DESC(seek_timeout, "Seek timeout: *5000*");
 static int si470x_set_chan(struct si470x_device *radio, unsigned short chan)
 {
 	int retval;
-	unsigned long timeout;
 	bool timed_out = 0;
 
 	/* start tuning */
@@ -174,26 +173,12 @@ static int si470x_set_chan(struct si470x_device *radio, unsigned short chan)
 	if (retval < 0)
 		goto done;
 
-	/* currently I2C driver only uses interrupt way to tune */
-	if (radio->stci_enabled) {
-		INIT_COMPLETION(radio->completion);
-
-		/* wait till tune operation has completed */
-		retval = wait_for_completion_timeout(&radio->completion,
-				msecs_to_jiffies(tune_timeout));
-		if (!retval)
-			timed_out = true;
-	} else {
-		/* wait till tune operation has completed */
-		timeout = jiffies + msecs_to_jiffies(tune_timeout);
-		do {
-			retval = si470x_get_register(radio, STATUSRSSI);
-			if (retval < 0)
-				goto stop;
-			timed_out = time_after(jiffies, timeout);
-		} while (((radio->registers[STATUSRSSI] & STATUSRSSI_STC) == 0)
-				&& (!timed_out));
-	}
+	/* wait till tune operation has completed */
+	INIT_COMPLETION(radio->completion);
+	retval = wait_for_completion_timeout(&radio->completion,
+			msecs_to_jiffies(tune_timeout));
+	if (!retval)
+		timed_out = true;
 
 	if ((radio->registers[STATUSRSSI] & STATUSRSSI_STC) == 0)
 		dev_warn(&radio->videodev.dev, "tune does not complete\n");
@@ -201,7 +186,6 @@ static int si470x_set_chan(struct si470x_device *radio, unsigned short chan)
 		dev_warn(&radio->videodev.dev,
 			"tune timed out after %u ms\n", tune_timeout);
 
-stop:
 	/* stop tuning */
 	radio->registers[CHANNEL] &= ~CHANNEL_TUNE;
 	retval = si470x_set_register(radio, CHANNEL);
@@ -312,7 +296,6 @@ static int si470x_set_seek(struct si470x_device *radio,
 		unsigned int wrap_around, unsigned int seek_upward)
 {
 	int retval = 0;
-	unsigned long timeout;
 	bool timed_out = 0;
 
 	/* start seeking */
@@ -329,26 +312,12 @@ static int si470x_set_seek(struct si470x_device *radio,
 	if (retval < 0)
 		return retval;
 
-	/* currently I2C driver only uses interrupt way to seek */
-	if (radio->stci_enabled) {
-		INIT_COMPLETION(radio->completion);
-
-		/* wait till seek operation has completed */
-		retval = wait_for_completion_timeout(&radio->completion,
-				msecs_to_jiffies(seek_timeout));
-		if (!retval)
-			timed_out = true;
-	} else {
-		/* wait till seek operation has completed */
-		timeout = jiffies + msecs_to_jiffies(seek_timeout);
-		do {
-			retval = si470x_get_register(radio, STATUSRSSI);
-			if (retval < 0)
-				goto stop;
-			timed_out = time_after(jiffies, timeout);
-		} while (((radio->registers[STATUSRSSI] & STATUSRSSI_STC) == 0)
-				&& (!timed_out));
-	}
+	/* wait till tune operation has completed */
+	INIT_COMPLETION(radio->completion);
+	retval = wait_for_completion_timeout(&radio->completion,
+			msecs_to_jiffies(seek_timeout));
+	if (!retval)
+		timed_out = true;
 
 	if ((radio->registers[STATUSRSSI] & STATUSRSSI_STC) == 0)
 		dev_warn(&radio->videodev.dev, "seek does not complete\n");
@@ -356,7 +325,6 @@ static int si470x_set_seek(struct si470x_device *radio,
 		dev_warn(&radio->videodev.dev,
 			"seek failed / band limit reached\n");
 
-stop:
 	/* stop seeking */
 	radio->registers[POWERCFG] &= ~POWERCFG_SEEK;
 	retval = si470x_set_register(radio, POWERCFG);
diff --git a/drivers/media/radio/si470x/radio-si470x-i2c.c b/drivers/media/radio/si470x/radio-si470x-i2c.c
index a80044c..fb401a2 100644
--- a/drivers/media/radio/si470x/radio-si470x-i2c.c
+++ b/drivers/media/radio/si470x/radio-si470x-i2c.c
@@ -351,6 +351,7 @@ static int __devinit si470x_i2c_probe(struct i2c_client *client,
 
 	radio->client = client;
 	mutex_init(&radio->lock);
+	init_completion(&radio->completion);
 
 	/* video device initialization */
 	radio->videodev = si470x_viddev_template;
@@ -406,10 +407,6 @@ static int __devinit si470x_i2c_probe(struct i2c_client *client,
 	radio->rd_index = 0;
 	init_waitqueue_head(&radio->read_queue);
 
-	/* mark Seek/Tune Complete Interrupt enabled */
-	radio->stci_enabled = true;
-	init_completion(&radio->completion);
-
 	retval = request_threaded_irq(client->irq, NULL, si470x_i2c_interrupt,
 			IRQF_TRIGGER_FALLING, DRIVER_NAME, radio);
 	if (retval) {
diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c b/drivers/media/radio/si470x/radio-si470x-usb.c
index 0da5c98..66b1ba8 100644
--- a/drivers/media/radio/si470x/radio-si470x-usb.c
+++ b/drivers/media/radio/si470x/radio-si470x-usb.c
@@ -406,6 +406,9 @@ static void si470x_int_in_callback(struct urb *urb)
 	radio->registers[STATUSRSSI] =
 		get_unaligned_be16(&radio->int_in_buffer[1]);
 
+	if (radio->registers[STATUSRSSI] & STATUSRSSI_STC)
+		complete(&radio->completion);
+
 	if ((radio->registers[SYSCONFIG1] & SYSCONFIG1_RDS)) {
 		/* Update RDS registers with URB data */
 		for (regnr = 1; regnr < RDS_REGISTER_NUM; regnr++)
@@ -539,13 +542,6 @@ static int si470x_start_usb(struct si470x_device *radio)
 {
 	int retval;
 
-	/* start radio */
-	retval = si470x_start(radio);
-	if (retval < 0)
-		return retval;
-
-	v4l2_ctrl_handler_setup(&radio->hdl);
-
 	/* initialize interrupt urb */
 	usb_fill_int_urb(radio->int_in_urb, radio->usbdev,
 			usb_rcvintpipe(radio->usbdev,
@@ -566,6 +562,14 @@ static int si470x_start_usb(struct si470x_device *radio)
 		radio->int_in_running = 0;
 	}
 	radio->status_rssi_auto_update = radio->int_in_running;
+
+	/* start radio */
+	retval = si470x_start(radio);
+	if (retval < 0)
+		return retval;
+
+	v4l2_ctrl_handler_setup(&radio->hdl);
+
 	return retval;
 }
 
@@ -594,6 +598,7 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
 	radio->usbdev = interface_to_usbdev(intf);
 	radio->intf = intf;
 	mutex_init(&radio->lock);
+	init_completion(&radio->completion);
 
 	iface_desc = intf->cur_altsetting;
 
@@ -704,9 +709,6 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
 			"linux-media@vger.kernel.org\n");
 	}
 
-	/* set initial frequency */
-	si470x_set_freq(radio, 87.5 * FREQ_MUL); /* available in all regions */
-
 	/* set led to connect state */
 	si470x_set_led_state(radio, BLINK_GREEN_LED);
 
@@ -729,6 +731,9 @@ static int si470x_usb_driver_probe(struct usb_interface *intf,
 	if (retval < 0)
 		goto err_all;
 
+	/* set initial frequency */
+	si470x_set_freq(radio, 87.5 * FREQ_MUL); /* available in all regions */
+
 	/* register video device */
 	retval = video_register_device(&radio->videodev, VFL_TYPE_RADIO,
 			radio_nr);
diff --git a/drivers/media/radio/si470x/radio-si470x.h b/drivers/media/radio/si470x/radio-si470x.h
index 2a0a46f..fbf713d 100644
--- a/drivers/media/radio/si470x/radio-si470x.h
+++ b/drivers/media/radio/si470x/radio-si470x.h
@@ -160,7 +160,6 @@ struct si470x_device {
 	unsigned int wr_index;
 
 	struct completion completion;
-	bool stci_enabled;		/* Seek/Tune Complete Interrupt */
 	bool status_rssi_auto_update;	/* Does RSSI get updated automatic? */
 
 #if defined(CONFIG_USB_SI470X) || defined(CONFIG_USB_SI470X_MODULE)
-- 
1.7.10.2


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

* [PATCH 3/4] radio-si470x: Lower hardware freq seek signal treshold
  2012-06-14 13:43 [PATCH 1/4] radio-si470x: Don't unnecesarily read registers on G_TUNER Hans de Goede
  2012-06-14 13:43 ` [PATCH 2/4] radio-si470x: Always use interrupt to wait for tune/seek completion Hans de Goede
@ 2012-06-14 13:43 ` Hans de Goede
  2012-06-14 13:43 ` [PATCH 4/4] radio-si470x: Lower firmware version requirements Hans de Goede
  2 siblings, 0 replies; 19+ messages in thread
From: Hans de Goede @ 2012-06-14 13:43 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: hverkuil, Hans de Goede

The previous value made hardware freq seek not work for me, despite having
good reception of almost all Dutch radio stations.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/media/radio/si470x/radio-si470x-common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/radio/si470x/radio-si470x-common.c b/drivers/media/radio/si470x/radio-si470x-common.c
index 9f8b675..84ab3d57 100644
--- a/drivers/media/radio/si470x/radio-si470x-common.c
+++ b/drivers/media/radio/si470x/radio-si470x-common.c
@@ -359,7 +359,7 @@ int si470x_start(struct si470x_device *radio)
 
 	/* sysconfig 2 */
 	radio->registers[SYSCONFIG2] =
-		(0x3f  << 8) |				/* SEEKTH */
+		(0x1f  << 8) |				/* SEEKTH */
 		((band  << 6) & SYSCONFIG2_BAND)  |	/* BAND */
 		((space << 4) & SYSCONFIG2_SPACE) |	/* SPACE */
 		15;					/* VOLUME (max) */
-- 
1.7.10.2


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

* [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-06-14 13:43 [PATCH 1/4] radio-si470x: Don't unnecesarily read registers on G_TUNER Hans de Goede
  2012-06-14 13:43 ` [PATCH 2/4] radio-si470x: Always use interrupt to wait for tune/seek completion Hans de Goede
  2012-06-14 13:43 ` [PATCH 3/4] radio-si470x: Lower hardware freq seek signal treshold Hans de Goede
@ 2012-06-14 13:43 ` Hans de Goede
  2012-07-04 15:23   ` Antti Palosaari
  2 siblings, 1 reply; 19+ messages in thread
From: Hans de Goede @ 2012-06-14 13:43 UTC (permalink / raw)
  To: Linux Media Mailing List; +Cc: hverkuil, Hans de Goede

With the changes from the previous patches device firmware version 14 +
usb microcontroller software version 1 works fine too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/media/radio/si470x/radio-si470x-usb.c |    2 +-
 drivers/media/radio/si470x/radio-si470x.h     |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c b/drivers/media/radio/si470x/radio-si470x-usb.c
index 66b1ba8..40b963c 100644
--- a/drivers/media/radio/si470x/radio-si470x-usb.c
+++ b/drivers/media/radio/si470x/radio-si470x-usb.c
@@ -143,7 +143,7 @@ MODULE_PARM_DESC(max_rds_errors, "RDS maximum block errors: *1*");
  * Software/Hardware Versions from Scratch Page
  **************************************************************************/
 #define RADIO_SW_VERSION_NOT_BOOTLOADABLE	6
-#define RADIO_SW_VERSION			7
+#define RADIO_SW_VERSION			1
 #define RADIO_HW_VERSION			1
 
 
diff --git a/drivers/media/radio/si470x/radio-si470x.h b/drivers/media/radio/si470x/radio-si470x.h
index fbf713d..b3b612f 100644
--- a/drivers/media/radio/si470x/radio-si470x.h
+++ b/drivers/media/radio/si470x/radio-si470x.h
@@ -189,7 +189,7 @@ struct si470x_device {
  * Firmware Versions
  **************************************************************************/
 
-#define RADIO_FW_VERSION	15
+#define RADIO_FW_VERSION	14
 
 
 
-- 
1.7.10.2


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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-06-14 13:43 ` [PATCH 4/4] radio-si470x: Lower firmware version requirements Hans de Goede
@ 2012-07-04 15:23   ` Antti Palosaari
  2012-07-05  8:33     ` Hans de Goede
  0 siblings, 1 reply; 19+ messages in thread
From: Antti Palosaari @ 2012-07-04 15:23 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Linux Media Mailing List, hverkuil

On 06/14/2012 04:43 PM, Hans de Goede wrote:
> With the changes from the previous patches device firmware version 14 +
> usb microcontroller software version 1 works fine too.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>   drivers/media/radio/si470x/radio-si470x-usb.c |    2 +-
>   drivers/media/radio/si470x/radio-si470x.h     |    2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c b/drivers/media/radio/si470x/radio-si470x-usb.c
> index 66b1ba8..40b963c 100644
> --- a/drivers/media/radio/si470x/radio-si470x-usb.c
> +++ b/drivers/media/radio/si470x/radio-si470x-usb.c
> @@ -143,7 +143,7 @@ MODULE_PARM_DESC(max_rds_errors, "RDS maximum block errors: *1*");
>    * Software/Hardware Versions from Scratch Page
>    **************************************************************************/
>   #define RADIO_SW_VERSION_NOT_BOOTLOADABLE	6
> -#define RADIO_SW_VERSION			7
> +#define RADIO_SW_VERSION			1
>   #define RADIO_HW_VERSION			1
>
>
> diff --git a/drivers/media/radio/si470x/radio-si470x.h b/drivers/media/radio/si470x/radio-si470x.h
> index fbf713d..b3b612f 100644
> --- a/drivers/media/radio/si470x/radio-si470x.h
> +++ b/drivers/media/radio/si470x/radio-si470x.h
> @@ -189,7 +189,7 @@ struct si470x_device {
>    * Firmware Versions
>    **************************************************************************/
>
> -#define RADIO_FW_VERSION	15
> +#define RADIO_FW_VERSION	14

I just found out this patch serie and tested it - but no luck. Could you 
say if I do something wrong or is it due to my device firmware version?

I compiled radio from http://git.linuxtv.org/xawtv3.git to tune and 
"arecord  -r96000 -c2 -f S16_LE | aplay - " to play sound. Just silent 
white noise is heard.

Jul  4 18:04:33 localhost kernel: [   78.006361] usb 5-2: new full-speed 
USB device number 2 using ohci_hcd
Jul  4 18:04:34 localhost kernel: [   78.165127] usb 5-2: New USB device 
found, idVendor=10c5, idProduct=819a
Jul  4 18:04:34 localhost kernel: [   78.165131] usb 5-2: New USB device 
strings: Mfr=1, Product=2, SerialNumber=0
Jul  4 18:04:34 localhost kernel: [   78.165133] usb 5-2: Manufacturer: 
www.rding.cn
Jul  4 18:04:34 localhost udevd[412]: specified group 'plugdev' unknown
Jul  4 18:04:34 localhost mtp-probe: checking bus 5, device 2: 
"/sys/devices/pci0000:00/0000:00:13.0/usb5/5-2"
Jul  4 18:04:34 localhost mtp-probe: bus: 5, device: 2 was not an MTP device
Jul  4 18:04:34 localhost kernel: [   78.189884] Linux media interface: 
v0.10
Jul  4 18:04:34 localhost kernel: [   78.191940] Linux video capture 
interface: v2.00
Jul  4 18:04:34 localhost kernel: [   78.194058] radio-si470x 5-2:1.2: 
DeviceID=0x1242 ChipID=0x060c
Jul  4 18:04:34 localhost kernel: [   78.194061] radio-si470x 5-2:1.2: 
This driver is known to work with firmware version 14,
Jul  4 18:04:34 localhost kernel: [   78.194062] radio-si470x 5-2:1.2: 
but the device has firmware version 12.
Jul  4 18:04:34 localhost kernel: [   78.196041] radio-si470x 5-2:1.2: 
software version 1, hardware version 7
Jul  4 18:04:34 localhost kernel: [   78.196043] radio-si470x 5-2:1.2: 
If you have some trouble using this driver,
Jul  4 18:04:34 localhost kernel: [   78.196045] radio-si470x 5-2:1.2: 
please report to V4L ML at linux-media@vger.kernel.org
Jul  4 18:04:34 localhost kernel: [   78.339041] usbcore: registered new 
interface driver radio-si470x
Jul  4 18:04:34 localhost kernel: [   78.357056] usbcore: registered new 
interface driver snd-usb-audio


And is there any cheap USB FM-radio device that is known to work on 
Linux ?  I would like to order one...

regards
Antti

-- 
http://palosaari.fi/



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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-04 15:23   ` Antti Palosaari
@ 2012-07-05  8:33     ` Hans de Goede
  2012-07-05 13:35       ` Antti Palosaari
  0 siblings, 1 reply; 19+ messages in thread
From: Hans de Goede @ 2012-07-05  8:33 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: Linux Media Mailing List, hverkuil

Hi,

On 07/04/2012 05:23 PM, Antti Palosaari wrote:
> On 06/14/2012 04:43 PM, Hans de Goede wrote:
>> With the changes from the previous patches device firmware version 14 +
>> usb microcontroller software version 1 works fine too.
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>>   drivers/media/radio/si470x/radio-si470x-usb.c |    2 +-
>>   drivers/media/radio/si470x/radio-si470x.h     |    2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c b/drivers/media/radio/si470x/radio-si470x-usb.c
>> index 66b1ba8..40b963c 100644
>> --- a/drivers/media/radio/si470x/radio-si470x-usb.c
>> +++ b/drivers/media/radio/si470x/radio-si470x-usb.c
>> @@ -143,7 +143,7 @@ MODULE_PARM_DESC(max_rds_errors, "RDS maximum block errors: *1*");
>>    * Software/Hardware Versions from Scratch Page
>>    **************************************************************************/
>>   #define RADIO_SW_VERSION_NOT_BOOTLOADABLE    6
>> -#define RADIO_SW_VERSION            7
>> +#define RADIO_SW_VERSION            1
>>   #define RADIO_HW_VERSION            1
>>
>>
>> diff --git a/drivers/media/radio/si470x/radio-si470x.h b/drivers/media/radio/si470x/radio-si470x.h
>> index fbf713d..b3b612f 100644
>> --- a/drivers/media/radio/si470x/radio-si470x.h
>> +++ b/drivers/media/radio/si470x/radio-si470x.h
>> @@ -189,7 +189,7 @@ struct si470x_device {
>>    * Firmware Versions
>>    **************************************************************************/
>>
>> -#define RADIO_FW_VERSION    15
>> +#define RADIO_FW_VERSION    14
>
> I just found out this patch serie and tested it - but no luck. Could you say if I do something wrong or is it due to my device firmware version?
>

I believe you're doing something wrong ...

> I compiled radio from http://git.linuxtv.org/xawtv3.git to tune and
 > "arecord  -r96000 -c2 -f S16_LE | aplay - " to play sound. Just silent white noise is heard.

You're not specifying which device arecord should record from so likely it is taking
the default input of your soundcard (line/mic in), rather then recording from the
radio device.

Note the latest radio from http://git.linuxtv.org/xawtv3.git will do the digital loopback of
the sound itself, so try things again with running arecord / aplay, if you then start radio
and exit again (so that you can see its startup messages) you should see something like this:

"Using alsa loopback: cap: hw:1,0 (/dev/radio0), out: default"

Note radio will automatically select the correct alsa device to record from for the radio-usb-stick.

> Jul  4 18:04:33 localhost kernel: [   78.006361] usb 5-2: new full-speed USB device number 2 using ohci_hcd
> Jul  4 18:04:34 localhost kernel: [   78.165127] usb 5-2: New USB device found, idVendor=10c5, idProduct=819a
> Jul  4 18:04:34 localhost kernel: [   78.165131] usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
> Jul  4 18:04:34 localhost kernel: [   78.165133] usb 5-2: Manufacturer: www.rding.cn
> Jul  4 18:04:34 localhost udevd[412]: specified group 'plugdev' unknown
> Jul  4 18:04:34 localhost mtp-probe: checking bus 5, device 2: "/sys/devices/pci0000:00/0000:00:13.0/usb5/5-2"
> Jul  4 18:04:34 localhost mtp-probe: bus: 5, device: 2 was not an MTP device
> Jul  4 18:04:34 localhost kernel: [   78.189884] Linux media interface: v0.10
> Jul  4 18:04:34 localhost kernel: [   78.191940] Linux video capture interface: v2.00
> Jul  4 18:04:34 localhost kernel: [   78.194058] radio-si470x 5-2:1.2: DeviceID=0x1242 ChipID=0x060c
> Jul  4 18:04:34 localhost kernel: [   78.194061] radio-si470x 5-2:1.2: This driver is known to work with firmware version 14,
> Jul  4 18:04:34 localhost kernel: [   78.194062] radio-si470x 5-2:1.2: but the device has firmware version 12.
> Jul  4 18:04:34 localhost kernel: [   78.196041] radio-si470x 5-2:1.2: software version 1, hardware version 7
> Jul  4 18:04:34 localhost kernel: [   78.196043] radio-si470x 5-2:1.2: If you have some trouble using this driver,
> Jul  4 18:04:34 localhost kernel: [   78.196045] radio-si470x 5-2:1.2: please report to V4L ML at linux-media@vger.kernel.org
> Jul  4 18:04:34 localhost kernel: [   78.339041] usbcore: registered new interface driver radio-si470x
> Jul  4 18:04:34 localhost kernel: [   78.357056] usbcore: registered new interface driver snd-usb-audio
>
>
> And is there any cheap USB FM-radio device that is known to work on Linux ?  I would like to order one...

I've done my testing with this device:
http://www.tinydeal.com/usb-pcear-radio-recorder-for-pc-p-8603.html

And that one works, but I think yours should work fine too.

Regards,

Hans

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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-05  8:33     ` Hans de Goede
@ 2012-07-05 13:35       ` Antti Palosaari
  2012-07-05 13:41         ` Hans de Goede
  0 siblings, 1 reply; 19+ messages in thread
From: Antti Palosaari @ 2012-07-05 13:35 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Linux Media Mailing List, hverkuil

On 07/05/2012 11:33 AM, Hans de Goede wrote:
> Hi,
>
> On 07/04/2012 05:23 PM, Antti Palosaari wrote:
>> On 06/14/2012 04:43 PM, Hans de Goede wrote:
>>> With the changes from the previous patches device firmware version 14 +
>>> usb microcontroller software version 1 works fine too.
>>>
>>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>>> ---
>>>   drivers/media/radio/si470x/radio-si470x-usb.c |    2 +-
>>>   drivers/media/radio/si470x/radio-si470x.h     |    2 +-
>>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/media/radio/si470x/radio-si470x-usb.c
>>> b/drivers/media/radio/si470x/radio-si470x-usb.c
>>> index 66b1ba8..40b963c 100644
>>> --- a/drivers/media/radio/si470x/radio-si470x-usb.c
>>> +++ b/drivers/media/radio/si470x/radio-si470x-usb.c
>>> @@ -143,7 +143,7 @@ MODULE_PARM_DESC(max_rds_errors, "RDS maximum
>>> block errors: *1*");
>>>    * Software/Hardware Versions from Scratch Page
>>>
>>> **************************************************************************/
>>>
>>>   #define RADIO_SW_VERSION_NOT_BOOTLOADABLE    6
>>> -#define RADIO_SW_VERSION            7
>>> +#define RADIO_SW_VERSION            1
>>>   #define RADIO_HW_VERSION            1
>>>
>>>
>>> diff --git a/drivers/media/radio/si470x/radio-si470x.h
>>> b/drivers/media/radio/si470x/radio-si470x.h
>>> index fbf713d..b3b612f 100644
>>> --- a/drivers/media/radio/si470x/radio-si470x.h
>>> +++ b/drivers/media/radio/si470x/radio-si470x.h
>>> @@ -189,7 +189,7 @@ struct si470x_device {
>>>    * Firmware Versions
>>>
>>> **************************************************************************/
>>>
>>>
>>> -#define RADIO_FW_VERSION    15
>>> +#define RADIO_FW_VERSION    14
>>
>> I just found out this patch serie and tested it - but no luck. Could
>> you say if I do something wrong or is it due to my device firmware
>> version?
>>
>
> I believe you're doing something wrong ...
>
>> I compiled radio from http://git.linuxtv.org/xawtv3.git to tune and
>  > "arecord  -r96000 -c2 -f S16_LE | aplay - " to play sound. Just
> silent white noise is heard.
>
> You're not specifying which device arecord should record from so likely
> it is taking
> the default input of your soundcard (line/mic in), rather then recording
> from the
> radio device.

I tried to define hw:1,0 etc. but only hw:0,0 exists.

> Note the latest radio from http://git.linuxtv.org/xawtv3.git will do the
> digital loopback of
> the sound itself, so try things again with running arecord / aplay, if
> you then start radio
> and exit again (so that you can see its startup messages) you should see
> something like this:
>
> "Using alsa loopback: cap: hw:1,0 (/dev/radio0), out: default"
>
> Note radio will automatically select the correct alsa device to record
> from for the radio-usb-stick.

For some reason I don't see that happening.

>> Jul  4 18:04:33 localhost kernel: [   78.006361] usb 5-2: new
>> full-speed USB device number 2 using ohci_hcd
>> Jul  4 18:04:34 localhost kernel: [   78.165127] usb 5-2: New USB
>> device found, idVendor=10c5, idProduct=819a
>> Jul  4 18:04:34 localhost kernel: [   78.165131] usb 5-2: New USB
>> device strings: Mfr=1, Product=2, SerialNumber=0
>> Jul  4 18:04:34 localhost kernel: [   78.165133] usb 5-2:
>> Manufacturer: www.rding.cn
>> Jul  4 18:04:34 localhost udevd[412]: specified group 'plugdev' unknown
>> Jul  4 18:04:34 localhost mtp-probe: checking bus 5, device 2:
>> "/sys/devices/pci0000:00/0000:00:13.0/usb5/5-2"
>> Jul  4 18:04:34 localhost mtp-probe: bus: 5, device: 2 was not an MTP
>> device
>> Jul  4 18:04:34 localhost kernel: [   78.189884] Linux media
>> interface: v0.10
>> Jul  4 18:04:34 localhost kernel: [   78.191940] Linux video capture
>> interface: v2.00
>> Jul  4 18:04:34 localhost kernel: [   78.194058] radio-si470x 5-2:1.2:
>> DeviceID=0x1242 ChipID=0x060c
>> Jul  4 18:04:34 localhost kernel: [   78.194061] radio-si470x 5-2:1.2:
>> This driver is known to work with firmware version 14,
>> Jul  4 18:04:34 localhost kernel: [   78.194062] radio-si470x 5-2:1.2:
>> but the device has firmware version 12.
>> Jul  4 18:04:34 localhost kernel: [   78.196041] radio-si470x 5-2:1.2:
>> software version 1, hardware version 7
>> Jul  4 18:04:34 localhost kernel: [   78.196043] radio-si470x 5-2:1.2:
>> If you have some trouble using this driver,
>> Jul  4 18:04:34 localhost kernel: [   78.196045] radio-si470x 5-2:1.2:
>> please report to V4L ML at linux-media@vger.kernel.org
>> Jul  4 18:04:34 localhost kernel: [   78.339041] usbcore: registered
>> new interface driver radio-si470x
>> Jul  4 18:04:34 localhost kernel: [   78.357056] usbcore: registered
>> new interface driver snd-usb-audio
>>
>>
>> And is there any cheap USB FM-radio device that is known to work on
>> Linux ?  I would like to order one...
>
> I've done my testing with this device:
> http://www.tinydeal.com/usb-pcear-radio-recorder-for-pc-p-8603.html
>
> And that one works, but I think yours should work fine too.

Mine device looks just similar. I have bought it maybe 3-4 years ago.

Could you check these logs:

last commit of xawtv3:

commit 2550984180f940c4379651245db468602cb38354
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Thu Jun 21 14:42:42 2012 +0200

     Don't call strdup on NULL

     This fixes radio / xawtv crashing when no associated alsa capture 
device can
     be found.

     Signed-off-by: Hans de Goede <hdegoede@redhat.com>
****************************************************

Jul  5 16:21:38 localhost kernel: [ 5932.284058] usb 5-2: new full-speed 
USB device number 2 using ohci_hcd
Jul  5 16:21:38 localhost kernel: [ 5932.442821] usb 5-2: New USB device 
found, idVendor=10c5, idProduct=819a
Jul  5 16:21:38 localhost kernel: [ 5932.442825] usb 5-2: New USB device 
strings: Mfr=1, Product=2, SerialNumber=0
Jul  5 16:21:38 localhost kernel: [ 5932.442827] usb 5-2: Manufacturer: 
www.rding.cn
Jul  5 16:21:38 localhost kernel: [ 5932.467874] Linux media interface: 
v0.10
Jul  5 16:21:38 localhost kernel: [ 5932.469898] Linux video capture 
interface: v2.00
Jul  5 16:21:38 localhost kernel: [ 5932.471732] radio-si470x 5-2:1.2: 
DeviceID=0x1242 ChipID=0x060c
Jul  5 16:21:38 localhost kernel: [ 5932.471736] radio-si470x 5-2:1.2: 
This driver is known to work with firmware version 15,
Jul  5 16:21:38 localhost kernel: [ 5932.471738] radio-si470x 5-2:1.2: 
but the device has firmware version 12.
Jul  5 16:21:38 localhost kernel: [ 5932.473736] radio-si470x 5-2:1.2: 
software version 1, hardware version 7
Jul  5 16:21:38 localhost kernel: [ 5932.473739] radio-si470x 5-2:1.2: 
This driver is known to work with software version 7,
Jul  5 16:21:38 localhost kernel: [ 5932.473741] radio-si470x 5-2:1.2: 
but the device has software version 1.
Jul  5 16:21:38 localhost kernel: [ 5932.473743] radio-si470x 5-2:1.2: 
If you have some trouble using this driver,
Jul  5 16:21:38 localhost kernel: [ 5932.473744] radio-si470x 5-2:1.2: 
please report to V4L ML at linux-media@vger.kernel.org
Jul  5 16:21:38 localhost kernel: [ 5932.561895] usbcore: registered new 
interface driver radio-si470x
Jul  5 16:21:38 localhost kernel: [ 5932.579893] usbcore: registered new 
interface driver snd-usb-audio


[crope@localhost console]$ ./radio -f 90.4
Tuning to 90.40 MHz
[crope@localhost console]$

****************************************************
install 4 new radio-si470x patches
****************************************************

Jul  5 16:29:36 localhost kernel: [ 6409.204169] usb 5-2: new full-speed 
USB device number 5 using ohci_hcd
Jul  5 16:29:36 localhost kernel: [ 6409.362926] usb 5-2: New USB device 
found, idVendor=10c5, idProduct=819a
Jul  5 16:29:36 localhost kernel: [ 6409.362930] usb 5-2: New USB device 
strings: Mfr=1, Product=2, SerialNumber=0
Jul  5 16:29:36 localhost kernel: [ 6409.362932] usb 5-2: Manufacturer: 
www.rding.cn
Jul  5 16:29:36 localhost kernel: [ 6409.375781] Linux media interface: 
v0.10
Jul  5 16:29:36 localhost kernel: [ 6409.378671] Linux video capture 
interface: v2.00
Jul  5 16:29:36 localhost kernel: [ 6409.396168] usbcore: registered new 
interface driver snd-usb-audio
Jul  5 16:29:36 localhost kernel: [ 6409.397822] radio-si470x 5-2:1.2: 
DeviceID=0x1242 ChipID=0x060c
Jul  5 16:29:36 localhost kernel: [ 6409.397825] radio-si470x 5-2:1.2: 
This driver is known to work with firmware version 14,
Jul  5 16:29:36 localhost kernel: [ 6409.397827] radio-si470x 5-2:1.2: 
but the device has firmware version 12.
Jul  5 16:29:36 localhost kernel: [ 6409.399829] radio-si470x 5-2:1.2: 
software version 1, hardware version 7
Jul  5 16:29:36 localhost kernel: [ 6409.399832] radio-si470x 5-2:1.2: 
If you have some trouble using this driver,
Jul  5 16:29:36 localhost kernel: [ 6409.399834] radio-si470x 5-2:1.2: 
please report to V4L ML at linux-media@vger.kernel.org
Jul  5 16:29:36 localhost kernel: [ 6409.515805] usbcore: registered new 
interface driver radio-si470x

[crope@localhost console]$ ./radio -f 90.4
Tuning to 90.40 MHz
[crope@localhost console]$


If I am not able to get FM-radio working I could guess how hard it is 
for "normal" user :]


regards
Antti

-- 
http://palosaari.fi/



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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-05 13:35       ` Antti Palosaari
@ 2012-07-05 13:41         ` Hans de Goede
  2012-07-05 14:13           ` Antti Palosaari
  0 siblings, 1 reply; 19+ messages in thread
From: Hans de Goede @ 2012-07-05 13:41 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: Linux Media Mailing List, hverkuil

Hi,

On 07/05/2012 03:35 PM, Antti Palosaari wrote:

<snip>

>> I believe you're doing something wrong ...
>>
>>> I compiled radio from http://git.linuxtv.org/xawtv3.git to tune and
>>  > "arecord  -r96000 -c2 -f S16_LE | aplay - " to play sound. Just
>> silent white noise is heard.
>>
>> You're not specifying which device arecord should record from so likely
>> it is taking
>> the default input of your soundcard (line/mic in), rather then recording
>> from the
>> radio device.
>
> I tried to define hw:1,0 etc. but only hw:0,0 exists.
>
>> Note the latest radio from http://git.linuxtv.org/xawtv3.git will do the
>> digital loopback of
>> the sound itself, so try things again with running arecord / aplay, if
>> you then start radio
>> and exit again (so that you can see its startup messages) you should see
>> something like this:
>>
>> "Using alsa loopback: cap: hw:1,0 (/dev/radio0), out: default"
>>
>> Note radio will automatically select the correct alsa device to record
>> from for the radio-usb-stick.
>
> For some reason I don't see that happening.

Hmm, so it seems that for some reason alsa is not working with the usb
"sound-card" part of the usb-stick. Can you try doing:

ls /dev/snd/

Before and after plugging in the device, you should get a new
PCMC?D0c device there.

Otherwise see if you can enable some debugging options for snd-usb-audio
and find out why it is not liking your device (and maybe at a quirk for
it somewhere) ? If you do end up adding a quirk please let me know
and I'll test with mine to ensure the quirck does not break working versions :)

Regards,

Hans


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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-05 13:41         ` Hans de Goede
@ 2012-07-05 14:13           ` Antti Palosaari
  2012-07-05 15:08             ` Hans de Goede
  0 siblings, 1 reply; 19+ messages in thread
From: Antti Palosaari @ 2012-07-05 14:13 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Linux Media Mailing List, hverkuil

On 07/05/2012 04:41 PM, Hans de Goede wrote:
> Hi,
>
> On 07/05/2012 03:35 PM, Antti Palosaari wrote:
>
> <snip>
>
>>> I believe you're doing something wrong ...
>>>
>>>> I compiled radio from http://git.linuxtv.org/xawtv3.git to tune and
>>>  > "arecord  -r96000 -c2 -f S16_LE | aplay - " to play sound. Just
>>> silent white noise is heard.
>>>
>>> You're not specifying which device arecord should record from so likely
>>> it is taking
>>> the default input of your soundcard (line/mic in), rather then recording
>>> from the
>>> radio device.
>>
>> I tried to define hw:1,0 etc. but only hw:0,0 exists.
>>
>>> Note the latest radio from http://git.linuxtv.org/xawtv3.git will do the
>>> digital loopback of
>>> the sound itself, so try things again with running arecord / aplay, if
>>> you then start radio
>>> and exit again (so that you can see its startup messages) you should see
>>> something like this:
>>>
>>> "Using alsa loopback: cap: hw:1,0 (/dev/radio0), out: default"
>>>
>>> Note radio will automatically select the correct alsa device to record
>>> from for the radio-usb-stick.
>>
>> For some reason I don't see that happening.
>
> Hmm, so it seems that for some reason alsa is not working with the usb
> "sound-card" part of the usb-stick. Can you try doing:
>
> ls /dev/snd/
>
> Before and after plugging in the device, you should get a new
> PCMC?D0c device there.

Two files appears, controlC2 and pcmC2D0c.

> Otherwise see if you can enable some debugging options for snd-usb-audio
> and find out why it is not liking your device (and maybe at a quirk for
> it somewhere) ? If you do end up adding a quirk please let me know
> and I'll test with mine to ensure the quirck does not break working
> versions :)

And now I can hear the voice too using "arecord -D hw:2,0 -r96000 -c2 -f 
S16_LE | aplay -".

But loopback is still missing.

regards
Antti

-- 
http://palosaari.fi/



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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-05 14:13           ` Antti Palosaari
@ 2012-07-05 15:08             ` Hans de Goede
  2012-07-05 15:09               ` Antti Palosaari
  2012-07-07  7:58               ` Hans de Goede
  0 siblings, 2 replies; 19+ messages in thread
From: Hans de Goede @ 2012-07-05 15:08 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: Linux Media Mailing List, hverkuil

Hi,

On 07/05/2012 04:13 PM, Antti Palosaari wrote:
> On 07/05/2012 04:41 PM, Hans de Goede wrote:
>> Hi,
>>
>> On 07/05/2012 03:35 PM, Antti Palosaari wrote:
>>
>> <snip>
>>
>>>> I believe you're doing something wrong ...
>>>>
>>>>> I compiled radio from http://git.linuxtv.org/xawtv3.git to tune and
>>>>  > "arecord  -r96000 -c2 -f S16_LE | aplay - " to play sound. Just
>>>> silent white noise is heard.
>>>>
>>>> You're not specifying which device arecord should record from so likely
>>>> it is taking
>>>> the default input of your soundcard (line/mic in), rather then recording
>>>> from the
>>>> radio device.
>>>
>>> I tried to define hw:1,0 etc. but only hw:0,0 exists.
>>>
>>>> Note the latest radio from http://git.linuxtv.org/xawtv3.git will do the
>>>> digital loopback of
>>>> the sound itself, so try things again with running arecord / aplay, if
>>>> you then start radio
>>>> and exit again (so that you can see its startup messages) you should see
>>>> something like this:
>>>>
>>>> "Using alsa loopback: cap: hw:1,0 (/dev/radio0), out: default"
>>>>
>>>> Note radio will automatically select the correct alsa device to record
>>>> from for the radio-usb-stick.
>>>
>>> For some reason I don't see that happening.
>>
>> Hmm, so it seems that for some reason alsa is not working with the usb
>> "sound-card" part of the usb-stick. Can you try doing:
>>
>> ls /dev/snd/
>>
>> Before and after plugging in the device, you should get a new
>> PCMC?D0c device there.
>
> Two files appears, controlC2 and pcmC2D0c.
>
>> Otherwise see if you can enable some debugging options for snd-usb-audio
>> and find out why it is not liking your device (and maybe at a quirk for
>> it somewhere) ? If you do end up adding a quirk please let me know
>> and I'll test with mine to ensure the quirck does not break working
>> versions :)
>
> And now I can hear the voice too using "arecord -D hw:2,0 -r96000 -c2 -f S16_LE | aplay -".
 >
 > But loopback is still missing.

So if you start radio before starting the arecord, it won't do the loopback for you?
Have you compiled xawtv with alsa support? (this requires the libalsa headers to be installed)

Regards,

Hans

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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-05 15:08             ` Hans de Goede
@ 2012-07-05 15:09               ` Antti Palosaari
  2012-07-07  7:58               ` Hans de Goede
  1 sibling, 0 replies; 19+ messages in thread
From: Antti Palosaari @ 2012-07-05 15:09 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Linux Media Mailing List, hverkuil

On 07/05/2012 06:08 PM, Hans de Goede wrote:
> Hi,
>
> On 07/05/2012 04:13 PM, Antti Palosaari wrote:
>> On 07/05/2012 04:41 PM, Hans de Goede wrote:
>>> Hi,
>>>
>>> On 07/05/2012 03:35 PM, Antti Palosaari wrote:
>>>
>>> <snip>
>>>
>>>>> I believe you're doing something wrong ...
>>>>>
>>>>>> I compiled radio from http://git.linuxtv.org/xawtv3.git to tune and
>>>>>  > "arecord  -r96000 -c2 -f S16_LE | aplay - " to play sound. Just
>>>>> silent white noise is heard.
>>>>>
>>>>> You're not specifying which device arecord should record from so
>>>>> likely
>>>>> it is taking
>>>>> the default input of your soundcard (line/mic in), rather then
>>>>> recording
>>>>> from the
>>>>> radio device.
>>>>
>>>> I tried to define hw:1,0 etc. but only hw:0,0 exists.
>>>>
>>>>> Note the latest radio from http://git.linuxtv.org/xawtv3.git will
>>>>> do the
>>>>> digital loopback of
>>>>> the sound itself, so try things again with running arecord / aplay, if
>>>>> you then start radio
>>>>> and exit again (so that you can see its startup messages) you
>>>>> should see
>>>>> something like this:
>>>>>
>>>>> "Using alsa loopback: cap: hw:1,0 (/dev/radio0), out: default"
>>>>>
>>>>> Note radio will automatically select the correct alsa device to record
>>>>> from for the radio-usb-stick.
>>>>
>>>> For some reason I don't see that happening.
>>>
>>> Hmm, so it seems that for some reason alsa is not working with the usb
>>> "sound-card" part of the usb-stick. Can you try doing:
>>>
>>> ls /dev/snd/
>>>
>>> Before and after plugging in the device, you should get a new
>>> PCMC?D0c device there.
>>
>> Two files appears, controlC2 and pcmC2D0c.
>>
>>> Otherwise see if you can enable some debugging options for snd-usb-audio
>>> and find out why it is not liking your device (and maybe at a quirk for
>>> it somewhere) ? If you do end up adding a quirk please let me know
>>> and I'll test with mine to ensure the quirck does not break working
>>> versions :)
>>
>> And now I can hear the voice too using "arecord -D hw:2,0 -r96000 -c2
>> -f S16_LE | aplay -".
>  >
>  > But loopback is still missing.
>
> So if you start radio before starting the arecord, it won't do the
> loopback for you?
> Have you compiled xawtv with alsa support? (this requires the libalsa
> headers to be installed)

aah, that explains.

compile time options summary
============================

     aalib        : no
     alsa         : no
     dv           : no
     QuickTime    : no
     OpenMotif    : no
     X11R6        : no
     OpenGL       : no
     zvbi         : no
     libv4l       : yes
     libexplain   : no

regards
Antti

-- 
http://palosaari.fi/



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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-05 15:08             ` Hans de Goede
  2012-07-05 15:09               ` Antti Palosaari
@ 2012-07-07  7:58               ` Hans de Goede
  2012-07-07  9:00                 ` Antti Palosaari
  1 sibling, 1 reply; 19+ messages in thread
From: Hans de Goede @ 2012-07-07  7:58 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: Linux Media Mailing List, hverkuil

Hi,

So is your device working properly now? The reason I'm asking it
because it is still causing a firmware version warning, and if
it works fine I would like to lower the firmware version warning
point, so that the warning goes away.

Regards,

Hans

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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-07  7:58               ` Hans de Goede
@ 2012-07-07  9:00                 ` Antti Palosaari
  2012-07-07 18:53                   ` Hans de Goede
  0 siblings, 1 reply; 19+ messages in thread
From: Antti Palosaari @ 2012-07-07  9:00 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Linux Media Mailing List, hverkuil

Hello Hans,

On 07/07/2012 10:58 AM, Hans de Goede wrote:
> So is your device working properly now? The reason I'm asking it
> because it is still causing a firmware version warning, and if
> it works fine I would like to lower the firmware version warning
> point, so that the warning goes away.

I don't know what is definition of properly in that case.

Problem is that when I use radio application from xawtv3 with that new 
loopback I hear very often cracks and following errors are printed to 
the radio screen:
ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred
or
ALSA lib pcm.c:7339:(snd_pcm_recover) overrun occurred

Looks like those does not appear, at least it does not crack so often 
nor errors seen, when I use Rhythmbox to tune and "arecord -D hw:2,0 
-r96000 -c2 -f S16_LE | aplay -" to listen.

I can guess those are not firmware related so warning texts could be 
removed.


Installing alsa-lib-devel and libXt-devel were needed for compiling alsa 
support.

common/midictrl.c:9:27: fatal error: X11/Intrinsic.h: No such file or 
directory
compilation terminated.
make: *** [common/midictrl.o] Error 1

[crope@localhost xawtv3]$ ./console/radio
Using alsa loopback: cap: hw:2,0 (/dev/radio0), out: default


regards
Antti

-- 
http://palosaari.fi/



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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-07  9:00                 ` Antti Palosaari
@ 2012-07-07 18:53                   ` Hans de Goede
  2012-07-09  9:17                     ` Antti Palosaari
  0 siblings, 1 reply; 19+ messages in thread
From: Hans de Goede @ 2012-07-07 18:53 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: Linux Media Mailing List, hverkuil

Hi,

On 07/07/2012 11:00 AM, Antti Palosaari wrote:
> Hello Hans,
>
> On 07/07/2012 10:58 AM, Hans de Goede wrote:
>> So is your device working properly now? The reason I'm asking it
>> because it is still causing a firmware version warning, and if
>> it works fine I would like to lower the firmware version warning
>> point, so that the warning goes away.
>
> I don't know what is definition of properly in that case.
>
> Problem is that when I use radio application from xawtv3 with that new loopback I hear very often cracks and following errors are printed to the radio screen:
> ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred
> or
> ALSA lib pcm.c:7339:(snd_pcm_recover) overrun occurred
>
> Looks like those does not appear, at least it does not crack so often nor errors seen, when I use Rhythmbox to tune and "arecord -D hw:2,0 -r96000 -c2 -f S16_LE | aplay -" to listen.
 >
> I can guess those are not firmware related so warning texts could be removed.

Actually they may very well be firmware related. At least with my firmware there
is a bug where actively asking the device for its register contents, it lets
its audio stream drop.

My patches fix this by waiting for the device to volunteer it register contents
through its usb interrupt in endpoint, which it does at xx times / sec.

So the first question would be, does this dropping of sound happen approx 1 / sec
when using radio?

If so this is caused by radio upating the signal strength it displays 1 / sec. If
you look at radio.c line 981 you will see a radio_getsignal_n_stereo(fd); call
there in the main loop which gets called 1/sec. Try commenting this out.

If commenting this out fixes your sound issues with radio, then the next
question is are you using my 4 recent si470x patches, if not please
give them a try. If you are already using them then I'm afraid that your older
firmware may be broken even more then my also not so new firmware.

Regards,

Hans

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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-07 18:53                   ` Hans de Goede
@ 2012-07-09  9:17                     ` Antti Palosaari
  2012-07-09 10:03                       ` Hans de Goede
  0 siblings, 1 reply; 19+ messages in thread
From: Antti Palosaari @ 2012-07-09  9:17 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Linux Media Mailing List, hverkuil

On 07/07/2012 09:53 PM, Hans de Goede wrote:
> Hi,
>
> On 07/07/2012 11:00 AM, Antti Palosaari wrote:
>> Hello Hans,
>>
>> On 07/07/2012 10:58 AM, Hans de Goede wrote:
>>> So is your device working properly now? The reason I'm asking it
>>> because it is still causing a firmware version warning, and if
>>> it works fine I would like to lower the firmware version warning
>>> point, so that the warning goes away.
>>
>> I don't know what is definition of properly in that case.
>>
>> Problem is that when I use radio application from xawtv3 with that new
>> loopback I hear very often cracks and following errors are printed to
>> the radio screen:
>> ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred
>> or
>> ALSA lib pcm.c:7339:(snd_pcm_recover) overrun occurred
>>
>> Looks like those does not appear, at least it does not crack so often
>> nor errors seen, when I use Rhythmbox to tune and "arecord -D hw:2,0
>> -r96000 -c2 -f S16_LE | aplay -" to listen.
>  >
>> I can guess those are not firmware related so warning texts could be
>> removed.
>
> Actually they may very well be firmware related. At least with my
> firmware there
> is a bug where actively asking the device for its register contents, it
> lets
> its audio stream drop.
>
> My patches fix this by waiting for the device to volunteer it register
> contents
> through its usb interrupt in endpoint, which it does at xx times / sec.
>
> So the first question would be, does this dropping of sound happen
> approx 1 / sec
> when using radio?
>
> If so this is caused by radio upating the signal strength it displays 1
> / sec. If
> you look at radio.c line 981 you will see a
> radio_getsignal_n_stereo(fd); call
> there in the main loop which gets called 1/sec. Try commenting this out.
>
> If commenting this out fixes your sound issues with radio, then the next
> question is are you using my 4 recent si470x patches, if not please
> give them a try. If you are already using them then I'm afraid that your
> older
> firmware may be broken even more then my also not so new firmware.

I suspect these signal strength update pops are different thing. Those 
are almost so minor you cannot even hear.

I recorded small sample:
http://palosaari.fi/linux/v4l-dvb/xawtv3_radio.m4v

And I am almost 100% sure those cracks are coming ALSA underrun/overrun 
as error text is seen just same time when crack happens.

Commenting out line did not help. But I think I was also hearing those 
small pops too and likely new four patches fixes those - but it is hard 
to say because it cracks audio all time.

regards
Antti

-- 
http://palosaari.fi/



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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-09  9:17                     ` Antti Palosaari
@ 2012-07-09 10:03                       ` Hans de Goede
  2012-07-09 11:58                         ` Antti Palosaari
  0 siblings, 1 reply; 19+ messages in thread
From: Hans de Goede @ 2012-07-09 10:03 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: Linux Media Mailing List, hverkuil

Hi,

On 07/09/2012 11:17 AM, Antti Palosaari wrote:
> On 07/07/2012 09:53 PM, Hans de Goede wrote:
>> Hi,
>>
>> On 07/07/2012 11:00 AM, Antti Palosaari wrote:
>>> Hello Hans,
>>>
>>> On 07/07/2012 10:58 AM, Hans de Goede wrote:
>>>> So is your device working properly now? The reason I'm asking it
>>>> because it is still causing a firmware version warning, and if
>>>> it works fine I would like to lower the firmware version warning
>>>> point, so that the warning goes away.
>>>
>>> I don't know what is definition of properly in that case.
>>>
>>> Problem is that when I use radio application from xawtv3 with that new
>>> loopback I hear very often cracks and following errors are printed to
>>> the radio screen:
>>> ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred
>>> or
>>> ALSA lib pcm.c:7339:(snd_pcm_recover) overrun occurred
>>>
>>> Looks like those does not appear, at least it does not crack so often
>>> nor errors seen, when I use Rhythmbox to tune and "arecord -D hw:2,0
>>> -r96000 -c2 -f S16_LE | aplay -" to listen.
>>  >
>>> I can guess those are not firmware related so warning texts could be
>>> removed.
>>
>> Actually they may very well be firmware related. At least with my
>> firmware there
>> is a bug where actively asking the device for its register contents, it
>> lets
>> its audio stream drop.
>>
>> My patches fix this by waiting for the device to volunteer it register
>> contents
>> through its usb interrupt in endpoint, which it does at xx times / sec.
>>
>> So the first question would be, does this dropping of sound happen
>> approx 1 / sec
>> when using radio?
>>
>> If so this is caused by radio upating the signal strength it displays 1
>> / sec. If
>> you look at radio.c line 981 you will see a
>> radio_getsignal_n_stereo(fd); call
>> there in the main loop which gets called 1/sec. Try commenting this out.
>>
>> If commenting this out fixes your sound issues with radio, then the next
>> question is are you using my 4 recent si470x patches, if not please
>> give them a try. If you are already using them then I'm afraid that your
>> older
>> firmware may be broken even more then my also not so new firmware.
>
> I suspect these signal strength update pops are different thing. Those are almost so minor you cannot even hear.
>
> I recorded small sample:
> http://palosaari.fi/linux/v4l-dvb/xawtv3_radio.m4v
>
> And I am almost 100% sure those cracks are coming ALSA underrun/overrun as error text is seen just same time when crack happens.

The signal updates are what is causing the ALSA under-runs (*), the over-runs are the result of "catching up" after a under-run.

*) Or at least an important cause of them

> Commenting out line did not help.

Are you sure about this? Did you do a make after commenting, are you sure you were using the new build to test?

> But I think I was also hearing those small pops too and likely new four patches fixes those  - but it is hard to say because it cracks audio all time.

One other thing you can try is increasing the buffer size, using:
radio -L 1000

For example will increase it from the 500 millisecs default to 1 second

Regards,

Hans

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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-09 10:03                       ` Hans de Goede
@ 2012-07-09 11:58                         ` Antti Palosaari
  2012-07-09 13:02                           ` Hans de Goede
  0 siblings, 1 reply; 19+ messages in thread
From: Antti Palosaari @ 2012-07-09 11:58 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Linux Media Mailing List, hverkuil

On 07/09/2012 01:03 PM, Hans de Goede wrote:
> Hi,
>
> On 07/09/2012 11:17 AM, Antti Palosaari wrote:
>> On 07/07/2012 09:53 PM, Hans de Goede wrote:
>>> Hi,
>>>
>>> On 07/07/2012 11:00 AM, Antti Palosaari wrote:
>>>> Hello Hans,
>>>>
>>>> On 07/07/2012 10:58 AM, Hans de Goede wrote:
>>>>> So is your device working properly now? The reason I'm asking it
>>>>> because it is still causing a firmware version warning, and if
>>>>> it works fine I would like to lower the firmware version warning
>>>>> point, so that the warning goes away.
>>>>
>>>> I don't know what is definition of properly in that case.
>>>>
>>>> Problem is that when I use radio application from xawtv3 with that new
>>>> loopback I hear very often cracks and following errors are printed to
>>>> the radio screen:
>>>> ALSA lib pcm.c:7339:(snd_pcm_recover) underrun occurred
>>>> or
>>>> ALSA lib pcm.c:7339:(snd_pcm_recover) overrun occurred
>>>>
>>>> Looks like those does not appear, at least it does not crack so often
>>>> nor errors seen, when I use Rhythmbox to tune and "arecord -D hw:2,0
>>>> -r96000 -c2 -f S16_LE | aplay -" to listen.
>>>  >
>>>> I can guess those are not firmware related so warning texts could be
>>>> removed.
>>>
>>> Actually they may very well be firmware related. At least with my
>>> firmware there
>>> is a bug where actively asking the device for its register contents, it
>>> lets
>>> its audio stream drop.
>>>
>>> My patches fix this by waiting for the device to volunteer it register
>>> contents
>>> through its usb interrupt in endpoint, which it does at xx times / sec.
>>>
>>> So the first question would be, does this dropping of sound happen
>>> approx 1 / sec
>>> when using radio?
>>>
>>> If so this is caused by radio upating the signal strength it displays 1
>>> / sec. If
>>> you look at radio.c line 981 you will see a
>>> radio_getsignal_n_stereo(fd); call
>>> there in the main loop which gets called 1/sec. Try commenting this out.
>>>
>>> If commenting this out fixes your sound issues with radio, then the next
>>> question is are you using my 4 recent si470x patches, if not please
>>> give them a try. If you are already using them then I'm afraid that your
>>> older
>>> firmware may be broken even more then my also not so new firmware.
>>
>> I suspect these signal strength update pops are different thing. Those
>> are almost so minor you cannot even hear.
>>
>> I recorded small sample:
>> http://palosaari.fi/linux/v4l-dvb/xawtv3_radio.m4v
>>
>> And I am almost 100% sure those cracks are coming ALSA
>> underrun/overrun as error text is seen just same time when crack happens.
>
> The signal updates are what is causing the ALSA under-runs (*), the
> over-runs are the result of "catching up" after a under-run.
>
> *) Or at least an important cause of them
>
>> Commenting out line did not help.
>
> Are you sure about this? Did you do a make after commenting, are you
> sure you were using the new build to test?

Yes I ran make and new radio bin was generated. And when I make build 
error as a test build fails so it is compiling.

>> But I think I was also hearing those small pops too and likely new
>> four patches fixes those  - but it is hard to say because it cracks
>> audio all time.
>
> One other thing you can try is increasing the buffer size, using:
> radio -L 1000
>
> For example will increase it from the 500 millisecs default to 1 second

If I tune using old radio it works. If I tune using latest radio but 
with option -l 0 (./console/radio -l 0) it also works. Using "arecord -D 
hw:2,0 -r96000 -c2 -f S16_LE | aplay -" to listen. So it seems that 
latest radio with alsa loopback is only having those problems.


These are the patches:
radio-si470x: Don't unnecesarily read registers on G_TUNER
radio-si470x: Lower hardware freq seek signal treshold
radio-si470x: Always use interrupt to wait for tune/seek completion
radio-si470x: Lower firmware version requirements

And from that I can see it loads new driver as it does not warn about 
software version - only firmware.
Jul  9 14:28:29 localhost kernel: [13403.017920] Linux media interface: 
v0.10
Jul  9 14:28:29 localhost kernel: [13403.020866] Linux video capture 
interface: v2.00
Jul  9 14:28:29 localhost kernel: [13403.022744] radio-si470x 5-2:1.2: 
DeviceID=0x1242 ChipID=0x060c
Jul  9 14:28:29 localhost kernel: [13403.022747] radio-si470x 5-2:1.2: 
This driver is known to work with firmware version 14,
Jul  9 14:28:29 localhost kernel: [13403.022749] radio-si470x 5-2:1.2: 
but the device has firmware version 12.
Jul  9 14:28:29 localhost kernel: [13403.024715] radio-si470x 5-2:1.2: 
software version 1, hardware version 7
Jul  9 14:28:29 localhost kernel: [13403.024717] radio-si470x 5-2:1.2: 
If you have some trouble using this driver,
Jul  9 14:28:29 localhost kernel: [13403.024719] radio-si470x 5-2:1.2: 
please report to V4L ML at linux-media@vger.kernel.org
Jul  9 14:28:29 localhost kernel: [13403.114583] usbcore: registered new 
interface driver radio-si470x

regards
Antti


-- 
http://palosaari.fi/



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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-09 11:58                         ` Antti Palosaari
@ 2012-07-09 13:02                           ` Hans de Goede
  2012-07-09 13:34                             ` Antti Palosaari
  0 siblings, 1 reply; 19+ messages in thread
From: Hans de Goede @ 2012-07-09 13:02 UTC (permalink / raw)
  To: Antti Palosaari; +Cc: Linux Media Mailing List, hverkuil

Hi,

On 07/09/2012 01:58 PM, Antti Palosaari wrote:
> On 07/09/2012 01:03 PM, Hans de Goede wrote:
> If I tune using old radio it works. If I tune using latest radio but with option -l 0 (./console/radio -l 0) it also works. Using "arecord -D hw:2,0 -r96000 -c2 -f S16_LE | aplay -" to listen. So it seems that latest radio with alsa loopback is only having those problems.
>

Ok.
>
> These are the patches:
> radio-si470x: Don't unnecesarily read registers on G_TUNER
> radio-si470x: Lower hardware freq seek signal treshold
> radio-si470x: Always use interrupt to wait for tune/seek completion
> radio-si470x: Lower firmware version requirements
>
> And from that I can see it loads new driver as it does not warn about software version - only firmware.

Right, so what I want to do is to lower the firmware requirement to 12, so that it won't complain
for your device since that seems to be working fine. Does that sound like a good idea to you?

> Jul  9 14:28:29 localhost kernel: [13403.017920] Linux media interface: v0.10
> Jul  9 14:28:29 localhost kernel: [13403.020866] Linux video capture interface: v2.00
> Jul  9 14:28:29 localhost kernel: [13403.022744] radio-si470x 5-2:1.2: DeviceID=0x1242 ChipID=0x060c
> Jul  9 14:28:29 localhost kernel: [13403.022747] radio-si470x 5-2:1.2: This driver is known to work with firmware version 14,
> Jul  9 14:28:29 localhost kernel: [13403.022749] radio-si470x 5-2:1.2: but the device has firmware version 12.
> Jul  9 14:28:29 localhost kernel: [13403.024715] radio-si470x 5-2:1.2: software version 1, hardware version 7
> Jul  9 14:28:29 localhost kernel: [13403.024717] radio-si470x 5-2:1.2: If you have some trouble using this driver,
> Jul  9 14:28:29 localhost kernel: [13403.024719] radio-si470x 5-2:1.2: please report to V4L ML at linux-media@vger.kernel.org
> Jul  9 14:28:29 localhost kernel: [13403.114583] usbcore: registered new interface driver radio-si470x

Regards,

Hans

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

* Re: [PATCH 4/4] radio-si470x: Lower firmware version requirements
  2012-07-09 13:02                           ` Hans de Goede
@ 2012-07-09 13:34                             ` Antti Palosaari
  0 siblings, 0 replies; 19+ messages in thread
From: Antti Palosaari @ 2012-07-09 13:34 UTC (permalink / raw)
  To: Hans de Goede; +Cc: Linux Media Mailing List, hverkuil

Hello

On 07/09/2012 04:02 PM, Hans de Goede wrote:
> On 07/09/2012 01:58 PM, Antti Palosaari wrote:
>> On 07/09/2012 01:03 PM, Hans de Goede wrote:
>> If I tune using old radio it works. If I tune using latest radio but
>> with option -l 0 (./console/radio -l 0) it also works. Using "arecord
>> -D hw:2,0 -r96000 -c2 -f S16_LE | aplay -" to listen. So it seems that
>> latest radio with alsa loopback is only having those problems.
>>
>
> Ok.
>>
>> These are the patches:
>> radio-si470x: Don't unnecesarily read registers on G_TUNER
>> radio-si470x: Lower hardware freq seek signal treshold
>> radio-si470x: Always use interrupt to wait for tune/seek completion
>> radio-si470x: Lower firmware version requirements
>>
>> And from that I can see it loads new driver as it does not warn about
>> software version - only firmware.
>
> Right, so what I want to do is to lower the firmware requirement to 12,
> so that it won't complain
> for your device since that seems to be working fine. Does that sound
> like a good idea to you?

Yes, indeed lower it to the 12 as it works to get rid of those warnings. 
It still cracks but rarely, once per 2 mins or so when using arecord + 
aplay.


The whole journey of playing that device was idea to learn V4L2 radio 
API as I was planning to add SDR functionality. Anyhow, I am a little 
bit disappointed because that radio uses snd-usb-audio module for audio. 
Do you know any cheap usb radio which uses vendor specific USB 
interface, not standard profiles?


regards
Antti


-- 
http://palosaari.fi/



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

end of thread, other threads:[~2012-07-09 13:34 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-14 13:43 [PATCH 1/4] radio-si470x: Don't unnecesarily read registers on G_TUNER Hans de Goede
2012-06-14 13:43 ` [PATCH 2/4] radio-si470x: Always use interrupt to wait for tune/seek completion Hans de Goede
2012-06-14 13:43 ` [PATCH 3/4] radio-si470x: Lower hardware freq seek signal treshold Hans de Goede
2012-06-14 13:43 ` [PATCH 4/4] radio-si470x: Lower firmware version requirements Hans de Goede
2012-07-04 15:23   ` Antti Palosaari
2012-07-05  8:33     ` Hans de Goede
2012-07-05 13:35       ` Antti Palosaari
2012-07-05 13:41         ` Hans de Goede
2012-07-05 14:13           ` Antti Palosaari
2012-07-05 15:08             ` Hans de Goede
2012-07-05 15:09               ` Antti Palosaari
2012-07-07  7:58               ` Hans de Goede
2012-07-07  9:00                 ` Antti Palosaari
2012-07-07 18:53                   ` Hans de Goede
2012-07-09  9:17                     ` Antti Palosaari
2012-07-09 10:03                       ` Hans de Goede
2012-07-09 11:58                         ` Antti Palosaari
2012-07-09 13:02                           ` Hans de Goede
2012-07-09 13:34                             ` Antti Palosaari

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.