Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
pcxhr.c File Reference
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/info.h>
#include <sound/control.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include "pcxhr.h"
#include "pcxhr_mixer.h"
#include "pcxhr_hwdep.h"
#include "pcxhr_core.h"
#include "pcxhr_mix22.h"

Go to the source code of this file.

Data Structures

struct  board_parameters
 

Macros

#define DRIVER_NAME   "pcxhr"
 
#define PCXHR_BOARD_HAS_AES1(x)   (x->fw_file_set != 4)
 
#define PCXHR_BOARD_AESIN_NO_192K(x)
 
#define PCXHR_FREQ_REG_MASK   0x1f
 
#define PCXHR_FREQ_QUARTZ_48000   0x00
 
#define PCXHR_FREQ_QUARTZ_24000   0x01
 
#define PCXHR_FREQ_QUARTZ_12000   0x09
 
#define PCXHR_FREQ_QUARTZ_32000   0x08
 
#define PCXHR_FREQ_QUARTZ_16000   0x04
 
#define PCXHR_FREQ_QUARTZ_8000   0x0c
 
#define PCXHR_FREQ_QUARTZ_44100   0x02
 
#define PCXHR_FREQ_QUARTZ_22050   0x0a
 
#define PCXHR_FREQ_QUARTZ_11025   0x06
 
#define PCXHR_FREQ_PLL   0x05
 
#define PCXHR_FREQ_QUARTZ_192000   0x10
 
#define PCXHR_FREQ_QUARTZ_96000   0x18
 
#define PCXHR_FREQ_QUARTZ_176400   0x14
 
#define PCXHR_FREQ_QUARTZ_88200   0x1c
 
#define PCXHR_FREQ_QUARTZ_128000   0x12
 
#define PCXHR_FREQ_QUARTZ_64000   0x1a
 
#define PCXHR_FREQ_WORD_CLOCK   0x0f
 
#define PCXHR_FREQ_SYNC_AES   0x0e
 
#define PCXHR_FREQ_AES_1   0x07
 
#define PCXHR_FREQ_AES_2   0x0b
 
#define PCXHR_FREQ_AES_3   0x03
 
#define PCXHR_FREQ_AES_4   0x0d
 
#define PCXHR_MODIFY_CLOCK_S_BIT   0x04
 
#define PCXHR_IRQ_TIMER_FREQ   92000
 
#define PCXHR_IRQ_TIMER_PERIOD   48
 
#define HEADER_FMT_BASE_LIN   0xfed00000
 
#define HEADER_FMT_BASE_FLOAT   0xfad00000
 
#define HEADER_FMT_INTEL   0x00008000
 
#define HEADER_FMT_24BITS   0x00004000
 
#define HEADER_FMT_16BITS   0x00002000
 
#define HEADER_FMT_UPTO11   0x00000200
 
#define HEADER_FMT_UPTO32   0x00000100
 
#define HEADER_FMT_MONO   0x00000080
 
#define TIME_CODE_VALID_MASK   0x00800000
 
#define TIME_CODE_NEW_MASK   0x00400000
 
#define TIME_CODE_BACK_MASK   0x00200000
 
#define TIME_CODE_WAIT_MASK   0x00100000
 
#define MANAGE_SIGNAL_TIME_CODE   0x01
 
#define MANAGE_SIGNAL_MIDI   0x02
 

Enumerations

enum  {
  PCI_ID_VX882HR, PCI_ID_PCX882HR, PCI_ID_VX881HR, PCI_ID_PCX881HR,
  PCI_ID_VX882E, PCI_ID_PCX882E, PCI_ID_VX881E, PCI_ID_PCX881E,
  PCI_ID_VX1222HR, PCI_ID_PCX1222HR, PCI_ID_VX1221HR, PCI_ID_PCX1221HR,
  PCI_ID_VX1222E, PCI_ID_PCX1222E, PCI_ID_VX1221E, PCI_ID_PCX1221E,
  PCI_ID_VX222HR, PCI_ID_VX222E, PCI_ID_PCX22HR, PCI_ID_PCX22E,
  PCI_ID_VX222HRMIC, PCI_ID_VX222E_MIC, PCI_ID_PCX924HR, PCI_ID_PCX924E,
  PCI_ID_PCX924HRMIC, PCI_ID_PCX924E_MIC, PCI_ID_VX442HR, PCI_ID_PCX442HR,
  PCI_ID_VX442E, PCI_ID_PCX442E, PCI_ID_VX822HR, PCI_ID_PCX822HR,
  PCI_ID_VX822E, PCI_ID_PCX822E, PCI_ID_LAST
}
 

