fm801.c (119690) | fm801.c (126695) |
---|---|
1/* 2 * Copyright (c) 2000 Dmitry Dicky diwil@dataart.com 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * SUCH DAMAGE. 25 */ 26 27#include <dev/sound/pcm/sound.h> 28#include <dev/sound/pcm/ac97.h> 29#include <dev/pci/pcireg.h> 30#include <dev/pci/pcivar.h> 31 | 1/* 2 * Copyright (c) 2000 Dmitry Dicky diwil@dataart.com 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 15 unchanged lines hidden (view full) --- 24 * SUCH DAMAGE. 25 */ 26 27#include <dev/sound/pcm/sound.h> 28#include <dev/sound/pcm/ac97.h> 29#include <dev/pci/pcireg.h> 30#include <dev/pci/pcivar.h> 31 |
32SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/fm801.c 119690 2003-09-02 17:30:40Z jhb $"); | 32SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/fm801.c 126695 2004-03-06 15:52:42Z matk $"); |
33 34#define PCI_VENDOR_FORTEMEDIA 0x1319 35#define PCI_DEVICE_FORTEMEDIA1 0x08011319 36#define PCI_DEVICE_FORTEMEDIA2 0x08021319 /* ??? have no idea what's this... */ 37 38#define FM_PCM_VOLUME 0x00 39#define FM_FM_VOLUME 0x02 40#define FM_I2S_VOLUME 0x04 --- 592 unchanged lines hidden (view full) --- 633 /*filter*/NULL, /*filterarg*/NULL, 634 /*maxsize*/fm801->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff, 635 /*flags*/0, /*lockfunc*/busdma_lock_mutex, 636 /*lockarg*/&Giant, &fm801->parent_dmat) != 0) { 637 device_printf(dev, "unable to create dma tag\n"); 638 goto oops; 639 } 640 | 33 34#define PCI_VENDOR_FORTEMEDIA 0x1319 35#define PCI_DEVICE_FORTEMEDIA1 0x08011319 36#define PCI_DEVICE_FORTEMEDIA2 0x08021319 /* ??? have no idea what's this... */ 37 38#define FM_PCM_VOLUME 0x00 39#define FM_FM_VOLUME 0x02 40#define FM_I2S_VOLUME 0x04 --- 592 unchanged lines hidden (view full) --- 633 /*filter*/NULL, /*filterarg*/NULL, 634 /*maxsize*/fm801->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff, 635 /*flags*/0, /*lockfunc*/busdma_lock_mutex, 636 /*lockarg*/&Giant, &fm801->parent_dmat) != 0) { 637 device_printf(dev, "unable to create dma tag\n"); 638 goto oops; 639 } 640 |
641 snprintf(status, 64, "at %s 0x%lx irq %ld", | 641 snprintf(status, 64, "at %s 0x%lx irq %ld %s", |
642 (fm801->regtype == SYS_RES_IOPORT)? "io" : "memory", | 642 (fm801->regtype == SYS_RES_IOPORT)? "io" : "memory", |
643 rman_get_start(fm801->reg), rman_get_start(fm801->irq)); | 643 rman_get_start(fm801->reg), rman_get_start(fm801->irq),PCM_KLDSTRING(snd_fm801)); |
644 645#define FM801_MAXPLAYCH 1 646 if (pcm_register(dev, fm801, FM801_MAXPLAYCH, 1)) goto oops; 647 pcm_addchan(dev, PCMDIR_PLAY, &fm801ch_class, fm801); 648 pcm_addchan(dev, PCMDIR_REC, &fm801ch_class, fm801); 649 pcm_setstatus(dev, status); 650 651 fm801->radio = device_add_child(dev, "radio", -1); --- 151 unchanged lines hidden --- | 644 645#define FM801_MAXPLAYCH 1 646 if (pcm_register(dev, fm801, FM801_MAXPLAYCH, 1)) goto oops; 647 pcm_addchan(dev, PCMDIR_PLAY, &fm801ch_class, fm801); 648 pcm_addchan(dev, PCMDIR_REC, &fm801ch_class, fm801); 649 pcm_setstatus(dev, status); 650 651 fm801->radio = device_add_child(dev, "radio", -1); --- 151 unchanged lines hidden --- |