Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
layout.c File Reference
#include <asm/prom.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/slab.h>
#include "../aoa.h"
#include "../soundbus/soundbus.h"

Go to the source code of this file.

Data Structures

struct  codec_connection
 
struct  codec_connect_info
 
struct  layout
 
struct  layout_dev_ptr
 
struct  layout_dev
 

Macros

#define MAX_CODECS_PER_BUS   2
 
#define CC_SPEAKERS   (1<<0)
 
#define CC_HEADPHONE   (1<<1)
 
#define CC_LINEOUT   (1<<2)
 
#define CC_DIGITALOUT   (1<<3)
 
#define CC_LINEIN   (1<<4)
 
#define CC_MICROPHONE   (1<<5)
 
#define CC_DIGITALIN   (1<<6)
 
#define CC_LINEOUT_LABELLED_HEADPHONE   (1<<7)
 
#define LAYOUT_FLAG_COMBO_LINEOUT_SPDIF   (1<<0)
 
#define control_info   snd_ctl_boolean_mono_info
 
#define AMP_CONTROL(n, description)
 

Functions

 MODULE_AUTHOR ("Johannes Berg <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 
 MODULE_DESCRIPTION ("Layout-ID fabric for snd-aoa")
 
 MODULE_ALIAS ("sound-layout-36")
 
 MODULE_ALIAS ("sound-layout-41")
 
 MODULE_ALIAS ("sound-layout-45")
 
 MODULE_ALIAS ("sound-layout-47")
 
 MODULE_ALIAS ("sound-layout-48")
 
 MODULE_ALIAS ("sound-layout-49")
 
 MODULE_ALIAS ("sound-layout-50")
 
 MODULE_ALIAS ("sound-layout-51")
 
 MODULE_ALIAS ("sound-layout-56")
 
 MODULE_ALIAS ("sound-layout-57")
 
 MODULE_ALIAS ("sound-layout-58")
 
 MODULE_ALIAS ("sound-layout-60")
 
 MODULE_ALIAS ("sound-layout-61")
 
 MODULE_ALIAS ("sound-layout-62")
 
 MODULE_ALIAS ("sound-layout-64")
 
 MODULE_ALIAS ("sound-layout-65")
 
 MODULE_ALIAS ("sound-layout-66")
 
 MODULE_ALIAS ("sound-layout-67")
 
 MODULE_ALIAS ("sound-layout-68")
 
 MODULE_ALIAS ("sound-layout-69")
 
 MODULE_ALIAS ("sound-layout-70")
 
 MODULE_ALIAS ("sound-layout-72")
 
 MODULE_ALIAS ("sound-layout-76")
 
 MODULE_ALIAS ("sound-layout-80")
 
 MODULE_ALIAS ("sound-layout-82")
 
 MODULE_ALIAS ("sound-layout-84")
 
 MODULE_ALIAS ("sound-layout-86")
 
 MODULE_ALIAS ("sound-layout-90")
 
 MODULE_ALIAS ("sound-layout-92")
 
 MODULE_ALIAS ("sound-layout-94")
 
 MODULE_ALIAS ("sound-layout-96")
 
 MODULE_ALIAS ("sound-layout-98")
 
 MODULE_ALIAS ("sound-layout-100")
 
 MODULE_ALIAS ("aoa-device-id-14")
 
 MODULE_ALIAS ("aoa-device-id-22")
 
 MODULE_ALIAS ("aoa-device-id-35")
 
 AMP_CONTROL (headphone,"Headphone Switch")
 
 AMP_CONTROL (speakers,"Speakers Switch")
 
 AMP_CONTROL (lineout,"Line-Out Switch")
 
 AMP_CONTROL (master,"Master Switch")
 
 module_init (aoa_fabric_layout_init)
 
 module_exit (aoa_fabric_layout_exit)
 

Macro Definition Documentation

#define AMP_CONTROL (   n,
  description 
)
Value:
static int n##_control_get(struct snd_kcontrol *kcontrol, \
struct snd_ctl_elem_value *ucontrol) \
{ \
if (gpio->methods && gpio->methods->get_##n) \
ucontrol->value.integer.value[0] = \
gpio->methods->get_##n(gpio); \
return 0; \
} \
static int n##_control_put(struct snd_kcontrol *kcontrol, \
struct snd_ctl_elem_value *ucontrol) \
{ \
if (gpio->methods && gpio->methods->get_##n) \
gpio->methods->set_##n(gpio, \
!!ucontrol->value.integer.value[0]); \
return 1; \
} \
static struct snd_kcontrol_new n##_ctl = { \
.name = description, \
.info = control_info, \
.get = n##_control_get, \
.put = n##_control_put, \
}

