Deleted Added
full compact
vibes.c (193640) vibes.c (254263)
1/*-
2 * Copyright (c) 2001 Orion Hodson <O.Hodson@cs.ucl.ac.uk>
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

--- 28 unchanged lines hidden (view full) ---

37#include <dev/sound/pcm/sound.h>
38#include <dev/sound/pci/vibes.h>
39
40#include <dev/pci/pcireg.h>
41#include <dev/pci/pcivar.h>
42
43#include "mixer_if.h"
44
1/*-
2 * Copyright (c) 2001 Orion Hodson <O.Hodson@cs.ucl.ac.uk>
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

--- 28 unchanged lines hidden (view full) ---

37#include <dev/sound/pcm/sound.h>
38#include <dev/sound/pci/vibes.h>
39
40#include <dev/pci/pcireg.h>
41#include <dev/pci/pcivar.h>
42
43#include "mixer_if.h"
44
45SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/vibes.c 193640 2009-06-07 19:12:08Z ariff $");
45SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/vibes.c 254263 2013-08-12 23:30:01Z scottl $");
46
47/* ------------------------------------------------------------------------- */
48/* Constants */
49
50#define SV_PCI_ID 0xca005333
51#define SV_DEFAULT_BUFSZ 16384
52#define SV_MIN_BLKSZ 128
53#define SV_INTR_PER_BUFFER 2

--- 669 unchanged lines hidden (view full) ---

723 struct sc_info *sc;
724 u_int32_t data;
725 char status[SND_STATUSLEN];
726 u_long midi_start, games_start, count, sdmaa, sdmac, ml, mu;
727
728 sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO);
729 sc->dev = dev;
730
46
47/* ------------------------------------------------------------------------- */
48/* Constants */
49
50#define SV_PCI_ID 0xca005333
51#define SV_DEFAULT_BUFSZ 16384
52#define SV_MIN_BLKSZ 128
53#define SV_INTR_PER_BUFFER 2

--- 669 unchanged lines hidden (view full) ---

723 struct sc_info *sc;
724 u_int32_t data;
725 char status[SND_STATUSLEN];
726 u_long midi_start, games_start, count, sdmaa, sdmac, ml, mu;
727
728 sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO);
729 sc->dev = dev;
730
731 data = pci_read_config(dev, PCIR_COMMAND, 2);
732 data |= (PCIM_CMD_PORTEN|PCIM_CMD_BUSMASTEREN);
733 pci_write_config(dev, PCIR_COMMAND, data, 2);
734 data = pci_read_config(dev, PCIR_COMMAND, 2);
731 pci_enable_busmaster(dev);
735
736#if __FreeBSD_version > 500000
737 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
738 device_printf(dev, "chip is in D%d power mode "
739 "-- setting to D0\n", pci_get_powerstate(dev));
740 pci_set_powerstate(dev, PCI_POWERSTATE_D0);
741 }
742#endif

--- 207 unchanged lines hidden ---
732
733#if __FreeBSD_version > 500000
734 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) {
735 device_printf(dev, "chip is in D%d power mode "
736 "-- setting to D0\n", pci_get_powerstate(dev));
737 pci_set_powerstate(dev, PCI_POWERSTATE_D0);
738 }
739#endif

--- 207 unchanged lines hidden ---