ds1.c (107285) | ds1.c (109623) |
---|---|
1/* 2 * Copyright (c) 2000 Cameron Grant <cg@freebsd.org> 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 --- 19 unchanged lines hidden (view full) --- 28#include <dev/sound/pcm/ac97.h> 29 30#include <pci/pcireg.h> 31#include <pci/pcivar.h> 32 33#include <dev/sound/pci/ds1.h> 34#include <dev/sound/pci/ds1-fw.h> 35 | 1/* 2 * Copyright (c) 2000 Cameron Grant <cg@freebsd.org> 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 --- 19 unchanged lines hidden (view full) --- 28#include <dev/sound/pcm/ac97.h> 29 30#include <pci/pcireg.h> 31#include <pci/pcivar.h> 32 33#include <dev/sound/pci/ds1.h> 34#include <dev/sound/pci/ds1-fw.h> 35 |
36SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/ds1.c 107285 2002-11-26 18:16:27Z cg $"); | 36SND_DECLARE_FILE("$FreeBSD: head/sys/dev/sound/pci/ds1.c 109623 2003-01-21 08:56:16Z alfred $"); |
37 38/* -------------------------------------------------------------------- */ 39 40#define DS1_CHANS 4 41#define DS1_RECPRIMARY 0 42#define DS1_IRQHZ ((48000 << 8) / 256) 43#define DS1_BUFFSIZE 4096 44 --- 884 unchanged lines hidden (view full) --- 929ds_pci_attach(device_t dev) 930{ 931 u_int32_t data; 932 u_int32_t subdev, i; 933 struct sc_info *sc; 934 struct ac97_info *codec = NULL; 935 char status[SND_STATUSLEN]; 936 | 37 38/* -------------------------------------------------------------------- */ 39 40#define DS1_CHANS 4 41#define DS1_RECPRIMARY 0 42#define DS1_IRQHZ ((48000 << 8) / 256) 43#define DS1_BUFFSIZE 4096 44 --- 884 unchanged lines hidden (view full) --- 929ds_pci_attach(device_t dev) 930{ 931 u_int32_t data; 932 u_int32_t subdev, i; 933 struct sc_info *sc; 934 struct ac97_info *codec = NULL; 935 char status[SND_STATUSLEN]; 936 |
937 if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK | M_ZERO)) == NULL) { | 937 if ((sc = malloc(sizeof(*sc), M_DEVBUF, M_ZERO)) == NULL) { |
938 device_printf(dev, "cannot allocate softc\n"); 939 return ENXIO; 940 } 941 942 sc->lock = snd_mtxcreate(device_get_nameunit(dev), "sound softc"); 943 sc->dev = dev; 944 subdev = (pci_get_subdevice(dev) << 16) | pci_get_subvendor(dev); 945 sc->type = ds_finddev(pci_get_devid(dev), subdev); --- 139 unchanged lines hidden --- | 938 device_printf(dev, "cannot allocate softc\n"); 939 return ENXIO; 940 } 941 942 sc->lock = snd_mtxcreate(device_get_nameunit(dev), "sound softc"); 943 sc->dev = dev; 944 subdev = (pci_get_subdevice(dev) << 16) | pci_get_subvendor(dev); 945 sc->type = ds_finddev(pci_get_devid(dev), subdev); --- 139 unchanged lines hidden --- |