Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
msnd_pinnacle_mixer.c File Reference
#include <linux/io.h>
#include <linux/export.h>
#include <sound/core.h>
#include <sound/control.h>
#include "msnd.h"
#include "msnd_pinnacle.h"

Go to the source code of this file.

Macros

#define MSND_MIXER_VOLUME   0
 
#define MSND_MIXER_PCM   1
 
#define MSND_MIXER_AUX   2 /* Input source 1 (aux1) */
 
#define MSND_MIXER_IMIX   3 /* Recording monitor */
 
#define MSND_MIXER_SYNTH   4
 
#define MSND_MIXER_SPEAKER   5
 
#define MSND_MIXER_LINE   6
 
#define MSND_MIXER_MIC   7
 
#define MSND_MIXER_RECLEV   11 /* Recording level */
 
#define MSND_MIXER_IGAIN   12 /* Input gain */
 
#define MSND_MIXER_OGAIN   13 /* Output gain */
 
#define MSND_MIXER_DIGITAL   17 /* Digital (input) 1 */
 
#define MSND_MASK_VOLUME   (1 << MSND_MIXER_VOLUME)
 
#define MSND_MASK_SYNTH   (1 << MSND_MIXER_SYNTH)
 
#define MSND_MASK_PCM   (1 << MSND_MIXER_PCM)
 
#define MSND_MASK_SPEAKER   (1 << MSND_MIXER_SPEAKER)
 
#define MSND_MASK_LINE   (1 << MSND_MIXER_LINE)
 
#define MSND_MASK_MIC   (1 << MSND_MIXER_MIC)
 
#define MSND_MASK_IMIX   (1 << MSND_MIXER_IMIX)
 
#define MSND_MASK_RECLEV   (1 << MSND_MIXER_RECLEV)
 
#define MSND_MASK_IGAIN   (1 << MSND_MIXER_IGAIN)
 
#define MSND_MASK_OGAIN   (1 << MSND_MIXER_OGAIN)
 
#define MSND_MASK_AUX   (1 << MSND_MIXER_AUX)
 
#define MSND_MASK_DIGITAL   (1 << MSND_MIXER_DIGITAL)
 
#define update_volm(a, b)
 
#define update_potm(d, s, ar)
 
#define update_pot(d, s, ar)
 
#define DUMMY_VOLUME(xname, xindex, addr)
 

Functions

int __devinit snd_msndmix_new (struct snd_card *card)
 
 EXPORT_SYMBOL (snd_msndmix_new)
 
void snd_msndmix_setup (struct snd_msnd *dev)
 
 EXPORT_SYMBOL (snd_msndmix_setup)
 
int snd_msndmix_force_recsrc (struct snd_msnd *dev, int recsrc)
 
 EXPORT_SYMBOL (snd_msndmix_force_recsrc)
 

Macro Definition Documentation

#define DUMMY_VOLUME (   xname,
  xindex,
  addr 
)
Value:
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .index = xindex, \
.info = snd_msndmix_volume_info, \
.get = snd_msndmix_volume_get, .put = snd_msndmix_volume_put, \
.private_value = addr }

Definition at line 281 of file msnd_pinnacle_mixer.c.

#define MSND_MASK_AUX   (1 << MSND_MIXER_AUX)

Definition at line 52 of file msnd_pinnacle_mixer.c.

#define MSND_MASK_DIGITAL   (1 << MSND_MIXER_DIGITAL)

Definition at line 53 of file msnd_pinnacle_mixer.c.

#define MSND_MASK_IGAIN   (1 << MSND_MIXER_IGAIN)

Definition at line 50 of file msnd_pinnacle_mixer.c.

#define MSND_MASK_IMIX   (1 << MSND_MIXER_IMIX)

Definition at line 48 of file msnd_pinnacle_mixer.c.

#define MSND_MASK_LINE   (1 << MSND_MIXER_LINE)

Definition at line 46 of file msnd_pinnacle_mixer.c.

#define MSND_MASK_MIC   (1 << MSND_MIXER_MIC)

Definition at line 47 of file msnd_pinnacle_mixer.c.

#define MSND_MASK_OGAIN   (1 << MSND_MIXER_OGAIN)

Definition at line 51 of file msnd_pinnacle_mixer.c.

#define MSND_MASK_PCM   (1 << MSND_MIXER_PCM)

Definition at line 44 of file msnd_pinnacle_mixer.c.

#define MSND_MASK_RECLEV   (1 << MSND_MIXER_RECLEV)