Definition at line 625 of file layout.c.

#define CC_DIGITALIN   (1<<6)

Definition at line 40 of file layout.c.

#define CC_DIGITALOUT   (1<<3)

Definition at line 37 of file layout.c.

#define CC_HEADPHONE   (1<<1)

Definition at line 35 of file layout.c.

#define CC_LINEIN   (1<<4)

Definition at line 38 of file layout.c.

#define CC_LINEOUT   (1<<2)

Definition at line 36 of file layout.c.

#define CC_LINEOUT_LABELLED_HEADPHONE   (1<<7)

Definition at line 45 of file layout.c.

#define CC_MICROPHONE   (1<<5)

Definition at line 39 of file layout.c.

#define CC_SPEAKERS   (1<<0)

Definition at line 34 of file layout.c.

#define control_info   snd_ctl_boolean_mono_info

Definition at line 623 of file layout.c.

#define LAYOUT_FLAG_COMBO_LINEOUT_SPDIF   (1<<0)

Definition at line 62 of file layout.c.

#define MAX_CODECS_PER_BUS   2

Definition at line 23 of file layout.c.

Function Documentation

AMP_CONTROL ( headphone  ,
"Headphone Switch"   
)
AMP_CONTROL ( speakers  ,
"Speakers Switch"   
)
AMP_CONTROL ( lineout  ,
"Line-Out Switch"   
)
AMP_CONTROL ( master  ,
"Master Switch"   
)
MODULE_ALIAS ( "sound-layout-36"  )
MODULE_ALIAS ( "sound-layout-41"  )
MODULE_ALIAS ( "sound-layout-45"  )
MODULE_ALIAS ( "sound-layout-47"  )
MODULE_ALIAS ( "sound-layout-48"  )
MODULE_ALIAS ( "sound-layout-49"  )
MODULE_ALIAS ( "sound-layout-50"  )
MODULE_ALIAS ( "sound-layout-51"  )
MODULE_ALIAS ( "sound-layout-56"  )
MODULE_ALIAS ( "sound-layout-57"  )
MODULE_ALIAS ( "sound-layout-58"  )
MODULE_ALIAS ( "sound-layout-60"  )
MODULE_ALIAS ( "sound-layout-61"  )
MODULE_ALIAS ( "sound-layout-62"  )
MODULE_ALIAS ( "sound-layout-64"  )
MODULE_ALIAS ( "sound-layout-65"  )
MODULE_ALIAS ( "sound-layout-66"  )
MODULE_ALIAS ( "sound-layout-67"  )
MODULE_ALIAS ( "sound-layout-68"  )
MODULE_ALIAS ( "sound-layout-69"  )
MODULE_ALIAS ( "sound-layout-70"  )
MODULE_ALIAS ( "sound-layout-72"  )
MODULE_ALIAS ( "sound-layout-76"  )
MODULE_ALIAS ( "sound-layout-80"  )
MODULE_ALIAS ( "sound-layout-82"  )
MODULE_ALIAS ( "sound-layout-84"  )
MODULE_ALIAS ( "sound-layout-86"  )
MODULE_ALIAS ( "sound-layout-90"  )
MODULE_ALIAS ( "sound-layout-92"  )
MODULE_ALIAS ( "sound-layout-94"  )
MODULE_ALIAS ( "sound-layout-96"  )
MODULE_ALIAS ( "sound-layout-98"  )
MODULE_ALIAS ( "sound-layout-100"  )
MODULE_ALIAS ( "aoa-device-id-14"  )
MODULE_ALIAS ( "aoa-device-id-22"  )
MODULE_ALIAS ( "aoa-device-id-35"  )
MODULE_AUTHOR ( "Johannes Berg <[email protected]>"  )
MODULE_DESCRIPTION ( "Layout-ID fabric for snd-aoa"  )
module_exit ( aoa_fabric_layout_exit  )
module_init ( aoa_fabric_layout_init  )
MODULE_LICENSE ( "GPL"  )