Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16029
b: refs/heads/master
c: db13154
h: refs/heads/master
i:
  16027: 155e733
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jan 3, 2006
1 parent 296ed12 commit f1c8fdc
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 78 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: e437e3d7c7fb656010f8f767d20215e67b847685
refs/heads/master: db13154843cb2c99a93e9feed575e906f6e0e455
24 changes: 12 additions & 12 deletions trunk/sound/pcmcia/pdaudiocf/pdaudiocf.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ MODULE_PARM_DESC(enable, "Enable " CARD_NAME " soundcard.");
*/

static dev_info_t dev_info = "snd-pdaudiocf";
static snd_card_t *card_list[SNDRV_CARDS];
static struct snd_card *card_list[SNDRV_CARDS];
static dev_link_t *dev_list;

/*
Expand All @@ -77,7 +77,7 @@ static void pdacf_release(dev_link_t *link)
/*
* destructor
*/
static int snd_pdacf_free(pdacf_t *pdacf)
static int snd_pdacf_free(struct snd_pdacf *pdacf)
{
dev_link_t *link = &pdacf->link;

Expand All @@ -94,9 +94,9 @@ static int snd_pdacf_free(pdacf_t *pdacf)
return 0;
}

static int snd_pdacf_dev_free(snd_device_t *device)
static int snd_pdacf_dev_free(struct snd_device *device)
{
pdacf_t *chip = device->device_data;
struct snd_pdacf *chip = device->device_data;
return snd_pdacf_free(chip);
}

