Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cx88-dsp.c File Reference
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/jiffies.h>
#include <asm/div64.h>
#include "cx88.h"
#include "cx88-reg.h"

Go to the source code of this file.

Macros

#define INT_PI   ((s32)(3.141592653589 * 32768.0))
 
#define compat_remainder(a, b)   ((float)(((s32)((a)*100))%((s32)((b)*100)))/100.0)
 
#define baseband_freq(carrier, srate, tone)
 
#define FREQ_A2_CARRIER   baseband_freq(54687.5, 2689.36, 0.0)
 
#define FREQ_A2_DUAL   baseband_freq(54687.5, 2689.36, 274.1)
 
#define FREQ_A2_STEREO   baseband_freq(54687.5, 2689.36, 117.5)
 
#define FREQ_A2M_CARRIER   ((s32)(2.114516 * 32768.0))
 
#define FREQ_A2M_DUAL   ((s32)(2.754916 * 32768.0))
 
#define FREQ_A2M_STEREO   ((s32)(2.462326 * 32768.0))
 
#define FREQ_EIAJ_CARRIER   ((s32)(1.963495 * 32768.0)) /* 5pi/8 */
 
#define FREQ_EIAJ_DUAL   ((s32)(2.562118 * 32768.0))
 
#define FREQ_EIAJ_STEREO   ((s32)(2.601053 * 32768.0))
 
#define FREQ_BTSC_DUAL   ((s32)(1.963495 * 32768.0)) /* 5pi/8 */
 
#define FREQ_BTSC_DUAL_REF   ((s32)(1.374446 * 32768.0)) /* 7pi/16 */
 
#define FREQ_BTSC_SAP   ((s32)(2.471532 * 32768.0))
 
#define FREQ_BTSC_SAP_REF   ((s32)(1.730072 * 32768.0))
 
#define FREQ_NOISE_START   ((s32)(0.100000 * 32768.0))
 
#define FREQ_NOISE_END   ((s32)(1.200000 * 32768.0))
 
#define dprintk(level, fmt, arg...)
 

Functions

 module_param (dsp_debug, int, 0644)
 
 MODULE_PARM_DESC (dsp_debug,"enable audio dsp debug messages")
 
s32 cx88_dsp_detect_stereo_sap (struct cx88_core *core)
 
 EXPORT_SYMBOL (cx88_dsp_detect_stereo_sap)
 

Macro Definition Documentation

#define baseband_freq (   carrier,
  srate,
  tone 
)
Value:
((s32)( \
(compat_remainder(carrier + tone, srate)) / srate * 2 * INT_PI))

Definition at line 36 of file cx88-dsp.c.

#define compat_remainder (   a,
  b 
)    ((float)(((s32)((a)*100))%((s32)((b)*100)))/100.0)

Definition at line 33 of file cx88-dsp.c.

#define dprintk (   level,
  fmt,
  arg... 
)
Value:
if (dsp_debug >= level) \
printk(KERN_DEBUG "%s/0: " fmt, core->name , ## arg)

Definition at line 74 of file cx88-dsp.c.

#define FREQ_A2_CARRIER   baseband_freq(54687.5, 2689.36, 0.0)

Definition at line 42 of file cx88-dsp.c.

#define FREQ_A2_DUAL   baseband_freq(54687.5, 2689.36, 274.1)

Definition at line 43 of file cx88-dsp.c.

#define FREQ_A2_STEREO   baseband_freq(54687.5, 2689.36, 117.5)

Definition at line 44 of file cx88-dsp.c.

#define FREQ_A2M_CARRIER   ((s32)(2.114516 * 32768.0))

Definition at line 52 of file cx88-dsp.c.

#define FREQ_A2M_DUAL   ((s32)(2.754916 * 32768.0))

Definition at line 53 of file cx88-dsp.c.

#define FREQ_A2M_STEREO   ((s32)(2.462326 * 32768.0))

Definition at line 54 of file cx88-dsp.c.

#define FREQ_BTSC_DUAL   ((s32)(1.963495 * 32768.0)) /* 5pi/8 */

Definition at line 60 of file cx88-dsp.c.

#define FREQ_BTSC_DUAL_REF   ((s32)(1.374446 * 32768.0)) /* 7pi/16 */

Definition at line 61 of file cx88-dsp.c.

#define FREQ_BTSC_SAP   ((s32)(2.471532 * 32768.0))

Definition at line 63 of file cx88-dsp.c.

#define FREQ_BTSC_SAP_REF   ((s32)(1.730072 * 32768.0))

Definition at line 64 of file cx88-dsp.c.

#define FREQ_EIAJ_CARRIER   ((s32)(1.963495 * 32768.0)) /* 5pi/8 */

Definition at line 56 of file cx88-dsp.c.

#define FREQ_EIAJ_DUAL   ((s32)(2.562118 * 32768.0))

Definition at line 57 of file cx88-dsp.c.

#define FREQ_EIAJ_STEREO   ((s32)(2.601053 * 32768.0))

Definition at line 58 of file cx88-dsp.c.

#define FREQ_NOISE_END   ((s32)(1.200000 * 32768.0))

Definition at line 68 of file cx88-dsp.c.

#define FREQ_NOISE_START   ((s32)(0.100000 * 32768.0))

Definition at line 67 of file cx88-dsp.c.

#define INT_PI   ((s32)(3.141592653589 * 32768.0))

Definition at line 31 of file cx88-dsp.c.

Function Documentation

s32 cx88_dsp_detect_stereo_sap ( struct cx88_core core)

Definition at line 271 of file cx88-dsp.c.

EXPORT_SYMBOL ( cx88_dsp_detect_stereo_sap  )
module_param ( dsp_debug  ,
int  ,
0644   
)
MODULE_PARM_DESC ( dsp_debug  ,
"enable audio dsp debug messages"   
)