Definition at line 49 of file msnd_pinnacle_mixer.c.

#define MSND_MASK_SPEAKER   (1 << MSND_MIXER_SPEAKER)

Definition at line 45 of file msnd_pinnacle_mixer.c.

#define MSND_MASK_SYNTH   (1 << MSND_MIXER_SYNTH)

Definition at line 43 of file msnd_pinnacle_mixer.c.

#define MSND_MASK_VOLUME   (1 << MSND_MIXER_VOLUME)

Definition at line 42 of file msnd_pinnacle_mixer.c.

#define MSND_MIXER_AUX   2 /* Input source 1 (aux1) */

Definition at line 29 of file msnd_pinnacle_mixer.c.

#define MSND_MIXER_DIGITAL   17 /* Digital (input) 1 */

Definition at line 38 of file msnd_pinnacle_mixer.c.

#define MSND_MIXER_IGAIN   12 /* Input gain */

Definition at line 36 of file msnd_pinnacle_mixer.c.

#define MSND_MIXER_IMIX   3 /* Recording monitor */

Definition at line 30 of file msnd_pinnacle_mixer.c.

#define MSND_MIXER_LINE   6

Definition at line 33 of file msnd_pinnacle_mixer.c.

#define MSND_MIXER_MIC   7

Definition at line 34 of file msnd_pinnacle_mixer.c.

#define MSND_MIXER_OGAIN   13 /* Output gain */

Definition at line 37 of file msnd_pinnacle_mixer.c.

#define MSND_MIXER_PCM   1

Definition at line 28 of file msnd_pinnacle_mixer.c.

#define MSND_MIXER_RECLEV   11 /* Recording level */

Definition at line 35 of file msnd_pinnacle_mixer.c.

#define MSND_MIXER_SPEAKER   5

Definition at line 32 of file msnd_pinnacle_mixer.c.

#define MSND_MIXER_SYNTH   4

Definition at line 31 of file msnd_pinnacle_mixer.c.

#define MSND_MIXER_VOLUME   0

Definition at line 27 of file msnd_pinnacle_mixer.c.

#define update_pot (   d,
  s,
  ar 
)
Value:
do { \
writeb(dev->left_levels[d] >> 8, \
dev->SMA + SMA_##s##Left); \
writeb(dev->right_levels[d] >> 8, \
dev->SMA + SMA_##s##Right); \
if (snd_msnd_send_word(dev, 0, 0, ar) == 0) \
snd_msnd_send_dsp_cmd(dev, HDEX_AUX_REQ); \
} while (0);

Definition at line 182 of file msnd_pinnacle_mixer.c.

#define update_potm (   d,
  s,
  ar 
)
Value:
do { \
writeb((dev->left_levels[d] >> 8) * \
readw(dev->SMA + SMA_wCurrMastVolLeft) / 0xffff, \
dev->SMA + SMA_##s##Left); \
writeb((dev->right_levels[d] >> 8) * \
readw(dev->SMA + SMA_wCurrMastVolRight) / 0xffff, \
dev->SMA + SMA_##s##Right); \
if (snd_msnd_send_word(dev, 0, 0, ar) == 0) \
snd_msnd_send_dsp_cmd(dev, HDEX_AUX_REQ); \
} while (0);

Definition at line 170 of file msnd_pinnacle_mixer.c.

#define update_volm (   a,
  b 
)
Value:
do { \
writew((dev->left_levels[a] >> 1) * \
readw(dev->SMA + SMA_wCurrMastVolLeft) / 0xffff, \
dev->SMA + SMA_##b##Left); \
writew((dev->right_levels[a] >> 1) * \
readw(dev->SMA + SMA_wCurrMastVolRight) / 0xffff, \
dev->SMA + SMA_##b##Right); \
} while (0);

Definition at line 160 of file msnd_pinnacle_mixer.c.

Function Documentation

EXPORT_SYMBOL ( snd_msndmix_new  )
EXPORT_SYMBOL ( snd_msndmix_setup  )
EXPORT_SYMBOL ( snd_msndmix_force_recsrc  )
int snd_msndmix_force_recsrc ( struct snd_msnd dev,
int  recsrc 
)

Definition at line 339 of file msnd_pinnacle_mixer.c.

int __devinit snd_msndmix_new ( struct snd_card card)

Definition at line 305 of file msnd_pinnacle_mixer.c.

void snd_msndmix_setup ( struct snd_msnd dev)

Definition at line 326 of file msnd_pinnacle_mixer.c.