Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
radio-mr800.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/videodev2.h>
#include <media/v4l2-device.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-ctrls.h>
#include <media/v4l2-event.h>
#include <linux/usb.h>
#include <linux/mutex.h>

Go to the source code of this file.

Data Structures

struct  amradio_device
 

Macros

#define DRIVER_AUTHOR   "Alexey Klimov <[email protected]>"
 
#define DRIVER_DESC   "AverMedia MR 800 USB FM radio driver"
 
#define DRIVER_VERSION   "0.1.2"
 
#define USB_AMRADIO_VENDOR   0x07ca
 
#define USB_AMRADIO_PRODUCT   0xb800
 
#define MR800_DRIVER_NAME   "radio-mr800"
 
#define amradio_dev_warn(dev, fmt, arg...)   dev_warn(dev, MR800_DRIVER_NAME " - " fmt, ##arg)
 
#define amradio_dev_err(dev, fmt, arg...)   dev_err(dev, MR800_DRIVER_NAME " - " fmt, ##arg)
 
#define BUFFER_LENGTH   8
 
#define USB_TIMEOUT   500
 
#define FREQ_MIN   87.5
 
#define FREQ_MAX   108.0
 
#define FREQ_MUL   16000
 
#define AMRADIO_SET_FREQ   0xa4
 
#define AMRADIO_GET_READY_FLAG   0xa5
 
#define AMRADIO_GET_SIGNAL   0xa7
 
#define AMRADIO_GET_FREQ   0xa8
 
#define AMRADIO_SET_SEARCH_UP   0xa9
 
#define AMRADIO_SET_SEARCH_DOWN   0xaa
 
#define AMRADIO_SET_MUTE   0xab
 
#define AMRADIO_SET_RIGHT_MUTE   0xac
 
#define AMRADIO_SET_LEFT_MUTE   0xad
 
#define AMRADIO_SET_MONO   0xae
 
#define AMRADIO_SET_SEARCH_LVL   0xb0
 
#define AMRADIO_STOP_SEARCH   0xb1
 
#define WANT_STEREO   0x00
 
#define WANT_MONO   0x01
 

Functions

 MODULE_AUTHOR (DRIVER_AUTHOR)
 
 MODULE_DESCRIPTION (DRIVER_DESC)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_VERSION (DRIVER_VERSION)
 
 module_param (radio_nr, int, 0)
 
 MODULE_PARM_DESC (radio_nr,"Radio Nr")
 
 MODULE_DEVICE_TABLE (usb, usb_amradio_device_table)
 
 module_usb_driver (usb_amradio_driver)
 

Macro Definition Documentation

#define amradio_dev_err (   dev,
  fmt,
  arg... 
)    dev_err(dev, MR800_DRIVER_NAME " - " fmt, ##arg)

Definition at line 88 of file radio-mr800.c.

#define amradio_dev_warn (   dev,
  fmt,
  arg... 
)    dev_warn(dev, MR800_DRIVER_NAME " - " fmt, ##arg)

Definition at line 85 of file radio-mr800.c.

#define AMRADIO_GET_FREQ   0xa8

Definition at line 108 of file radio-mr800.c.

#define AMRADIO_GET_READY_FLAG   0xa5

Definition at line 106 of file radio-mr800.c.

#define AMRADIO_GET_SIGNAL   0xa7

Definition at line 107 of file radio-mr800.c.

#define AMRADIO_SET_FREQ   0xa4

Definition at line 105 of file radio-mr800.c.

#define AMRADIO_SET_LEFT_MUTE   0xad

Definition at line 113 of file radio-mr800.c.

#define AMRADIO_SET_MONO   0xae

Definition at line 114 of file radio-mr800.c.

#define AMRADIO_SET_MUTE   0xab

Definition at line 111 of file radio-mr800.c.

#define AMRADIO_SET_RIGHT_MUTE   0xac

Definition at line 112 of file radio-mr800.c.

#define AMRADIO_SET_SEARCH_DOWN   0xaa

Definition at line 110 of file radio-mr800.c.

#define AMRADIO_SET_SEARCH_LVL   0xb0

Definition at line 115 of file radio-mr800.c.

#define AMRADIO_SET_SEARCH_UP   0xa9

Definition at line 109 of file radio-mr800.c.

#define AMRADIO_STOP_SEARCH   0xb1

Definition at line 116 of file radio-mr800.c.

#define BUFFER_LENGTH   8

Definition at line 92 of file radio-mr800.c.

#define DRIVER_AUTHOR   "Alexey Klimov <[email protected]>"

Definition at line 71 of file radio-mr800.c.

#define DRIVER_DESC   "AverMedia MR 800 USB FM radio driver"

Definition at line 72 of file radio-mr800.c.

#define DRIVER_VERSION   "0.1.2"

Definition at line 73 of file radio-mr800.c.

#define FREQ_MAX   108.0

Definition at line 98 of file radio-mr800.c.

#define FREQ_MIN   87.5

Definition at line 97 of file radio-mr800.c.

#define FREQ_MUL   16000

Definition at line 99 of file radio-mr800.c.

#define MR800_DRIVER_NAME   "radio-mr800"

Definition at line 84 of file radio-mr800.c.

#define USB_AMRADIO_PRODUCT   0xb800

Definition at line 81 of file radio-mr800.c.

#define USB_AMRADIO_VENDOR   0x07ca

Definition at line 80 of file radio-mr800.c.

#define USB_TIMEOUT   500

Definition at line 93 of file radio-mr800.c.

#define WANT_MONO   0x01

Definition at line 120 of file radio-mr800.c.

#define WANT_STEREO   0x00

Definition at line 119 of file radio-mr800.c.

Function Documentation

MODULE_AUTHOR ( DRIVER_AUTHOR  )
MODULE_DESCRIPTION ( DRIVER_DESC  )
MODULE_DEVICE_TABLE ( usb  ,
usb_amradio_device_table   
)
MODULE_LICENSE ( "GPL"  )
module_param ( radio_nr  ,
int  ,
 
)
MODULE_PARM_DESC ( radio_nr  ,
"Radio Nr"   
)
module_usb_driver ( usb_amradio_driver  )
MODULE_VERSION ( DRIVER_VERSION  )