Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
pod.c File Reference
#include <linux/slab.h>
#include <linux/wait.h>
#include <sound/control.h>
#include "audio.h"
#include "capture.h"
#include "control.h"
#include "driver.h"
#include "playback.h"
#include "pod.h"

Go to the source code of this file.

Macros

#define POD_SYSEX_CODE   3
 
#define POD_BYTES_PER_FRAME   6 /* 24bit audio (stereo) */
 
#define PROCESS_SYSTEM_PARAM(x)
 
#define POD_GET_SYSTEM_PARAM(code, sign)
 
#define POD_GET_SET_SYSTEM_PARAM(code, mask, sign)
 

Enumerations

enum  {
  POD_SYSEX_CLIP = 0x0f, POD_SYSEX_SAVE = 0x24, POD_SYSEX_SYSTEM = 0x56, POD_SYSEX_SYSTEMREQ = 0x57,
  POD_SYSEX_STORE = 0x71, POD_SYSEX_FINISH = 0x72, POD_SYSEX_DUMPMEM = 0x73, POD_SYSEX_DUMP = 0x74,
  POD_SYSEX_DUMPREQ = 0x75
}
 
enum  {
  POD_monitor_level = 0x04, POD_routing = 0x05, POD_tuner_mute = 0x13, POD_tuner_freq = 0x15,
  POD_tuner_note = 0x16, POD_tuner_pitch = 0x17, POD_system_invalid = 0x10000
}
 
enum  { POD_DUMP_MEMORY = 2 }
 
enum  {
  POD_BUSY_READ, POD_BUSY_WRITE, POD_CHANNEL_DIRTY, POD_SAVE_PRESSED,
  POD_BUSY_MIDISEND
}
 

Functions

void line6_pod_process_message (struct usb_line6_pod *pod)
 
void line6_pod_midi_postprocess (struct usb_line6_pod *pod, unsigned char *data, int length)
 
void line6_pod_transmit_parameter (struct usb_line6_pod *pod, int param, u8 value)
 
 POD_GET_SET_SYSTEM_PARAM (monitor_level, 0xffff, 0)
 
 POD_GET_SET_SYSTEM_PARAM (routing, 0x0003, 0)
 
 POD_GET_SET_SYSTEM_PARAM (tuner_mute, 0x0001, 0)
 
 POD_GET_SET_SYSTEM_PARAM (tuner_freq, 0xffff, 0)
 
 POD_GET_SYSTEM_PARAM (tuner_note, 1)
 
 POD_GET_SYSTEM_PARAM (tuner_pitch, 1)
 
int line6_pod_init (struct usb_interface *interface, struct usb_line6_pod *pod)
 
void line6_pod_disconnect (struct usb_interface *interface)
 

Macro Definition Documentation

#define POD_BYTES_PER_FRAME   6 /* 24bit audio (stereo) */

Definition at line 24 of file pod.c.

#define POD_GET_SET_SYSTEM_PARAM (   code,
  mask,
  sign 
)
Value:
static ssize_t pod_set_ ## code(struct device *dev, \
const char *buf, size_t count) \
{ \
struct usb_interface *interface = to_usb_interface(dev); \
struct usb_line6_pod *pod = usb_get_intfdata(interface); \
return pod_set_system_param_string(pod, buf, count, POD_ ## code, mask); \
}

Definition at line 1032 of file pod.c.

#define POD_GET_SYSTEM_PARAM (   code,
  sign 
)
Value:
static ssize_t pod_get_ ## code(struct device *dev, \
struct device_attribute *attr, char *buf) \
{ \
struct usb_interface *interface = to_usb_interface(dev); \
struct usb_line6_pod *pod = usb_get_intfdata(interface); \
return pod_get_system_param_string(pod, buf, POD_ ## code, \
&pod->code, sign); \
}

Definition at line 1022 of file pod.c.

#define POD_SYSEX_CODE   3

Definition at line 23 of file pod.c.

#define PROCESS_SYSTEM_PARAM (   x)
Value:
case POD_ ## x: \
pod->x.value = value; \
wake_up(&pod->x.wait); \
break;

Enumeration Type Documentation

anonymous enum
Enumerator:
POD_SYSEX_CLIP 
POD_SYSEX_SAVE 
POD_SYSEX_SYSTEM 
POD_SYSEX_SYSTEMREQ 
POD_SYSEX_STORE 
POD_SYSEX_FINISH 
POD_SYSEX_DUMPMEM 
POD_SYSEX_DUMP 
POD_SYSEX_DUMPREQ 

Definition at line 28 of file pod.c.

anonymous enum
Enumerator:
POD_monitor_level 
POD_routing 
POD_tuner_mute 
POD_tuner_freq 
POD_tuner_note 
POD_tuner_pitch 
POD_system_invalid 

Definition at line 42 of file pod.c.

anonymous enum
Enumerator:
POD_DUMP_MEMORY 

Definition at line 54 of file pod.c.

anonymous enum
Enumerator:
POD_BUSY_READ 
POD_BUSY_WRITE 
POD_CHANNEL_DIRTY 
POD_SAVE_PRESSED 
POD_BUSY_MIDISEND 

Definition at line 58 of file pod.c.

Function Documentation

void line6_pod_disconnect ( struct usb_interface interface)

Definition at line 1297 of file pod.c.

int line6_pod_init ( struct usb_interface interface,
struct usb_line6_pod pod 
)

Definition at line 1284 of file pod.c.

void line6_pod_midi_postprocess ( struct usb_line6_pod pod,
unsigned char data,
int  length 
)

Definition at line 382 of file pod.c.

void line6_pod_process_message ( struct usb_line6_pod pod)

Definition at line 194 of file pod.c.

void line6_pod_transmit_parameter ( struct usb_line6_pod pod,
int  param,
u8  value 
)

Definition at line 421 of file pod.c.

POD_GET_SET_SYSTEM_PARAM ( monitor_level  ,
0xffff  ,
 
)
POD_GET_SET_SYSTEM_PARAM ( routing  ,
0x0003  ,
 
)
POD_GET_SET_SYSTEM_PARAM ( tuner_mute  ,
0x0001  ,
 
)
POD_GET_SET_SYSTEM_PARAM ( tuner_freq  ,
0xffff  ,
 
)
POD_GET_SYSTEM_PARAM ( tuner_note  ,
 
)
POD_GET_SYSTEM_PARAM ( tuner_pitch  ,
 
)