Expand All @@ -108,9 +108,9 @@ static dev_link_t *snd_pdacf_attach(void)
client_reg_t client_reg; /* Register with cardmgr */
dev_link_t *link; /* Info for cardmgr */
int i, ret;
pdacf_t *pdacf;
snd_card_t *card;
static snd_device_ops_t ops = {
struct snd_pdacf *pdacf;
struct snd_card *card;
static struct snd_device_ops ops = {
.dev_free = snd_pdacf_dev_free,
};

Expand Down Expand Up @@ -194,10 +194,10 @@ static dev_link_t *snd_pdacf_attach(void)
*
* returns 0 if successful, or a negative error code.
*/
static int snd_pdacf_assign_resources(pdacf_t *pdacf, int port, int irq)
static int snd_pdacf_assign_resources(struct snd_pdacf *pdacf, int port, int irq)
{
int err;
snd_card_t *card = pdacf->card;
struct snd_card *card = pdacf->card;

snd_printdd(KERN_DEBUG "pdacf assign resources: port = 0x%x, irq = %d\n", port, irq);
pdacf->port = port;
Expand Down Expand Up @@ -231,7 +231,7 @@ static int snd_pdacf_assign_resources(pdacf_t *pdacf, int port, int irq)
*/
static void snd_pdacf_detach(dev_link_t *link)
{
pdacf_t *chip = link->priv;
struct snd_pdacf *chip = link->priv;

snd_printdd(KERN_DEBUG "pdacf_detach called\n");
/* Remove the interface data from the linked list */
Expand Down Expand Up @@ -261,7 +261,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
static void pdacf_config(dev_link_t *link)
{
client_handle_t handle = link->handle;
pdacf_t *pdacf = link->priv;
struct snd_pdacf *pdacf = link->priv;
tuple_t tuple;
cisparse_t *parse = NULL;
config_info_t conf;
Expand Down Expand Up @@ -318,7 +318,7 @@ static void pdacf_config(dev_link_t *link)
static int pdacf_event(event_t event, int priority, event_callback_args_t *args)
{
dev_link_t *link = args->client_data;
pdacf_t *chip = link->priv;
struct snd_pdacf *chip = link->priv;

switch (event) {
case CS_EVENT_CARD_REMOVAL:
Expand Down
30 changes: 15 additions & 15 deletions trunk/sound/pcmcia/pdaudiocf/pdaudiocf.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
#define PDAUDIOCF_STAT_IS_CONFIGURED (1<<1)
#define PDAUDIOCF_STAT_IS_SUSPENDED (1<<2)

typedef struct {
snd_card_t *card;
struct snd_pdacf {
struct snd_card *card;
int index;

unsigned long port;
Expand All @@ -96,12 +96,12 @@ typedef struct {
struct tasklet_struct tq;

spinlock_t ak4117_lock;
ak4117_t *ak4117;
struct ak4117 *ak4117;

unsigned int chip_status;

snd_pcm_t *pcm;
snd_pcm_substream_t *pcm_substream;
struct snd_pcm *pcm;
struct snd_pcm_substream *pcm_substream;
unsigned int pcm_running: 1;
unsigned int pcm_channels;
unsigned int pcm_swab;
Expand All @@ -118,28 +118,28 @@ typedef struct {
/* pcmcia stuff */
dev_link_t link;
dev_node_t node;
} pdacf_t;
};

static inline void pdacf_reg_write(pdacf_t *chip, unsigned char reg, unsigned short val)
static inline void pdacf_reg_write(struct snd_pdacf *chip, unsigned char reg, unsigned short val)
{
outw(chip->regmap[reg>>1] = val, chip->port + reg);
}

static inline unsigned short pdacf_reg_read(pdacf_t *chip, unsigned char reg)
static inline unsigned short pdacf_reg_read(struct snd_pdacf *chip, unsigned char reg)
{
return inw(chip->port + reg);
}

pdacf_t *snd_pdacf_create(snd_card_t *card);
int snd_pdacf_ak4117_create(pdacf_t *pdacf);
void snd_pdacf_powerdown(pdacf_t *chip);
struct snd_pdacf *snd_pdacf_create(struct snd_card *card);
int snd_pdacf_ak4117_create(struct snd_pdacf *pdacf);
void snd_pdacf_powerdown(struct snd_pdacf *chip);
#ifdef CONFIG_PM
int snd_pdacf_suspend(snd_card_t *card, pm_message_t state);
int snd_pdacf_resume(snd_card_t *card);
int snd_pdacf_suspend(struct snd_card *card, pm_message_t state);
int snd_pdacf_resume(struct snd_card *card);
#endif
int snd_pdacf_pcm_new(pdacf_t *chip);
int snd_pdacf_pcm_new(struct snd_pdacf *chip);
irqreturn_t pdacf_interrupt(int irq, void *dev, struct pt_regs *regs);
void pdacf_tasklet(unsigned long private_data);
void pdacf_reinit(pdacf_t *chip, int resume);
void pdacf_reinit(struct snd_pdacf *chip, int resume);

#endif /* __PDAUDIOCF_H */
42 changes: 21 additions & 21 deletions trunk/sound/pcmcia/pdaudiocf/pdaudiocf_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
static unsigned char pdacf_ak4117_read(void *private_data, unsigned char reg)
{
pdacf_t *chip = private_data;
struct snd_pdacf *chip = private_data;
unsigned long timeout;
unsigned long flags;
unsigned char res;
Expand Down Expand Up @@ -62,7 +62,7 @@ static unsigned char pdacf_ak4117_read(void *private_data, unsigned char reg)

static void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned char val)
{
pdacf_t *chip = private_data;
struct snd_pdacf *chip = private_data;
unsigned long timeout;
unsigned long flags;

Expand All @@ -81,7 +81,7 @@ static void pdacf_ak4117_write(void *private_data, unsigned char reg, unsigned c
}

#if 0
void pdacf_dump(pdacf_t *chip)
void pdacf_dump(struct snd_pdacf *chip)
{
printk("PDAUDIOCF DUMP (0x%lx):\n", chip->port);
printk("WPD : 0x%x\n", inw(chip->port + PDAUDIOCF_REG_WDP));
Expand All @@ -94,7 +94,7 @@ void pdacf_dump(pdacf_t *chip)
}
#endif

static int pdacf_reset(pdacf_t *chip, int powerdown)
static int pdacf_reset(struct snd_pdacf *chip, int powerdown)
{
u16 val;

Expand All @@ -117,7 +117,7 @@ static int pdacf_reset(pdacf_t *chip, int powerdown)
return 0;
}

void pdacf_reinit(pdacf_t *chip, int resume)
void pdacf_reinit(struct snd_pdacf *chip, int resume)
{
pdacf_reset(chip, 0);
if (resume)
Expand All @@ -127,10 +127,10 @@ void pdacf_reinit(pdacf_t *chip, int resume)
pdacf_reg_write(chip, PDAUDIOCF_REG_IER, chip->regmap[PDAUDIOCF_REG_IER>>1]);
}

static void pdacf_proc_read(snd_info_entry_t * entry,
snd_info_buffer_t * buffer)
static void pdacf_proc_read(struct snd_info_entry * entry,
struct snd_info_buffer *buffer)
{
pdacf_t *chip = entry->private_data;
struct snd_pdacf *chip = entry->private_data;
u16 tmp;

snd_iprintf(buffer, "PDAudioCF\n\n");
Expand All @@ -139,17 +139,17 @@ static void pdacf_proc_read(snd_info_entry_t * entry,

}

static void pdacf_proc_init(pdacf_t *chip)
static void pdacf_proc_init(struct snd_pdacf *chip)
{
snd_info_entry_t *entry;
struct snd_info_entry *entry;

if (! snd_card_proc_new(chip->card, "pdaudiocf", &entry))
snd_info_set_text_ops(entry, chip, 1024, pdacf_proc_read);
}

pdacf_t *snd_pdacf_create(snd_card_t *card)
struct snd_pdacf *snd_pdacf_create(struct snd_card *card)
{
pdacf_t *chip;
struct snd_pdacf *chip;

chip = kzalloc(sizeof(*chip), GFP_KERNEL);
if (chip == NULL)
Expand All @@ -164,9 +164,9 @@ pdacf_t *snd_pdacf_create(snd_card_t *card)
return chip;
}

static void snd_pdacf_ak4117_change(ak4117_t *ak4117, unsigned char c0, unsigned char c1)
static void snd_pdacf_ak4117_change(struct ak4117 *ak4117, unsigned char c0, unsigned char c1)
{
pdacf_t *chip = ak4117->change_callback_private;
struct snd_pdacf *chip = ak4117->change_callback_private;
unsigned long flags;
u16 val;

Expand All @@ -182,7 +182,7 @@ static void snd_pdacf_ak4117_change(ak4117_t *ak4117, unsigned char c0, unsigned
spin_unlock_irqrestore(&chip->reg_lock, flags);
}

int snd_pdacf_ak4117_create(pdacf_t *chip)
int snd_pdacf_ak4117_create(struct snd_pdacf *chip)
{
int err;
u16 val;
Expand Down Expand Up @@ -238,7 +238,7 @@ int snd_pdacf_ak4117_create(pdacf_t *chip)
return 0;
}

void snd_pdacf_powerdown(pdacf_t *chip)
void snd_pdacf_powerdown(struct snd_pdacf *chip)
{
u16 val;

Expand All @@ -255,9 +255,9 @@ void snd_pdacf_powerdown(pdacf_t *chip)

#ifdef CONFIG_PM

int snd_pdacf_suspend(snd_card_t *card, pm_message_t state)
int snd_pdacf_suspend(struct snd_card *card, pm_message_t state)
{
pdacf_t *chip = card->pm_private_data;
struct snd_pdacf *chip = card->pm_private_data;
u16 val;

snd_pcm_suspend_all(chip->pcm);
Expand All @@ -270,14 +270,14 @@ int snd_pdacf_suspend(snd_card_t *card, pm_message_t state)
return 0;
}

static inline int check_signal(pdacf_t *chip)
static inline int check_signal(struct snd_pdacf *chip)
{
return (chip->ak4117->rcs0 & AK4117_UNLCK) == 0;
}

int snd_pdacf_resume(snd_card_t *card)
int snd_pdacf_resume(struct snd_card *card)
{
pdacf_t *chip = card->pm_private_data;
struct snd_pdacf *chip = card->pm_private_data;
int timeout = 40;

pdacf_reinit(chip, 1);
Expand Down
6 changes: 3 additions & 3 deletions trunk/sound/pcmcia/pdaudiocf/pdaudiocf_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*/
irqreturn_t pdacf_interrupt(int irq, void *dev, struct pt_regs *regs)
{
pdacf_t *chip = dev;
struct snd_pdacf *chip = dev;
unsigned short stat;

if ((chip->chip_status & (PDAUDIOCF_STAT_IS_STALE|
Expand Down Expand Up @@ -204,7 +204,7 @@ static inline void pdacf_transfer_stereo24be(u8 *dst, u32 xor, unsigned int size
}
}

static void pdacf_transfer(pdacf_t *chip, unsigned int size, unsigned int off)
static void pdacf_transfer(struct snd_pdacf *chip, unsigned int size, unsigned int off)
{
unsigned long rdp_port = chip->port + PDAUDIOCF_REG_MD;
unsigned int xor = chip->pcm_xor;
Expand Down Expand Up @@ -258,7 +258,7 @@ static void pdacf_transfer(pdacf_t *chip, unsigned int size, unsigned int off)

void pdacf_tasklet(unsigned long private_data)
{
pdacf_t *chip = (pdacf_t *) private_data;
struct snd_pdacf *chip = (struct snd_pdacf *) private_data;
int size, off, cont, rdp, wdp;

if ((chip->chip_status & (PDAUDIOCF_STAT_IS_STALE|PDAUDIOCF_STAT_IS_CONFIGURED)) != PDAUDIOCF_STAT_IS_CONFIGURED)
Expand Down
Loading

0 comments on commit f1c8fdc

Please sign in to comment.