public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Antti Palosaari <crope@iki.fi>
Cc: linux-media@vger.kernel.org
Subject: Re: [REVIEW PATCH 10/13] DocBook: Software Defined Radio Interface
Date: Sat, 25 Jan 2014 14:44:36 +0100	[thread overview]
Message-ID: <52E3BFC4.3020503@xs4all.nl> (raw)
In-Reply-To: <52E3B5BA.5010808@iki.fi>



On 01/25/2014 02:01 PM, Antti Palosaari wrote:
> On 25.01.2014 10:26, Hans Verkuil wrote:
>> A few comments below...
>>
>> On 01/23/2014 10:08 PM, Antti Palosaari wrote:
>>> Document V4L2 SDR interface.
>>>
>>> Cc: Hans Verkuil <hverkuil@xs4all.nl>
>>> Signed-off-by: Antti Palosaari <crope@iki.fi>
> 
>>> +    <section>
>>> +      <title>V4L2 in Linux 3.14</title>
>>
>> This should be 3.15.
> 
> OK. The goal was that 3.14 but fixing that documentation has taken over month.
> 
> 
>>> +
>>> +    <para>
>>> +The SDR capture device uses the <link linkend="format">format</link> ioctls to
>>> +select the capture format. Both the sampling resolution and the data streaming
>>
>> I understand why the data streaming format is bound to the format, but why is
>> the sampling resolution bound by it as well?
> 
> How can I explain that... it is not always bind to format nor it could be known 100% from sure from format. But resolution has some deep relation to format. Data is usually packed to smallest reasonable size in order to minimize needed transmission bandwidth. If you change sampling resolution then format likely changes too, as greater resolution needs more bits per sample and format carries samples. Lets take a some simple example:
> 
> Lets take an examples:
> A is 8-bit sample, number from range 0-255.
> B is 16-bit sample, number from range 0-65536.
> 
> Then your formats are defined, lets say V4L_FMT_SDR_U8 and V4L_FMT_SDR_U16.
> 
> Streams are sequence of those samples, use 10 samples here as example:
> A0A1A2A3A4A5A6A7A8A9 = 80bits, 10 bytes
> B0B1B2B3B4B5B6B7B8B9 = 160bits, 20 bytes
> 
> But you still don't know surely what is sampling resolution, only how it is represented. It is always more or less than that nominal value, die to many reasons. ADC datasheets usually define ENOB (effective number of bits) value. It is fairly common having 12bit resolution but ENOB is only around 10bit.
> 
> Here is example from Mirics, which shows different formats and resolutions:
> 
> format,resolution,sample rate (~max)
> 252    14         8613281
> 336    12        11484375
> 384    10+2      13125000 (packed, 2 bits dropped using some formula)
> 504    8         17226562
> 
> All in all, the idea was to tell user that the sampling resolution is selected according to dataformat he uses.

I'm sorry for having you work so hard on explaining this when the problem was with
my brain that confused 'resolution' with 'rate' :-) Well, they both start with 'r'...

Your text is fine.

> 
> 
>>> --- a/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml
>>> +++ b/Documentation/DocBook/media/v4l/vidioc-g-fmt.xml
>>> @@ -172,6 +172,13 @@ capture and output devices.</entry>
>>>         </row>
>>>         <row>
>>>           <entry></entry>
>>> +        <entry>&v4l2-format-sdr;</entry>
>>> +        <entry><structfield>sdr</structfield></entry>
>>> +        <entry>Definition of an data format, see
>>
>> s/an data/a data/
> 
> OK
> 
> 
> regards
> Antti
> 

Regards,

	Hans

  reply	other threads:[~2014-01-25 13:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 21:08 [REVIEW PATCH 00/13] SDR API Antti Palosaari
2014-01-23 21:08 ` [REVIEW PATCH 01/13] v4l: add device type for Software Defined Radio Antti Palosaari
2014-01-23 21:08 ` [REVIEW PATCH 02/13] v4l: add new tuner types for SDR Antti Palosaari
2014-01-23 21:08 ` [REVIEW PATCH 03/13] v4l: 1 Hz resolution flag for tuners Antti Palosaari
2014-01-23 21:08 ` [REVIEW PATCH 04/13] v4l: add stream format for SDR receiver Antti Palosaari
2014-01-23 21:08 ` [REVIEW PATCH 05/13] v4l: define own IOCTL ops for SDR FMT Antti Palosaari
2014-01-23 21:08 ` [REVIEW PATCH 06/13] v4l: enable some IOCTLs for SDR receiver Antti Palosaari
2014-01-23 21:08 ` [REVIEW PATCH 07/13] v4l: add device capability flag " Antti Palosaari
2014-01-23 21:08 ` [REVIEW PATCH 08/13] v4l: do not allow modulator ioctls for non-radio devices Antti Palosaari
2014-01-23 21:08 ` [REVIEW PATCH 09/13] DocBook: document 1 Hz flag Antti Palosaari
2014-01-23 21:08 ` [REVIEW PATCH 10/13] DocBook: Software Defined Radio Interface Antti Palosaari
2014-01-25  8:26   ` Hans Verkuil
2014-01-25 13:01     ` Antti Palosaari
2014-01-25 13:44       ` Hans Verkuil [this message]
2014-01-23 21:08 ` [REVIEW PATCH 11/13] DocBook: mark SDR API as Experimental Antti Palosaari
2014-01-25  8:27   ` Hans Verkuil
2014-01-23 21:08 ` [REVIEW PATCH 12/13] v4l2-framework.txt: add SDR device type Antti Palosaari
2014-01-23 21:08 ` [REVIEW PATCH 13/13] devices.txt: add video4linux device for Software Defined Radio Antti Palosaari
2014-01-25  8:27   ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52E3BFC4.3020503@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=crope@iki.fi \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox