~ubuntu-branches/ubuntu/trusty/linux-armadaxp/trusty

« back to all changes in this revision

Viewing changes to Documentation/DocBook/writing-an-alsa-driver.tmpl

  • Committer: Package Import Robot
  • Author(s): Michael Casadevall, Bryan Wu, Dann Frazier, Michael Casadeall
  • Date: 2012-03-10 15:00:54 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120310150054-flugb39zon8vvgwe
Tags: 3.2.0-1600.1
[ Bryan Wu ]
* UBUNTU: import debian/debian.env and debian.armadaxp

[ Dann Frazier ]
* ARM: Armada XP: remove trailing '/' in dirnames in mvRules.mk

[ Michael Casadeall ]
* tools: add some tools for Marvell Armada XP processor
* kernel: timer tick hacking from Marvell
* kernel: Sheeva Errata: add delay on Sheeva when powering down
* net: add Marvell NFP netfilter
* net: socket and skb modifications made by Marvell
* miscdevice: add minor IDs for some Marvell Armada drivers
* fs: introduce memory pool for splice()
* video: EDID detection updates from Marvell Armada XP patchset
* video: backlight: add Marvell Dove LCD backlight driver
* video: display: add THS8200 display driver
* video: framebuffer: add Marvell Dove and Armada XP processor onchip LCD controller driver
* usbtest: add Interrupt transfer testing by Marvell Armada XP code
* usb: ehci: add support for Marvell EHCI controler
* tty/serial: 8250: add support for Marvell Armada XP processor and DeviceTree work
* rtc: add support for Marvell Armada XP onchip RTC controller
* net: pppoe: add Marvell ethernet NFP hook in PPPoE networking driver
* mtd: nand: add support for Marvell Armada XP Nand Flash Controller
* mtd: maps: add Marvell Armada XP specific map driver
* mmc: add support for Marvell Armada XP MMC/SD host controller
* i2c: add support for Marvell Armada XP onchip i2c bus controller
* hwmon: add Kconfig option for Armada XP onchip thermal sensor driver
* dmaengine: add Net DMA support for splice and update Marvell XOR DMA engine driver
* ata: add support for Marvell Armada XP SATA controller and update some quirks
* ARM: add Marvell Armada XP machine to mach-types
* ARM: oprofile: add support for Marvell PJ4B core
* ARM: mm: more ARMv6 switches for Marvell Armada XP
* ARM: remove static declaration to allow compilation
* ARM: alignment access fault trick
* ARM: mm: skip some fault fixing when run on NONE SMP ARMv6 mode during early abort event
* ARM: mm: add Marvell Sheeva CPU Architecture for PJ4B
* ARM: introduce optimized copy operation for Marvell Armada XP
* ARM: SAUCE: hardware breakpoint trick for Marvell Armada XP
* ARM: big endian and little endian tricks for Marvell Armada XP
* ARM: SAUCE: Add Marvell Armada XP build rules to arch/arm/kernel/Makefile
* ARM: vfp: add special handling for Marvell Armada XP
* ARM: add support for Marvell U-Boot
* ARM: add mv_controller_num for ARM PCI drivers
* ARM: add support for local PMUs, general SMP tweaks and cache flushing
* ARM: add Marvell device identifies in glue-proc.h
* ARM: add IPC driver support for Marvell platforms
* ARM: add DMA mapping for Marvell platforms
* ARM: add Sheeva errata and PJ4B code for booting
* ARM: update Kconfig and Makefile to include Marvell Armada XP platforms
* ARM: Armada XP: import LSP from Marvell for Armada XP 3.2 kernel enablement

Show diffs side-by-side

added added

removed removed

Lines of Context:
1164
1164
          }
1165
1165
          chip->port = pci_resource_start(pci, 0);