Functions

 MODULE_AUTHOR ("Markus Bollinger <[email protected]>, ""Marc Titinger <[email protected]>")
 
 MODULE_DESCRIPTION ("Digigram "DRIVER_NAME" "PCXHR_DRIVER_VERSION_STRING)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_SUPPORTED_DEVICE ("{{Digigram,"DRIVER_NAME"}}")
 
 module_param_array (index, int, NULL, 0444)
 
 MODULE_PARM_DESC (index,"Index value for Digigram "DRIVER_NAME" soundcard")
 
 module_param_array (id, charp, NULL, 0444)
 
 MODULE_PARM_DESC (id,"ID string for Digigram "DRIVER_NAME" soundcard")
 
 module_param_array (enable, bool, NULL, 0444)
 
 MODULE_PARM_DESC (enable,"Enable Digigram "DRIVER_NAME" soundcard")
 
 module_param_array (mono, bool, NULL, 0444)
 
 MODULE_PARM_DESC (mono,"Mono capture mode (default is stereo)")
 
 MODULE_DEVICE_TABLE (pci, pcxhr_ids)
 
int pcxhr_set_clock (struct pcxhr_mgr *mgr, unsigned int rate)
 
int pcxhr_get_external_clock (struct pcxhr_mgr *mgr, enum pcxhr_clock_type clock_type, int *sample_rate)
 
int pcxhr_create_pcm (struct snd_pcxhr *chip)
 
 module_pci_driver (pcxhr_driver)
 

Macro Definition Documentation

#define DRIVER_NAME   "pcxhr"

Definition at line 45 of file pcxhr.c.

#define HEADER_FMT_16BITS   0x00002000

Definition at line 551 of file pcxhr.c.

#define HEADER_FMT_24BITS   0x00004000

Definition at line 550 of file pcxhr.c.

#define HEADER_FMT_BASE_FLOAT   0xfad00000

Definition at line 548 of file pcxhr.c.

#define HEADER_FMT_BASE_LIN   0xfed00000

Definition at line 547 of file pcxhr.c.

#define HEADER_FMT_INTEL   0x00008000

Definition at line 549 of file pcxhr.c.

#define HEADER_FMT_MONO   0x00000080

Definition at line 554 of file pcxhr.c.

#define HEADER_FMT_UPTO11   0x00000200

Definition at line 552 of file pcxhr.c.

#define HEADER_FMT_UPTO32   0x00000100

Definition at line 553 of file pcxhr.c.

#define MANAGE_SIGNAL_MIDI   0x02

Definition at line 1403 of file pcxhr.c.

#define MANAGE_SIGNAL_TIME_CODE   0x01

Definition at line 1402 of file pcxhr.c.

#define PCXHR_BOARD_AESIN_NO_192K (   x)
Value:
((x->capture_chips == 0) || \
(x->fw_file_set == 0) || \
(x->fw_file_set == 2))

Definition at line 193 of file pcxhr.c.

#define PCXHR_BOARD_HAS_AES1 (   x)    (x->fw_file_set != 4)

Definition at line 191 of file pcxhr.c.

#define PCXHR_FREQ_AES_1   0x07

Definition at line 243 of file pcxhr.c.

#define PCXHR_FREQ_AES_2   0x0b

Definition at line 244 of file pcxhr.c.

#define PCXHR_FREQ_AES_3   0x03

Definition at line 245 of file pcxhr.c.

#define PCXHR_FREQ_AES_4   0x0d

Definition at line 246 of file pcxhr.c.

#define PCXHR_FREQ_PLL   0x05

Definition at line 233 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_11025   0x06

Definition at line 232 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_12000   0x09

Definition at line 226 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_128000   0x12

Definition at line 238 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_16000   0x04

Definition at line 228 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_176400   0x14

Definition at line 236 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_192000   0x10

Definition at line 234 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_22050   0x0a

Definition at line 231 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_24000   0x01

Definition at line 225 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_32000   0x08

Definition at line 227 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_44100   0x02

Definition at line 230 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_48000   0x00

Definition at line 224 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_64000   0x1a

Definition at line 239 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_8000   0x0c

Definition at line 229 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_88200   0x1c

Definition at line 237 of file pcxhr.c.

