aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPaul Bolle <pebolle@tiscali.nl>2011-03-11 05:37:55 -0500
committerTakashi Iwai <tiwai@suse.de>2011-03-11 09:22:02 -0500
commita6e8509f2172a6ac764a82763fce64836a108a14 (patch)
tree2604dee920eb75250cc8337de3eff373f832d8fc /sound
parent5cd2ad81f912c8535491f541108b655f4552dff9 (diff)
ALSA: intel8x0m: add 'm' as "suffix" to static functions
Adding an 'm' will distinguish them from identical names in intel8x0.c. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/intel8x0m.c98
1 files changed, 49 insertions, 49 deletions
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c
index b1c926cd281b..8716b291cb7d 100644
--- a/sound/pci/intel8x0m.c
+++ b/sound/pci/intel8x0m.c
@@ -341,9 +341,9 @@ static int snd_intel8x0m_codec_semaphore(struct intel8x0m *chip, unsigned int co
341 return -EBUSY; 341 return -EBUSY;
342} 342}
343 343
344static void snd_intel8x0_codec_write(struct snd_ac97 *ac97, 344static void snd_intel8x0m_codec_write(struct snd_ac97 *ac97,
345 unsigned short reg, 345 unsigned short reg,
346 unsigned short val) 346 unsigned short val)
347{ 347{
348 struct intel8x0m *chip = ac97->private_data; 348 struct intel8x0m *chip = ac97->private_data;
349 349
@@ -354,8 +354,8 @@ static void snd_intel8x0_codec_write(struct snd_ac97 *ac97,
354 iaputword(chip, reg + ac97->num * 0x80, val); 354 iaputword(chip, reg + ac97->num * 0x80, val);
355} 355}
356 356
357static unsigned short snd_intel8x0_codec_read(struct snd_ac97 *ac97, 357static unsigned short snd_intel8x0m_codec_read(struct snd_ac97 *ac97,
358 unsigned short reg) 358 unsigned short reg)
359{ 359{
360 struct intel8x0m *chip = ac97->private_data; 360 struct intel8x0m *chip = ac97->private_data;
361 unsigned short res; 361 unsigned short res;
@@ -385,7 +385,7 @@ static unsigned short snd_intel8x0_codec_read(struct snd_ac97 *ac97,
385/* 385/*
386 * DMA I/O 386 * DMA I/O
387 */ 387 */
388static void snd_intel8x0_setup_periods(struct intel8x0m *chip, struct ichdev *ichdev) 388static void snd_intel8x0m_setup_periods(struct intel8x0m *chip, struct ichdev *ichdev)
389{ 389{
390 int idx; 390 int idx;
391 u32 *bdbar = ichdev->bdbar; 391 u32 *bdbar = ichdev->bdbar;
@@ -437,7 +437,7 @@ static void snd_intel8x0_setup_periods(struct intel8x0m *chip, struct ichdev *ic
437 * Interrupt handler 437 * Interrupt handler
438 */ 438 */
439 439
440static inline void snd_intel8x0_update(struct intel8x0m *chip, struct ichdev *ichdev) 440static inline void snd_intel8x0m_update(struct intel8x0m *chip, struct ichdev *ichdev)
441{ 441{
442 unsigned long port = ichdev->reg_offset; 442 unsigned long port = ichdev->reg_offset;
443 int civ, i, step; 443 int civ, i, step;
@@ -489,7 +489,7 @@ static inline void snd_intel8x0_update(struct intel8x0m *chip, struct ichdev *ic
489 iputbyte(chip, port + ichdev->roff_sr, ICH_FIFOE | ICH_BCIS | ICH_LVBCI); 489 iputbyte(chip, port + ichdev->roff_sr, ICH_FIFOE | ICH_BCIS | ICH_LVBCI);
490} 490}
491 491
492static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id) 492static irqreturn_t snd_intel8x0m_interrupt(int irq, void *dev_id)
493{ 493{
494 struct intel8x0m *chip = dev_id; 494 struct intel8x0m *chip = dev_id;
495 struct ichdev *ichdev; 495 struct ichdev *ichdev;
@@ -512,7 +512,7 @@ static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id)
512 for (i = 0; i < chip->bdbars_count; i++) { 512 for (i = 0; i < chip->bdbars_count; i++) {
513 ichdev = &chip->ichd[i]; 513 ichdev = &chip->ichd[i];
514 if (status & ichdev->int_sta_mask) 514 if (status & ichdev->int_sta_mask)
515 snd_intel8x0_update(chip, ichdev); 515 snd_intel8x0m_update(chip, ichdev);
516 } 516 }
517 517
518 /* ack them */ 518 /* ack them */
@@ -526,7 +526,7 @@ static irqreturn_t snd_intel8x0_interrupt(int irq, void *dev_id)
526 * PCM part 526 * PCM part
527 */ 527 */
528 528
529static int snd_intel8x0_pcm_trigger(struct snd_pcm_substream *substream, int cmd) 529static int snd_intel8x0m_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
530{ 530{
531 struct intel8x0m *chip = snd_pcm_substream_chip(substream); 531 struct intel8x0m *chip = snd_pcm_substream_chip(substream);
532 struct ichdev *ichdev = get_ichdev(substream); 532 struct ichdev *ichdev = get_ichdev(substream);
@@ -561,18 +561,18 @@ static int snd_intel8x0_pcm_trigger(struct snd_pcm_substream *substream, int cmd
561 return 0; 561 return 0;
562} 562}
563 563
564static int snd_intel8x0_hw_params(struct snd_pcm_substream *substream, 564static int snd_intel8x0m_hw_params(struct snd_pcm_substream *substream,
565 struct snd_pcm_hw_params *hw_params) 565 struct snd_pcm_hw_params *hw_params)
566{ 566{
567 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); 567 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
568} 568}
569 569
570static int snd_intel8x0_hw_free(struct snd_pcm_substream *substream) 570static int snd_intel8x0m_hw_free(struct snd_pcm_substream *substream)
571{ 571{
572 return snd_pcm_lib_free_pages(substream); 572 return snd_pcm_lib_free_pages(substream);
573} 573}
574 574
575static snd_pcm_uframes_t snd_intel8x0_pcm_pointer(struct snd_pcm_substream *substream) 575static snd_pcm_uframes_t snd_intel8x0m_pcm_pointer(struct snd_pcm_substream *substream)
576{ 576{
577 struct intel8x0m *chip = snd_pcm_substream_chip(substream); 577 struct intel8x0m *chip = snd_pcm_substream_chip(substream);
578 struct ichdev *ichdev = get_ichdev(substream); 578 struct ichdev *ichdev = get_ichdev(substream);
@@ -600,7 +600,7 @@ static int snd_intel8x0m_pcm_prepare(struct snd_pcm_substream *substream)
600 ichdev->fragsize = snd_pcm_lib_period_bytes(substream); 600 ichdev->fragsize = snd_pcm_lib_period_bytes(substream);
601 snd_ac97_write(ichdev->ac97, AC97_LINE1_RATE, runtime->rate); 601 snd_ac97_write(ichdev->ac97, AC97_LINE1_RATE, runtime->rate);
602 snd_ac97_write(ichdev->ac97, AC97_LINE1_LEVEL, 0); 602 snd_ac97_write(ichdev->ac97, AC97_LINE1_LEVEL, 0);
603 snd_intel8x0_setup_periods(chip, ichdev); 603 snd_intel8x0m_setup_periods(chip, ichdev);
604 return 0; 604 return 0;
605} 605}
606 606
@@ -682,22 +682,22 @@ static struct snd_pcm_ops snd_intel8x0m_playback_ops = {
682 .open = snd_intel8x0m_playback_open, 682 .open = snd_intel8x0m_playback_open,
683 .close = snd_intel8x0m_playback_close, 683 .close = snd_intel8x0m_playback_close,
684 .ioctl = snd_pcm_lib_ioctl, 684 .ioctl = snd_pcm_lib_ioctl,
685 .hw_params = snd_intel8x0_hw_params, 685 .hw_params = snd_intel8x0m_hw_params,
686 .hw_free = snd_intel8x0_hw_free, 686 .hw_free = snd_intel8x0m_hw_free,
687 .prepare = snd_intel8x0m_pcm_prepare, 687 .prepare = snd_intel8x0m_pcm_prepare,
688 .trigger = snd_intel8x0_pcm_trigger, 688 .trigger = snd_intel8x0m_pcm_trigger,
689 .pointer = snd_intel8x0_pcm_pointer, 689 .pointer = snd_intel8x0m_pcm_pointer,
690}; 690};
691 691
692static struct snd_pcm_ops snd_intel8x0m_capture_ops = { 692static struct snd_pcm_ops snd_intel8x0m_capture_ops = {
693 .open = snd_intel8x0m_capture_open, 693 .open = snd_intel8x0m_capture_open,
694 .close = snd_intel8x0m_capture_close, 694 .close = snd_intel8x0m_capture_close,
695 .ioctl = snd_pcm_lib_ioctl, 695 .ioctl = snd_pcm_lib_ioctl,
696 .hw_params = snd_intel8x0_hw_params, 696 .hw_params = snd_intel8x0m_hw_params,
697 .hw_free = snd_intel8x0_hw_free, 697 .hw_free = snd_intel8x0m_hw_free,
698 .prepare = snd_intel8x0m_pcm_prepare, 698 .prepare = snd_intel8x0m_pcm_prepare,
699 .trigger = snd_intel8x0_pcm_trigger, 699 .trigger = snd_intel8x0m_pcm_trigger,
700 .pointer = snd_intel8x0_pcm_pointer, 700 .pointer = snd_intel8x0m_pcm_pointer,
701}; 701};
702 702
703 703
@@ -710,7 +710,7 @@ struct ich_pcm_table {
710 int ac97_idx; 710 int ac97_idx;
711}; 711};
712 712
713static int __devinit snd_intel8x0_pcm1(struct intel8x0m *chip, int device, 713static int __devinit snd_intel8x0m_pcm1(struct intel8x0m *chip, int device,
714 struct ich_pcm_table *rec) 714 struct ich_pcm_table *rec)
715{ 715{
716 struct snd_pcm *pcm; 716 struct snd_pcm *pcm;
@@ -759,7 +759,7 @@ static struct ich_pcm_table intel_pcms[] __devinitdata = {
759 }, 759 },
760}; 760};
761 761
762static int __devinit snd_intel8x0_pcm(struct intel8x0m *chip) 762static int __devinit snd_intel8x0m_pcm(struct intel8x0m *chip)
763{ 763{
764 int i, tblsize, device, err; 764 int i, tblsize, device, err;
765 struct ich_pcm_table *tbl, *rec; 765 struct ich_pcm_table *tbl, *rec;
@@ -791,7 +791,7 @@ static int __devinit snd_intel8x0_pcm(struct intel8x0m *chip)
791 if (! chip->ichd[rec->ac97_idx].ac97) 791 if (! chip->ichd[rec->ac97_idx].ac97)
792 continue; 792 continue;
793 } 793 }
794 err = snd_intel8x0_pcm1(chip, device, rec); 794 err = snd_intel8x0m_pcm1(chip, device, rec);
795 if (err < 0) 795 if (err < 0)
796 return err; 796 return err;
797 device++; 797 device++;
@@ -806,20 +806,20 @@ static int __devinit snd_intel8x0_pcm(struct intel8x0m *chip)
806 * Mixer part 806 * Mixer part
807 */ 807 */
808 808
809static void snd_intel8x0_mixer_free_ac97_bus(struct snd_ac97_bus *bus) 809static void snd_intel8x0m_mixer_free_ac97_bus(struct snd_ac97_bus *bus)
810{ 810{
811 struct intel8x0m *chip = bus->private_data; 811 struct intel8x0m *chip = bus->private_data;
812 chip->ac97_bus = NULL; 812 chip->ac97_bus = NULL;
813} 813}
814 814
815static void snd_intel8x0_mixer_free_ac97(struct snd_ac97 *ac97) 815static void snd_intel8x0m_mixer_free_ac97(struct snd_ac97 *ac97)
816{ 816{
817 struct intel8x0m *chip = ac97->private_data; 817 struct intel8x0m *chip = ac97->private_data;
818 chip->ac97 = NULL; 818 chip->ac97 = NULL;
819} 819}
820 820
821 821
822static int __devinit snd_intel8x0_mixer(struct intel8x0m *chip, int ac97_clock) 822static int __devinit snd_intel8x0m_mixer(struct intel8x0m *chip, int ac97_clock)
823{ 823{
824 struct snd_ac97_bus *pbus; 824 struct snd_ac97_bus *pbus;
825 struct snd_ac97_template ac97; 825 struct snd_ac97_template ac97;
@@ -827,22 +827,22 @@ static int __devinit snd_intel8x0_mixer(struct intel8x0m *chip, int ac97_clock)
827 int err; 827 int err;
828 unsigned int glob_sta = 0; 828 unsigned int glob_sta = 0;
829 static struct snd_ac97_bus_ops ops = { 829 static struct snd_ac97_bus_ops ops = {
830 .write = snd_intel8x0_codec_write, 830 .write = snd_intel8x0m_codec_write,
831 .read = snd_intel8x0_codec_read, 831 .read = snd_intel8x0m_codec_read,
832 }; 832 };
833 833
834 chip->in_ac97_init = 1; 834 chip->in_ac97_init = 1;
835 835
836 memset(&ac97, 0, sizeof(ac97)); 836 memset(&ac97, 0, sizeof(ac97));
837 ac97.private_data = chip; 837 ac97.private_data = chip;
838 ac97.private_free = snd_intel8x0_mixer_free_ac97; 838 ac97.private_free = snd_intel8x0m_mixer_free_ac97;
839 ac97.scaps = AC97_SCAP_SKIP_AUDIO | AC97_SCAP_POWER_SAVE; 839 ac97.scaps = AC97_SCAP_SKIP_AUDIO | AC97_SCAP_POWER_SAVE;
840 840
841 glob_sta = igetdword(chip, ICHREG(GLOB_STA)); 841 glob_sta = igetdword(chip, ICHREG(GLOB_STA));
842 842
843 if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &pbus)) < 0) 843 if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &pbus)) < 0)
844 goto __err; 844 goto __err;
845 pbus->private_free = snd_intel8x0_mixer_free_ac97_bus; 845 pbus->private_free = snd_intel8x0m_mixer_free_ac97_bus;
846 if (ac97_clock >= 8000 && ac97_clock <= 48000) 846 if (ac97_clock >= 8000 && ac97_clock <= 48000)
847 pbus->clock = ac97_clock; 847 pbus->clock = ac97_clock;
848 chip->ac97_bus = pbus; 848 chip->ac97_bus = pbus;
@@ -960,7 +960,7 @@ static int snd_intel8x0m_ich_chip_init(struct intel8x0m *chip, int probing)
960 return 0; 960 return 0;
961} 961}
962 962
963static int snd_intel8x0_chip_init(struct intel8x0m *chip, int probing) 963static int snd_intel8x0m_chip_init(struct intel8x0m *chip, int probing)
964{ 964{
965 unsigned int i; 965 unsigned int i;
966 int err; 966 int err;
@@ -981,7 +981,7 @@ static int snd_intel8x0_chip_init(struct intel8x0m *chip, int probing)
981 return 0; 981 return 0;
982} 982}
983 983
984static int snd_intel8x0_free(struct intel8x0m *chip) 984static int snd_intel8x0m_free(struct intel8x0m *chip)
985{ 985{
986 unsigned int i; 986 unsigned int i;
987 987
@@ -1046,7 +1046,7 @@ static int intel8x0m_resume(struct pci_dev *pci)
1046 return -EIO; 1046 return -EIO;
1047 } 1047 }
1048 pci_set_master(pci); 1048 pci_set_master(pci);
1049 if (request_irq(pci->irq, snd_intel8x0_interrupt, 1049 if (request_irq(pci->irq, snd_intel8x0m_interrupt,
1050 IRQF_SHARED, card->shortname, chip)) { 1050 IRQF_SHARED, card->shortname, chip)) {
1051 printk(KERN_ERR "intel8x0m: unable to grab IRQ %d, " 1051 printk(KERN_ERR "intel8x0m: unable to grab IRQ %d, "
1052 "disabling device\n", pci->irq); 1052 "disabling device\n", pci->irq);
@@ -1054,7 +1054,7 @@ static int intel8x0m_resume(struct pci_dev *pci)
1054 return -EIO; 1054 return -EIO;
1055 } 1055 }
1056 chip->irq = pci->irq; 1056 chip->irq = pci->irq;
1057 snd_intel8x0_chip_init(chip, 0); 1057 snd_intel8x0m_chip_init(chip, 0);
1058 snd_ac97_resume(chip->ac97); 1058 snd_ac97_resume(chip->ac97);
1059 1059
1060 snd_power_change_state(card, SNDRV_CTL_POWER_D0); 1060 snd_power_change_state(card, SNDRV_CTL_POWER_D0);
@@ -1095,10 +1095,10 @@ static void __devinit snd_intel8x0m_proc_init(struct intel8x0m * chip)
1095#endif /* CONFIG_PROC_FS */ 1095#endif /* CONFIG_PROC_FS */
1096 1096
1097 1097
1098static int snd_intel8x0_dev_free(struct snd_device *device) 1098static int snd_intel8x0m_dev_free(struct snd_device *device)
1099{ 1099{
1100 struct intel8x0m *chip = device->device_data; 1100 struct intel8x0m *chip = device->device_data;
1101 return snd_intel8x0_free(chip); 1101 return snd_intel8x0m_free(chip);
1102} 1102}
1103 1103
1104struct ich_reg_info { 1104struct ich_reg_info {
@@ -1117,7 +1117,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card,
1117 unsigned int int_sta_masks; 1117 unsigned int int_sta_masks;
1118 struct ichdev *ichdev; 1118 struct ichdev *ichdev;
1119 static struct snd_device_ops ops = { 1119 static struct snd_device_ops ops = {
1120 .dev_free = snd_intel8x0_dev_free, 1120 .dev_free = snd_intel8x0m_dev_free,
1121 }; 1121 };
1122 static struct ich_reg_info intel_regs[2] = { 1122 static struct ich_reg_info intel_regs[2] = {
1123 { ICH_MIINT, 0 }, 1123 { ICH_MIINT, 0 },
@@ -1159,7 +1159,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card,
1159 chip->addr = pci_iomap(pci, 0, 0); 1159 chip->addr = pci_iomap(pci, 0, 0);
1160 if (!chip->addr) { 1160 if (!chip->addr) {
1161 snd_printk(KERN_ERR "AC'97 space ioremap problem\n"); 1161 snd_printk(KERN_ERR "AC'97 space ioremap problem\n");
1162 snd_intel8x0_free(chip); 1162 snd_intel8x0m_free(chip);
1163 return -EIO; 1163 return -EIO;
1164 } 1164 }
1165 if (pci_resource_flags(pci, 3) & IORESOURCE_MEM) /* ICH4 */ 1165 if (pci_resource_flags(pci, 3) & IORESOURCE_MEM) /* ICH4 */
@@ -1168,15 +1168,15 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card,
1168 chip->bmaddr = pci_iomap(pci, 1, 0); 1168 chip->bmaddr = pci_iomap(pci, 1, 0);
1169 if (!chip->bmaddr) { 1169 if (!chip->bmaddr) {
1170 snd_printk(KERN_ERR "Controller space ioremap problem\n"); 1170 snd_printk(KERN_ERR "Controller space ioremap problem\n");
1171 snd_intel8x0_free(chip); 1171 snd_intel8x0m_free(chip);
1172 return -EIO; 1172 return -EIO;
1173 } 1173 }
1174 1174
1175 port_inited: 1175 port_inited:
1176 if (request_irq(pci->irq, snd_intel8x0_interrupt, IRQF_SHARED, 1176 if (request_irq(pci->irq, snd_intel8x0m_interrupt, IRQF_SHARED,
1177 card->shortname, chip)) { 1177 card->shortname, chip)) {
1178 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1178 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1179 snd_intel8x0_free(chip); 1179 snd_intel8x0m_free(chip);
1180 return -EBUSY; 1180 return -EBUSY;
1181 } 1181 }
1182 chip->irq = pci->irq; 1182 chip->irq = pci->irq;
@@ -1211,7 +1211,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card,
1211 if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci), 1211 if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
1212 chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2, 1212 chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2,
1213 &chip->bdbars) < 0) { 1213 &chip->bdbars) < 0) {
1214 snd_intel8x0_free(chip); 1214 snd_intel8x0m_free(chip);
1215 return -ENOMEM; 1215 return -ENOMEM;
1216 } 1216 }
1217 /* tables must be aligned to 8 bytes here, but the kernel pages 1217 /* 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 chip->int_sta_reg = ICH_REG_GLOB_STA; 1226 chip->int_sta_reg = ICH_REG_GLOB_STA;
1227 chip->int_sta_mask = int_sta_masks; 1227 chip->int_sta_mask = int_sta_masks;
1228 1228
1229 if ((err = snd_intel8x0_chip_init(chip, 1)) < 0) { 1229 if ((err = snd_intel8x0m_chip_init(chip, 1)) < 0) {
1230 snd_intel8x0_free(chip); 1230 snd_intel8x0m_free(chip);
1231 return err; 1231 return err;
1232 } 1232 }
1233 1233
1234 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) { 1234 if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) {
1235 snd_intel8x0_free(chip); 1235 snd_intel8x0m_free(chip);
1236 return err; 1236 return err;
1237 } 1237 }
1238 1238
@@ -1296,11 +1296,11 @@ static int __devinit snd_intel8x0m_probe(struct pci_dev *pci,
1296 } 1296 }
1297 card->private_data = chip; 1297 card->private_data = chip;
1298 1298
1299 if ((err = snd_intel8x0_mixer(chip, ac97_clock)) < 0) { 1299 if ((err = snd_intel8x0m_mixer(chip, ac97_clock)) < 0) {
1300 snd_card_free(card); 1300 snd_card_free(card);
1301 return err; 1301 return err;
1302 } 1302 }
1303 if ((err = snd_intel8x0_pcm(chip)) < 0) { 1303 if ((err = snd_intel8x0m_pcm(chip)) < 0) {
1304 snd_card_free(card); 1304 snd_card_free(card);
1305 return err; 1305 return err;
1306 } 1306 }