···132132 mpu_irq - IRQ # for MPU-401 UART (PnP setup)133133 dma1 - first DMA # for AD1816A chip (PnP setup)134134 dma2 - second DMA # for AD1816A chip (PnP setup)135135+ clockfreq - Clock frequency for AD1816A chip (default = 0, 33000Hz)135136136137 Module supports up to 8 cards, autoprobe and PnP.137138
···3422342234233423 <para>34243424 The <structfield>iface</structfield> field specifies the type of34253425- the control,34263426- <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>. There are34273427- <constant>MIXER</constant>, <constant>PCM</constant>,34283428- <constant>CARD</constant>, etc.34253425+ the control, <constant>SNDRV_CTL_ELEM_IFACE_XXX</constant>, which34263426+ is usually <constant>MIXER</constant>.34273427+ Use <constant>CARD</constant> for global controls that are not34283428+ logically part of the mixer.34293429+ If the control is closely associated with some specific device on34303430+ the sound card, use <constant>HWDEP</constant>,34313431+ <constant>PCM</constant>, <constant>RAWMIDI</constant>,34323432+ <constant>TIMER</constant>, or <constant>SEQUENCER</constant>, and34333433+ specify the device number with the34343434+ <structfield>device</structfield> and34353435+ <structfield>subdevice</structfield> fields.34293436 </para>3430343734313438 <para>
+2
include/linux/sound.h
···2929 * Sound core interface functions3030 */31313232+struct device;3233extern int register_sound_special(struct file_operations *fops, int unit);3434+extern int register_sound_special_device(struct file_operations *fops, int unit, struct device *dev);3335extern int register_sound_mixer(struct file_operations *fops, int dev);3436extern int register_sound_midi(struct file_operations *fops, int dev);3537extern int register_sound_dsp(struct file_operations *fops, int dev);
+9
include/sound/ac97_codec.h
···2626 */27272828#include <linux/bitops.h>2929+#include <linux/device.h>2930#include "pcm.h"3031#include "control.h"3132#include "info.h"···375374#define AC97_HAS_NO_PC_BEEP (1<<12) /* no PC Beep volume */376375#define AC97_HAS_NO_VIDEO (1<<13) /* no Video volume */377376#define AC97_HAS_NO_CD (1<<14) /* no CD volume */377377+#define AC97_HAS_NO_MIC (1<<15) /* no MIC volume */378378+#define AC97_HAS_NO_TONE (1<<16) /* no Tone volume */379379+#define AC97_HAS_NO_STD_PCM (1<<17) /* no standard AC97 PCM volume and mute */378380379381/* rates indexes */380382#define AC97_RATES_FRONT_DAC 0···524520 /* jack-sharing info */525521 unsigned char indep_surround;526522 unsigned char channel_mode;523523+ struct device dev;527524};528525529526/* conditions */···604599 unsigned short mask;605600 const char **texts;606601};602602+603603+/* ad hoc AC97 device driver access */604604+extern struct bus_type ac97_bus_type;605605+607606#endif /* __SOUND_AC97_CODEC_H */
···11+/*22+ * Linux driver model AC97 bus interface33+ *44+ * Author: Nicolas Pitre55+ * Created: Jan 14, 200566+ * Copyright: (C) MontaVista Software Inc.77+ *88+ * This program is free software; you can redistribute it and/or modify99+ * it under the terms of the GNU General Public License as published by1010+ * the Free Software Foundation; either version 2 of the License, or1111+ * (at your option) any later version.1212+ */1313+1414+#include <linux/module.h>1515+#include <linux/init.h>1616+#include <linux/device.h>1717+#include <linux/string.h>1818+1919+/*2020+ * Codec families have names seperated by commas, so we search for an2121+ * individual codec name within the family string. 2222+ */2323+static int ac97_bus_match(struct device *dev, struct device_driver *drv)2424+{2525+ return (strstr(dev->bus_id, drv->name) != NULL);2626+}2727+2828+static int ac97_bus_suspend(struct device *dev, pm_message_t state)2929+{3030+ int ret = 0;3131+3232+ if (dev->driver && dev->driver->suspend) {3333+ ret = dev->driver->suspend(dev, state, SUSPEND_DISABLE);3434+ if (ret == 0)3535+ ret = dev->driver->suspend(dev, state, SUSPEND_SAVE_STATE);3636+ if (ret == 0)3737+ ret = dev->driver->suspend(dev, state, SUSPEND_POWER_DOWN);3838+ }3939+ return ret;4040+}4141+4242+static int ac97_bus_resume(struct device *dev)4343+{4444+ int ret = 0;4545+4646+ if (dev->driver && dev->driver->resume) {4747+ ret = dev->driver->resume(dev, RESUME_POWER_ON);4848+ if (ret == 0)4949+ ret = dev->driver->resume(dev, RESUME_RESTORE_STATE);5050+ if (ret == 0)5151+ ret = dev->driver->resume(dev, RESUME_ENABLE);5252+ }5353+ return ret;5454+}5555+5656+struct bus_type ac97_bus_type = {5757+ .name = "ac97",5858+ .match = ac97_bus_match,5959+ .suspend = ac97_bus_suspend,6060+ .resume = ac97_bus_resume,6161+};6262+6363+static int __init ac97_bus_init(void)6464+{6565+ return bus_register(&ac97_bus_type);6666+}6767+6868+subsys_initcall(ac97_bus_init);6969+7070+static void __exit ac97_bus_exit(void)7171+{7272+ bus_unregister(&ac97_bus_type);7373+}7474+7575+module_exit(ac97_bus_exit);7676+7777+EXPORT_SYMBOL(ac97_bus_type);7878+7979+MODULE_LICENSE("GPL");