1166
1166
          if (request_irq(pci->irq, snd_mychip_interrupt,
1167
 
                          IRQF_SHARED, "My Chip", chip)) {
 
1167
                          IRQF_SHARED, KBUILD_MODNAME, chip)) {
1168
1168
                  printk(KERN_ERR "cannot grab irq %d\n", pci->irq);
1169
1169
                  snd_mychip_free(chip);
1170
1170
                  return -EBUSY;
1197
1197
 
1198
1198
  /* pci_driver definition */
1199
1199
  static struct pci_driver driver = {
1200
 
          .name = "My Own Chip",
 
1200
          .name = KBUILD_MODNAME,
1201
1201
          .id_table = snd_mychip_ids,
1202
1202
          .probe = snd_mychip_probe,
1203
1203
          .remove = __devexit_p(snd_mychip_remove),
1340
1340
          <programlisting>
1341
1341
<![CDATA[
1342
1342
  if (request_irq(pci->irq, snd_mychip_interrupt,
1343
 
                  IRQF_SHARED, "My Chip", chip)) {
 
1343
                  IRQF_SHARED, KBUILD_MODNAME, chip)) {
1344
1344
          printk(KERN_ERR "cannot grab irq %d\n", pci->irq);
1345
1345
          snd_mychip_free(chip);
1346
1346
          return -EBUSY;
1616
1616
          <programlisting>
1617
1617
<![CDATA[
1618
1618
  static struct pci_driver driver = {
1619
 
          .name = "My Own Chip",
 
1619
          .name = KBUILD_MODNAME,
1620
1620
          .id_table = snd_mychip_ids,
1621
1621
          .probe = snd_mychip_probe,
1622
1622
          .remove = __devexit_p(snd_mychip_remove),
4288
4288
<![CDATA[
4289
4289
  struct snd_rawmidi *rmidi;
4290
4290
  snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, port, info_flags,
4291
 
                      irq, irq_flags, &rmidi);
 
4291
                      irq, &rmidi);
4292
4292
]]>
4293
4293
          </programlisting>
4294
4294
        </informalexample>
4343
4343
        by itself to start processing the output stream in the irq handler.
4344
4344
        </para>
4345
4345
 
 
4346
        <para>
 
4347
        If the MPU-401 interface shares its interrupt with the other logical
 
4348
        devices on the card, set <constant>MPU401_INFO_IRQ_HOOK</constant>
 
4349
        (see <link linkend="midi-interface-interrupt-handler"><citetitle>
 
4350
        below</citetitle></link>).
 
4351
        </para>
 
4352
 
4346
4353
      <para>
4347
4354
        Usually, the port address corresponds to the command port and
4348
4355
        port + 1 corresponds to the data port. If not, you may change
4375
4382
      </para>
4376
4383
 
4377
4384
      <para>
4378
 
        The 6th argument specifies the irq number for UART. If the irq
4379
 
      is already allocated, pass 0 to the 7th argument
4380
 
      (<parameter>irq_flags</parameter>). Otherwise, pass the flags
4381
 
      for irq allocation 
4382
 
      (<constant>SA_XXX</constant> bits) to it, and the irq will be
4383
 
      reserved by the mpu401-uart layer. If the card doesn't generate
4384
 
      UART interrupts, pass -1 as the irq number. Then a timer
4385
 
      interrupt will be invoked for polling. 
 
4385
        The 6th argument specifies the ISA irq number that will be
 
4386
        allocated.  If no interrupt is to be allocated (because your
 
4387
        code is already allocating a shared interrupt, or because the
 
4388
        device does not use interrupts), pass -1 instead.
 
4389
        For a MPU-401 device without an interrupt, a polling timer
 
4390
        will be used instead.
4386
4391
      </para>
4387
4392
    </section>
4388
4393
 
4390
4395
      <title>Interrupt Handler</title>
4391
4396
      <para>
4392
4397
        When the interrupt is allocated in
4393
 
      <function>snd_mpu401_uart_new()</function>, the private
4394
 
      interrupt handler is used, hence you don't have anything else to do
4395
 
      than creating the mpu401 stuff. Otherwise, you have to call
4396
 
      <function>snd_mpu401_uart_interrupt()</function> explicitly when
4397
 
      a UART interrupt is invoked and checked in your own interrupt
4398
 
      handler.  
 
4398
      <function>snd_mpu401_uart_new()</function>, an exclusive ISA
 
4399
      interrupt handler is automatically used, hence you don't have
 
4400
      anything else to do than creating the mpu401 stuff.  Otherwise, you
 
4401
      have to set <constant>MPU401_INFO_IRQ_HOOK</constant>, and call
 
4402
      <function>snd_mpu401_uart_interrupt()</function> explicitly from your
 
4403
      own interrupt handler when it has determined that a UART interrupt
 
4404
      has occurred.
4399
4405
      </para>
4400
4406
 
4401
4407
      <para>
5816
5822
        <programlisting>
5817
5823
<![CDATA[
5818
5824
  static struct pci_driver driver = {
5819
 
          .name = "My Chip",
 
5825
          .name = KBUILD_MODNAME,
5820
5826
          .id_table = snd_my_ids,
5821
5827
          .probe = snd_my_probe,
5822
5828
          .remove = __devexit_p(snd_my_remove),