Commit a6e8509f authored by Paul Bolle's avatar Paul Bolle Committed by Takashi Iwai

ALSA: intel8x0m: add 'm' as "suffix" to static functions

Adding an 'm' will distinguish them from identical names in intel8x0.c.
Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 5cd2ad81
...@@ -341,9 +341,9 @@ static int snd_intel8x0m_codec_semaphore(struct intel8x0m *chip, unsigned int co ...@@ -341,9 +341,9 @@ static int snd_intel8x0m_codec_semaphore(struct intel8x0m *chip, unsigned int co
return -EBUSY; return -EBUSY;
} }
static void snd_intel8x0_codec_write(struct snd_ac97 *ac97, static void snd_intel8x0m_codec_write(struct snd_ac97 *ac97,
unsigned short reg, unsigned short reg,
unsigned short val) unsigned short val)
{ {
struct intel8x0m *chip = ac97->private_data; struct intel8x0m *chip = ac97->private_data;
...@@ -354,8 +354,8 @@ static void snd_intel8x0_codec_write(struct snd_ac97 *ac97, ...@@ -354,8 +354,8 @@ static void snd_intel8x0_codec_write(struct snd_ac97 *ac97,
iaputword(chip, reg + ac97->num * 0x80, val); iaputword(chip, reg + ac97->num * 0x80, val);
} }
static unsigned short snd_intel8x0_codec_read(struct snd_ac97 *ac97, static unsigned short snd_intel8x0m_codec_read(struct snd_ac97 *ac97,
unsigned short reg) unsigned short reg)
{ {
struct intel8x0m *chip = ac97->private_data; struct intel8x0m *chip = ac97->private_data;
unsigned short res; unsigned short res;
...@@ -385,7 +385,7 @@ static unsigned short snd_intel8x0_codec_read(struct snd_ac97 *ac97, ...@@ -385,7 +385,7 @@ static unsigned short snd_intel8x0_codec_read(struct snd_ac97 *ac97,
/* /*
* DMA I/O * DMA I/O
*/ */
static void snd_intel8x0_setup_periods(struct intel8x0m *chip, struct ichdev *ichdev) static void snd_intel8x0m_setup_periods(struct intel8x0m *chip, struct ichdev *ichdev)
{ {
int idx; int idx;
u32 *bdbar = ichdev->bdbar; u32 *bdbar = ichdev->bdbar;
...@@ -437,7 +437,7 @@ static void snd_intel8x0_setup_periods(struct intel8x0m *chip, struct ichdev *ic ...@@ -437,7 +437,7 @@ static void snd_intel8x0_setup_periods(struct intel8x0m *chip, struct ichdev *ic
* Interrupt handler * Interrupt handler
*/ */
static inline void snd_intel8x0_update(struct intel8x0m *chip, struct ichdev *ichdev) static inline void snd_intel8x0m_update(struct intel8x0m *chip, struct ichdev *ichdev)
{ {
unsigned long port = ichdev->reg_offset; unsigned long port = ichdev->reg_offset;
int civ, i, step; int civ, i, step;
...@@ -489,7 +489,7 @@ static inline void snd_intel8x0_update(struct intel8x0m *chip, struct ichdev *ic ...@@ -489,7 +489,7 @@ static inline void snd_intel8x0_update(struct intel8x0m *chip, struct ichdev *ic
iputbyte(chip, port + ichdev->roff_sr, ICH_FIFOE | ICH_BCIS | ICH_LVBCI); iputbyte(chip, port + ichdev->roff_sr, ICH_FIFOE | ICH_BCIS | ICH_LVBCI);
} }
static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id) static irqreturn_t snd_intel8x0m_interrupt(int irq, void *dev_id)
{ {
struct intel8x0m *chip = dev_id; struct intel8x0m *chip = dev_id;
struct ichdev *ichdev; struct ichdev *ichdev;
...@@ -512,7 +512,7 @@ static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id) ...@@ -512,7 +512,7 @@ static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id)
for (i = 0; i < chip->bdbars_count; i++) { for (i = 0; i < chip->bdbars_count; i++) {
ichdev = &chip->ichd[i]; ichdev = &chip->ichd[i];
if (status & ichdev->int_sta_mask) if (status & ichdev->int_sta_mask)
snd_intel8x0_update(chip, ichdev); snd_intel8x0m_update(chip, ichdev);
} }
/* ack them */ /* ack them */
...@@ -526,7 +526,7 @@ static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id) ...@@ -526,7 +526,7 @@ static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id)
* PCM part * PCM part
*/ */
static int snd_intel8x0_pcm_trigger(struct snd_pcm_substream *substream, int cmd) static int snd_intel8x0m_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{ {
struct intel8x0m *chip = snd_pcm_substream_chip(substream); struct intel8x0m *chip = snd_pcm_substream_chip(substream);
struct ichdev *ichdev = get_ichdev(substream); struct ichdev *ichdev = get_ichdev(substream);
...@@ -561,18 +561,18 @@ static int snd_intel8x0_pcm_trigger(struct snd_pcm_substream *substream, int cmd ...@@ -561,18 +561,18 @@ static int snd_intel8x0_pcm_trigger(struct snd_pcm_substream *substream, int cmd
return 0; return 0;
} }
static int snd_intel8x0_hw_params(struct snd_pcm_substream *substream, static int snd_intel8x0m_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params *hw_params) struct snd_pcm_hw_params *hw_params)
{ {
return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
} }
static int snd_intel8x0_hw_free(struct snd_pcm_substream *substream) static int snd_intel8x0m_hw_free(struct snd_pcm_substream *substream)
{ {
return snd_pcm_lib_free_pages(substream); return snd_pcm_lib_free_pages(substream);
} }
static snd_pcm_uframes_t snd_intel8x0_pcm_pointer(struct snd_pcm_substream *substream) static snd_pcm_uframes_t snd_intel8x0m_pcm_pointer(struct snd_pcm_substream *substream)
{ {
struct intel8x0m *chip = snd_pcm_substream_chip(substream); struct intel8x0m *chip = snd_pcm_substream_chip(substream);
struct ichdev *ichdev = get_ichdev(substream); struct ichdev *ichdev = get_ichdev(substream);
...@@ -600,7 +600,7 @@ static int snd_intel8x0m_pcm_prepare(struct snd_pcm_substream *substream) ...@@ -600,7 +600,7 @@ static int snd_intel8x0m_pcm_prepare(struct snd_pcm_substream *substream)
ichdev->fragsize = snd_pcm_lib_period_bytes(substream); ichdev->fragsize = snd_pcm_lib_period_bytes(substream);
snd_ac97_write(ichdev->ac97, AC97_LINE1_RATE, runtime->rate); snd_ac97_write(ichdev->ac97, AC97_LINE1_RATE, runtime->rate);
snd_ac97_write(ichdev->ac97, AC97_LINE1_LEVEL, 0); snd_ac97_write(ichdev->ac97, AC97_LINE1_LEVEL, 0);
snd_intel8x0_setup_periods(chip, ichdev); snd_intel8x0m_setup_periods(chip, ichdev);
return 0; return 0;
} }
...@@ -682,22 +682,22 @@ static struct snd_pcm_ops snd_intel8x0m_playback_ops = { ...@@ -682,22 +682,22 @@ static struct snd_pcm_ops snd_intel8x0m_playback_ops = {
.open = snd_intel8x0m_playback_open, .open = snd_intel8x0m_playback_open,
.close = snd_intel8x0m_playback_close, .close = snd_intel8x0m_playback_close,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
.hw_params = snd_intel8x0_hw_params, .hw_params = snd_intel8x0m_hw_params,
.hw_free = snd_intel8x0_hw_free, .hw_free = snd_intel8x0m_hw_free,
.prepare = snd_intel8x0m_pcm_prepare, .prepare = snd_intel8x0m_pcm_prepare,
.trigger = snd_intel8x0_pcm_trigger, .trigger = snd_intel8x0m_pcm_trigger,
.pointer = snd_intel8x0_pcm_pointer, .pointer = snd_intel8x0m_pcm_pointer,
}; };
static struct snd_pcm_ops snd_intel8x0m_capture_ops = { static struct snd_pcm_ops snd_intel8x0m_capture_ops = {
.open = snd_intel8x0m_capture_open, .open = snd_intel8x0m_capture_open,
.close = snd_intel8x0m_capture_close, .close = snd_intel8x0m_capture_close,
.ioctl = snd_pcm_lib_ioctl, .ioctl = snd_pcm_lib_ioctl,
.hw_params = snd_intel8x0_hw_params, .hw_params = snd_intel8x0m_hw_params,
.hw_free = snd_intel8x0_hw_free, .hw_free = snd_intel8x0m_hw_free,
.prepare = snd_intel8x0m_pcm_prepare, .prepare = snd_intel8x0m_pcm_prepare,
.trigger = snd_intel8x0_pcm_trigger, .trigger = snd_intel8x0m_pcm_trigger,
.pointer = snd_intel8x0_pcm_pointer, .pointer = snd_intel8x0m_pcm_pointer,
}; };
...@@ -710,7 +710,7 @@ struct ich_pcm_table { ...@@ -710,7 +710,7 @@ struct ich_pcm_table {
int ac97_idx; int ac97_idx;
}; };
static int __devinit snd_intel8x0_pcm1(struct intel8x0m *chip, int device, static int __devinit snd_intel8x0m_pcm1(struct intel8x0m *chip, int device,
struct ich_pcm_table *rec) struct ich_pcm_table *rec)
{ {
struct snd_pcm *pcm; struct snd_pcm *pcm;
...@@ -759,7 +759,7 @@ static struct ich_pcm_table intel_pcms[] __devinitdata = { ...@@ -759,7 +759,7 @@ static struct ich_pcm_table intel_pcms[] __devinitdata = {
}, },
}; };
static int __devinit snd_intel8x0_pcm(struct intel8x0m *chip) static int __devinit snd_intel8x0m_pcm(struct intel8x0m *chip)
{ {
int i, tblsize, device, err; int i, tblsize, device, err;
struct ich_pcm_table *tbl, *rec; struct ich_pcm_table *tbl, *rec;
...@@ -791,7 +791,7 @@ static int __devinit snd_intel8x0_pcm(struct intel8x0m *chip) ...@@ -791,7 +791,7 @@ static int __devinit snd_intel8x0_pcm(struct intel8x0m *chip)
if (! chip->ichd[rec->ac97_idx].ac97) if (! chip->ichd[rec->ac97_idx].ac97)
continue; continue;
} }
err = snd_intel8x0_pcm1(chip, device, rec); err = snd_intel8x0m_pcm1(chip, device, rec);
if (err < 0) if (err < 0)
return err; return err;
device++; device++;
...@@ -806,20 +806,20 @@ static int __devinit snd_intel8x0_pcm(struct intel8x0m *chip) ...@@ -806,20 +806,20 @@ static int __devinit snd_intel8x0_pcm(struct intel8x0m *chip)
* Mixer part * Mixer part
*/ */
static void snd_intel8x0_mixer_free_ac97_bus(struct snd_ac97_bus *bus) static void snd_intel8x0m_mixer_free_ac97_bus(struct snd_ac97_bus *bus)
{ {
struct intel8x0m *chip = bus->private_data; struct intel8x0m *chip = bus->private_data;
chip->ac97_bus = NULL; chip->ac97_bus = NULL;
} }
static void snd_intel8x0_mixer_free_ac97(struct snd_ac97 *ac97) static void snd_intel8x0m_mixer_free_ac97(struct snd_ac97 *ac97)
{ {
struct intel8x0m *chip = ac97->private_data; struct intel8x0m *chip = ac97->private_data;
chip->ac97 = NULL; chip->ac97 = NULL;
} }
static int __devinit snd_intel8x0_mixer(struct intel8x0m *chip, int ac97_clock) static int __devinit snd_intel8x0m_mixer(struct intel8x0m *chip, int ac97_clock)
{ {
struct snd_ac97_bus *pbus; struct snd_ac97_bus *pbus;
struct snd_ac97_template ac97; struct snd_ac97_template ac97;
...@@ -827,22 +827,22 @@ static int __devinit snd_intel8x0_mixer(struct intel8x0m *chip, int ac97_clock) ...@@ -827,22 +827,22 @@ static int __devinit snd_intel8x0_mixer(struct intel8x0m *chip, int ac97_clock)
int err; int err;
unsigned int glob_sta = 0; unsigned int glob_sta = 0;
static struct snd_ac97_bus_ops ops = { static struct snd_ac97_bus_ops ops = {
.write = snd_intel8x0_codec_write, .write = snd_intel8x0m_codec_write,
.read = snd_intel8x0_codec_read, .read = snd_intel8x0m_codec_read,
}; };
chip->in_ac97_init = 1; chip->in_ac97_init = 1;
memset(&ac97, 0, sizeof(ac97)); memset(&ac97, 0, sizeof(ac97));
ac97.private_data = chip; ac97.private_data = chip;
ac97.private_free = snd_intel8x0_mixer_free_ac97; ac97.private_free = snd_intel8x0m_mixer_free_ac97;
ac97.scaps = AC97_SCAP_SKIP_AUDIO | AC97_SCAP_POWER_SAVE; ac97.scaps = AC97_SCAP_SKIP_AUDIO | AC97_SCAP_POWER_SAVE;
glob_sta = igetdword(chip, ICHREG(GLOB_STA)); glob_sta = igetdword(chip, ICHREG(GLOB_STA));
if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &pbus)) < 0) if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &pbus)) < 0)
goto __err; goto __err;
pbus->private_free = snd_intel8x0_mixer_free_ac97_bus; pbus->private_free = snd_intel8x0m_mixer_free_ac97_bus;
if (ac97_clock >= 8000 && ac97_clock <= 48000) if (ac97_clock >= 8000 && ac97_clock <= 48000)
pbus->clock = ac97_clock; pbus->clock = ac97_clock;
chip->ac97_bus = pbus; chip->ac97_bus = pbus;
...@@ -960,7 +960,7 @@ static int snd_intel8x0m_ich_chip_init(struct intel8x0m *chip, int probing) ...@@ -960,7 +960,7 @@ static int snd_intel8x0m_ich_chip_init(struct intel8x0m *chip, int probing)
return 0; return 0;
} }
static int snd_intel8x0_chip_init(struct intel8x0m *chip, int probing) static int snd_intel8x0m_chip_init(struct intel8x0m *chip, int probing)
{ {
unsigned int i; unsigned int i;
int err; int err;
...@@ -981,7 +981,7 @@ static int snd_intel8x0_chip_init(struct intel8x0m *chip, int probing) ...@@ -981,7 +981,7 @@ static int snd_intel8x0_chip_init(struct intel8x0m *chip, int probing)
return 0; return 0;
} }
static int snd_intel8x0_free(struct intel8x0m *chip) static int snd_intel8x0m_free(struct intel8x0m *chip)
{ {
unsigned int i; unsigned int i;
...@@ -1046,7 +1046,7 @@ static int intel8x0m_resume(struct pci_dev *pci) ...@@ -1046,7 +1046,7 @@ static int intel8x0m_resume(struct pci_dev *pci)
return -EIO; return -EIO;
} }
pci_set_master(pci); pci_set_master(pci);
if (request_irq(pci->irq, snd_intel8x0_interrupt, if (request_irq(pci->irq, snd_intel8x0m_interrupt,
IRQF_SHARED, card->shortname, chip)) { IRQF_SHARED, card->shortname, chip)) {
printk(KERN_ERR "intel8x0m: unable to grab IRQ %d, " printk(KERN_ERR "intel8x0m: unable to grab IRQ %d, "
"disabling device\n", pci->irq); "disabling device\n", pci->irq);
...@@ -1054,7 +1054,7 @@ static int intel8x0m_resume(struct pci_dev *pci) ...@@ -1054,7 +1054,7 @@ static int intel8x0m_resume(struct pci_dev *pci)
return -EIO; return -EIO;
} }
chip->irq = pci->irq; chip->irq = pci->irq;
snd_intel8x0_chip_init(chip, 0); snd_intel8x0m_chip_init(chip, 0);
snd_ac97_resume(chip->ac97); snd_ac97_resume(chip->ac97);
snd_power_change_state(card, SNDRV_CTL_POWER_D0); snd_power_change_state(card, SNDRV_CTL_POWER_D0);
...@@ -1095,10 +1095,10 @@ static void __devinit snd_intel8x0m_proc_init(struct intel8x0m * chip) ...@@ -1095,10 +1095,10 @@ static void __devinit snd_intel8x0m_proc_init(struct intel8x0m * chip)
#endif /* CONFIG_PROC_FS */ #endif /* CONFIG_PROC_FS */
static int snd_intel8x0_dev_free(struct snd_device *device) static int snd_intel8x0m_dev_free(struct snd_device *device)
{ {
struct intel8x0m *chip = device->device_data; struct intel8x0m *chip = device->device_data;
return snd_intel8x0_free(chip); return snd_intel8x0m_free(chip);
} }
struct ich_reg_info { struct ich_reg_info {
...@@ -1117,7 +1117,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card, ...@@ -1117,7 +1117,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card,
unsigned int int_sta_masks; unsigned int int_sta_masks;
struct ichdev *ichdev; struct ichdev *ichdev;
static struct snd_device_ops ops = { static struct snd_device_ops ops = {
.dev_free = snd_intel8x0_dev_free, .dev_free = snd_intel8x0m_dev_free,
}; };
static struct ich_reg_info intel_regs[2] = { static struct ich_reg_info intel_regs[2] = {
{ ICH_MIINT, 0 }, { ICH_MIINT, 0 },
...@@ -1159,7 +1159,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card, ...@@ -1159,7 +1159,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card,
chip->addr = pci_iomap(pci, 0, 0); chip->addr = pci_iomap(pci, 0, 0);
if (!chip->addr) { if (!chip->addr) {
snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); snd_printk(KERN_ERR "AC'97 space ioremap problem\n");
snd_intel8x0_free(chip); snd_intel8x0m_free(chip);
return -EIO; return -EIO;
} }
if (pci_resource_flags(pci, 3) & IORESOURCE_MEM) /* ICH4 */ if (pci_resource_flags(pci, 3) & IORESOURCE_MEM) /* ICH4 */
...@@ -1168,15 +1168,15 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card, ...@@ -1168,15 +1168,15 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card,
chip->bmaddr = pci_iomap(pci, 1, 0); chip->bmaddr = pci_iomap(pci, 1, 0);
if (!chip->bmaddr) { if (!chip->bmaddr) {
snd_printk(KERN_ERR "Controller space ioremap problem\n"); snd_printk(KERN_ERR "Controller space ioremap problem\n");
snd_intel8x0_free(chip); snd_intel8x0m_free(chip);
return -EIO; return -EIO;
} }
port_inited: port_inited:
if (request_irq(pci->irq, snd_intel8x0_interrupt, IRQF_SHARED, if (request_irq(pci->irq, snd_intel8x0m_interrupt, IRQF_SHARED,
card->shortname, chip)) { card->shortname, chip)) {
snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
snd_intel8x0_free(chip); snd_intel8x0m_free(chip);
return -EBUSY; return -EBUSY;
} }
chip->irq = pci->irq; chip->irq = pci->irq;
...@@ -1211,7 +1211,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card, ...@@ -1211,7 +1211,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card,
if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2, chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2,
&chip->bdbars) < 0) { &chip->bdbars) < 0) {
snd_intel8x0_free(chip); snd_intel8x0m_free(chip);
return -ENOMEM; return -ENOMEM;
} }
/* tables must be aligned to 8 bytes here, but the kernel pages /* tables must be aligned to 8 bytes here, but the kernel pages
...@@ -1226,13 +1226,13 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card, ...@@ -1226,13 +1226,13 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card,
chip->int_sta_reg = ICH_REG_GLOB_STA; chip->int_sta_reg = ICH_REG_GLOB_STA;
chip->int_sta_mask = int_sta_masks; chip->int_sta_mask = int_sta_masks;
if ((err = snd_intel8x0_chip_init(chip, 1)) < 0) { if ((err = snd_intel8x0m_chip_init(chip, 1)) < 0) {
snd_intel8x0_free(chip); snd_intel8x0m_free(chip);
return err; return err;
} }
if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
snd_intel8x0_free(chip); snd_intel8x0m_free(chip);
return err; return err;
} }
...@@ -1296,11 +1296,11 @@ static int __devinit snd_intel8x0m_probe(struct pci_dev *pci, ...@@ -1296,11 +1296,11 @@ static int __devinit snd_intel8x0m_probe(struct pci_dev *pci,
} }
card->private_data = chip; card->private_data = chip;
if ((err = snd_intel8x0_mixer(chip, ac97_clock)) < 0) { if ((err = snd_intel8x0m_mixer(chip, ac97_clock)) < 0) {
snd_card_free(card); snd_card_free(card);
return err; return err;
} }
if ((err = snd_intel8x0_pcm(chip)) < 0) { if ((err = snd_intel8x0m_pcm(chip)) < 0) {
snd_card_free(card); snd_card_free(card);
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment