Re: [PATCH 3/4] airspy: print notice to point SDR API is not 100% stable yet

2014-07-18 Thread Antti Palosaari

Moikka!

On 07/18/2014 08:15 AM, Hans Verkuil wrote:

On 07/18/2014 03:05 AM, Antti Palosaari wrote:

Print notice on driver load: SDR API is still slightly
experimental and functionality changes may follow. It is just
remind possible used SDR API is very new and surprises may occur.




On that topic: I would like to see a 'buffersize' or 'samples_per_buffer'
field in struct v4l2_sdr_format. That gives applications the opportunity
to 1) get the current buffer size and 2) be able to change it if the driver
supports that. E.g. for high sampling rates they might want to use larger
buffers, for low they might want to select smaller buffers.

Right now it is fixed and you won't know the buffer size until you do
QUERYBUF. Which is not in sync with what other formats do.


I understand what you mean. If you use mmap or userptr then you would 
like to really know how much data you will get per buffer, but if you 
use read then it has no meaning.


I prefer 'buffersize' over 'samples_per_buffer', just because some 
formats are very complex, packed and compressed, and calculating 
'buffersize' from 'samples_per_buffer' could be quite complex.


It is also possible report both, but then you should decide how handle 
situation on S_FMT. Another should be zero and driver uses the one which 
has value !zero.



regards
Antti

--
http://palosaari.fi/
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/4] airspy: print notice to point SDR API is not 100% stable yet

2014-07-17 Thread Antti Palosaari
Print notice on driver load: SDR API is still slightly
experimental and functionality changes may follow. It is just
remind possible used SDR API is very new and surprises may occur.

Signed-off-by: Antti Palosaari cr...@iki.fi
---
 drivers/media/usb/airspy/airspy.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/airspy/airspy.c 
b/drivers/media/usb/airspy/airspy.c
index 5b3310f..6cf09ef 100644
--- a/drivers/media/usb/airspy/airspy.c
+++ b/drivers/media/usb/airspy/airspy.c
@@ -1086,7 +1086,9 @@ static int airspy_probe(struct usb_interface *intf,
}
dev_info(s-udev-dev, Registered as %s\n,
video_device_node_name(s-vdev));
-
+   dev_notice(s-udev-dev,
+   %s: SDR API is still slightly experimental and 
functionality changes may follow\n,
+   KBUILD_MODNAME);
return 0;
 
 err_free_controls:
-- 
1.9.3

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/4] airspy: print notice to point SDR API is not 100% stable yet

2014-07-17 Thread Hans Verkuil
On 07/18/2014 03:05 AM, Antti Palosaari wrote:
 Print notice on driver load: SDR API is still slightly
 experimental and functionality changes may follow. It is just
 remind possible used SDR API is very new and surprises may occur.
 
 Signed-off-by: Antti Palosaari cr...@iki.fi
 ---
  drivers/media/usb/airspy/airspy.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/media/usb/airspy/airspy.c 
 b/drivers/media/usb/airspy/airspy.c
 index 5b3310f..6cf09ef 100644
 --- a/drivers/media/usb/airspy/airspy.c
 +++ b/drivers/media/usb/airspy/airspy.c
 @@ -1086,7 +1086,9 @@ static int airspy_probe(struct usb_interface *intf,
   }
   dev_info(s-udev-dev, Registered as %s\n,
   video_device_node_name(s-vdev));
 -
 + dev_notice(s-udev-dev,
 + %s: SDR API is still slightly experimental and 
 functionality changes may follow\n,
 + KBUILD_MODNAME);
   return 0;
  
  err_free_controls:
 

On that topic: I would like to see a 'buffersize' or 'samples_per_buffer'
field in struct v4l2_sdr_format. That gives applications the opportunity
to 1) get the current buffer size and 2) be able to change it if the driver
supports that. E.g. for high sampling rates they might want to use larger
buffers, for low they might want to select smaller buffers.

Right now it is fixed and you won't know the buffer size until you do
QUERYBUF. Which is not in sync with what other formats do.

Regards,

Hans
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html