Recently I posted 2nd RFC of Kernel SDR API requirements. Currently I am performing some tests (Mirics FlexiTV SDR) how it could be integrated to the V4L2 API.
Here is current view of implementation control flow, listed in order from device to application:
- Kernel device driver
- controls device
- Kernel V4L2 API
- Kernel - user-space interface
- libv4l
- existing library for applications
- covers API from applications
- makes raw format conversions to well known formats
LINUX KERNEL SDR API REQUIREMENT SPECIFICATION
LINUX KERNEL SDR API REQUIREMENT SPECIFICATION
=====================================================================
Ideal SDR specific requirements (basics SDR settings)
*********************************************************************
operation mode
* values: ADC (Rx) or DAC (Tx)
* operations
GET, inquire what HW supports
GET, get current value
SET, set desired value
sampling resolution
* values: 1 - 32 (unit: bit)
16 bit could be enough, but better to leave some room for future
* operations
GET, inquire what HW supports
GET, get current value
SET, set desired value
sampling rate
* values: 1 - infinity (unit: Hz, symbols per second)
currently 500 MHz is more than enough
* operations
GET, inquire what HW supports
GET, get current value
SET, set desired value
TODO:
* inversion?
Practical SDR specific requirements (SDR settings for RF tuner)
*********************************************************************
RF frequency
* values: 1 - infinity (unit: Hz)
currently 100 GHz is more than enough
* operations
GET, inquire what HW supports
there could be unsupported ranges between lower and upper freq
GET, get current value
SET, set desired value
IF frequency (intermediate frequency)
* values: 0 - infinity (unit: Hz)
currently 500 MHz is more than enough
* operations
GET, get current value
tuner lock (frequency synthesizer / PLL)
* values: yes/no
* operations
GET, get current value
tuner gains
* gain and attenuation
* there could be multiple places to adjust gain on tuner signal path
* is single overall gain enough or do we want more manual fine tuning?
tuner filters
* there could be multiple filters on tuner signal path (RF/IF)
* do we need to control filters at all?
* calculate from sampling rate?
TODO:
* pass RF standard to tuner?
Passing standard is clearly against idea, but some RF tuners does
"black magic" according to standard. That magic is usually setting
filters and and gains, but it could be more...
* inversion?
Hardware specific requirements (board settings)
*********************************************************************
antenna switch
* values: 0 - 32 (unit: piece)
* operations
GET, inquire what HW supports
GET, get current value
SET, set desired value
external LNA
* values: -200000 - 200000 (unit: dB/1000)
* operations
GET, inquire what HW supports
GET, get current value
SET, set desired value
* range from -200dB to 200dB should be enough
multiple ADCs / DACs on single device
* there could be multiple ADCs and DACs on single device
* resources could be shared which limits concurrent usage
* eg. device has 2 ADC + 2 DAC = 4 total, but only 2 could be used
at the time
Kernel specific requirements
*********************************************************************
device locking between multiple APIs
* same device could support multiple APIs which could not be used at
same time
* for example DVB API and V4L2 API
* locking needed
DOCUMENT VERSION HISTORY
=====================================================================
2012-10-15 Antti Palosaari <crope@iki.fi>
* Initial version
2013-04-11 Antti Palosaari <crope@iki.fi>
* add version history
* order requirements per sections
* add IF frequency (intermediate frequency)
* add tuner lock (frequency synthesizer / PLL)
* add external LNA
* add TODOs