#define PCXHR_FREQ_QUARTZ_96000   0x18

Definition at line 235 of file pcxhr.c.

#define PCXHR_FREQ_REG_MASK   0x1f

Definition at line 223 of file pcxhr.c.

#define PCXHR_FREQ_SYNC_AES   0x0e

Definition at line 242 of file pcxhr.c.

#define PCXHR_FREQ_WORD_CLOCK   0x0f

Definition at line 241 of file pcxhr.c.

#define PCXHR_IRQ_TIMER_FREQ   92000

Definition at line 390 of file pcxhr.c.

#define PCXHR_IRQ_TIMER_PERIOD   48

Definition at line 391 of file pcxhr.c.

#define PCXHR_MODIFY_CLOCK_S_BIT   0x04

Definition at line 388 of file pcxhr.c.

#define TIME_CODE_BACK_MASK   0x00200000

Definition at line 1398 of file pcxhr.c.

#define TIME_CODE_NEW_MASK   0x00400000

Definition at line 1397 of file pcxhr.c.

#define TIME_CODE_VALID_MASK   0x00800000

Definition at line 1396 of file pcxhr.c.

#define TIME_CODE_WAIT_MASK   0x00100000

Definition at line 1399 of file pcxhr.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
PCI_ID_VX882HR 
PCI_ID_PCX882HR 
PCI_ID_VX881HR 
PCI_ID_PCX881HR 
PCI_ID_VX882E 
PCI_ID_PCX882E 
PCI_ID_VX881E 
PCI_ID_PCX881E 
PCI_ID_VX1222HR 
PCI_ID_PCX1222HR 
PCI_ID_VX1221HR 
PCI_ID_PCX1221HR 
PCI_ID_VX1222E 
PCI_ID_PCX1222E 
PCI_ID_VX1221E 
PCI_ID_PCX1221E 
PCI_ID_VX222HR 
PCI_ID_VX222E 
PCI_ID_PCX22HR 
PCI_ID_PCX22E 
PCI_ID_VX222HRMIC 
PCI_ID_VX222E_MIC 
PCI_ID_PCX924HR 
PCI_ID_PCX924E 
PCI_ID_PCX924HRMIC 
PCI_ID_PCX924E_MIC 
PCI_ID_VX442HR 
PCI_ID_PCX442HR 
PCI_ID_VX442E 
PCI_ID_PCX442E 
PCI_ID_VX822HR 
PCI_ID_PCX822HR 
PCI_ID_VX822E 
PCI_ID_PCX822E 
PCI_ID_LAST 

Definition at line 67 of file pcxhr.c.

Function Documentation

MODULE_AUTHOR ( "Markus Bollinger <[email protected] ,
""Marc Titinger< titinger @digigram.com >"   
)
MODULE_DESCRIPTION ( "Digigram "DRIVER_NAME" "  PCXHR_DRIVER_VERSION_STRING)
MODULE_DEVICE_TABLE ( pci  ,
pcxhr_ids   
)
MODULE_LICENSE ( "GPL"  )
module_param_array ( index  ,
int  ,
NULL  ,
0444   
)
module_param_array ( id  ,
charp  ,
NULL  ,
0444   
)
module_param_array ( enable  ,
bool  ,
NULL  ,
0444   
)
module_param_array ( mono  ,
bool  ,
NULL  ,
0444   
)
MODULE_PARM_DESC ( index  ,
"Index value for Digigram "DRIVER_NAME" soundcard"   
)
MODULE_PARM_DESC ( id  ,
"ID string for Digigram "DRIVER_NAME" soundcard"   
)
MODULE_PARM_DESC ( enable  ,
"Enable Digigram "DRIVER_NAME" soundcard"   
)
MODULE_PARM_DESC ( mono  ,
"Mono capture mode (default is stereo)"   
)
module_pci_driver ( pcxhr_driver  )
MODULE_SUPPORTED_DEVICE ( "{{Digigram,"DRIVER_NAME"}}"  )
int pcxhr_create_pcm ( struct snd_pcxhr chip)

Definition at line 1161 of file pcxhr.c.

int pcxhr_get_external_clock ( struct pcxhr_mgr mgr,
enum pcxhr_clock_type  clock_type,
int sample_rate 
)

Definition at line 489 of file pcxhr.c.

int pcxhr_set_clock ( struct pcxhr_mgr mgr,
unsigned int  rate 
)

Definition at line 393 of file pcxhr.c.