Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15979
b: refs/heads/master
c: c8ff664
h: refs/heads/master
i:
  15977: da01ad2
  15975: 63e8469
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jan 3, 2006
1 parent 92e1355 commit beeb4d0
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 108 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cbdd0dd15f06a989c519089bb24023a5bfa66eaf
refs/heads/master: c8ff6647bb8a1865608b2d0c8565ca0ac47fb9b7
28 changes: 13 additions & 15 deletions trunk/include/sound/ad1848.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
#define AD1848_THINKPAD_CTL_PORT2 0x15e9
#define AD1848_THINKPAD_CS4248_ENABLE_BIT 0x02

struct _snd_ad1848 {
struct snd_ad1848 {
unsigned long port; /* i/o port */
struct resource *res_port;
int irq; /* IRQ line */
Expand All @@ -137,10 +137,10 @@ struct _snd_ad1848 {
unsigned short hardware; /* see to AD1848_HW_XXXX */
unsigned short single_dma:1; /* forced single DMA mode (GUS 16-bit daughter board) or dma1 == dma2 */

snd_pcm_t *pcm;
snd_pcm_substream_t *playback_substream;
snd_pcm_substream_t *capture_substream;
snd_card_t *card;
struct snd_pcm *pcm;
struct snd_pcm_substream *playback_substream;
struct snd_pcm_substream *capture_substream;
struct snd_card *card;

unsigned char image[32]; /* SGalaxy needs an access to extended registers */
int mce_bit;
Expand All @@ -152,21 +152,19 @@ struct _snd_ad1848 {
struct semaphore open_mutex;
};

typedef struct _snd_ad1848 ad1848_t;

/* exported functions */

void snd_ad1848_out(ad1848_t *chip, unsigned char reg, unsigned char value);
void snd_ad1848_out(struct snd_ad1848 *chip, unsigned char reg, unsigned char value);

int snd_ad1848_create(snd_card_t * card,
int snd_ad1848_create(struct snd_card *card,
unsigned long port,
int irq, int dma,
unsigned short hardware,
ad1848_t ** chip);
struct snd_ad1848 ** chip);

int snd_ad1848_pcm(ad1848_t * chip, int device, snd_pcm_t **rpcm);
const snd_pcm_ops_t *snd_ad1848_get_pcm_ops(int direction);
int snd_ad1848_mixer(ad1848_t * chip);
int snd_ad1848_pcm(struct snd_ad1848 * chip, int device, struct snd_pcm **rpcm);
const struct snd_pcm_ops *snd_ad1848_get_pcm_ops(int direction);
int snd_ad1848_mixer(struct snd_ad1848 * chip);

/* exported mixer stuffs */
enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE };
Expand All @@ -176,7 +174,7 @@ enum { AD1848_MIX_SINGLE, AD1848_MIX_DOUBLE, AD1848_MIX_CAPTURE };
#define AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) \
((left_reg) | ((right_reg) << 8) | ((shift_left) << 16) | ((shift_right) << 19) | ((mask) << 24) | ((invert) << 22))

int snd_ad1848_add_ctl(ad1848_t *chip, const char *name, int index, int type, unsigned long value);
int snd_ad1848_add_ctl(struct snd_ad1848 *chip, const char *name, int index, int type, unsigned long value);

/* for ease of use */
struct ad1848_mix_elem {
Expand All @@ -198,7 +196,7 @@ struct ad1848_mix_elem {
.type = AD1848_MIX_DOUBLE, \
.private_value = AD1848_MIXVAL_DOUBLE(left_reg, right_reg, shift_left, shift_right, mask, invert) }

static inline int snd_ad1848_add_ctl_elem(ad1848_t *chip, const struct ad1848_mix_elem *c)
static inline int snd_ad1848_add_ctl_elem(struct snd_ad1848 *chip, const struct ad1848_mix_elem *c)
{
return snd_ad1848_add_ctl(chip, c->name, c->index, c->type, c->private_value);
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/sound/isa/ad1848/ad1848.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ MODULE_PARM_DESC(dma1, "DMA1 # for AD1848 driver.");
module_param_array(thinkpad, bool, NULL, 0444);
MODULE_PARM_DESC(thinkpad, "Enable only for the onboard CS4248 of IBM Thinkpad 360/750/755 series.");

static snd_card_t *snd_ad1848_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
static struct snd_card *snd_ad1848_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;


static int __init snd_card_ad1848_probe(int dev)
{
snd_card_t *card;
ad1848_t *chip;
snd_pcm_t *pcm;
struct snd_card *card;
struct snd_ad1848 *chip;
struct snd_pcm *pcm;
int err;

if (port[dev] == SNDRV_AUTO_PORT) {
Expand Down
Loading

0 comments on commit beeb4d0

Please sign in to comment.