summaryrefslogtreecommitdiff
path: root/audio/aureal-kmod/files/patch-au88x0.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/aureal-kmod/files/patch-au88x0.c')
-rw-r--r--audio/aureal-kmod/files/patch-au88x0.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/audio/aureal-kmod/files/patch-au88x0.c b/audio/aureal-kmod/files/patch-au88x0.c
index 93f3af4fda64..f0f17b4b9a63 100644
--- a/audio/aureal-kmod/files/patch-au88x0.c
+++ b/audio/aureal-kmod/files/patch-au88x0.c
@@ -1,6 +1,7 @@
---- au88x0.c.orig 2002-05-10 09:32:55.000000000 +0800
-+++ au88x0.c 2009-02-21 16:14:41.000000000 +0800
-@@ -30,8 +30,9 @@
+--- au88x0.c.orig 2016-07-26 13:37:02 UTC
++++ au88x0.c
+@@ -33,10 +33,11 @@
+ */
#include <dev/sound/pcm/sound.h>
-#include <dev/sound/pci/au88x0.h>
@@ -13,7 +14,9 @@
+#include <dev/pci/pcivar.h>
#include <sys/queue.h>
-@@ -574,5 +575,9 @@
+ SND_DECLARE_FILE("$FreeBSD$");
+@@ -577,7 +578,11 @@ auchan_init(kobj_t obj, void *devinfo, s
+ ch->channel = c;
ch->buffer = b;
ch->run = 0;
- if (sndbuf_alloc(ch->buffer, au->parent_dmat, AU_BUFFSIZE) == -1) {
@@ -24,21 +27,27 @@
+ AU_BUFFSIZE) != 0) {
printf("sndbuf_alloc failed\n");
return NULL;
-@@ -769,5 +774,5 @@
+ }
+@@ -769,7 +774,7 @@ au_pci_probe(device_t dev)
+ }
if (s) device_set_desc(dev, s);
- return s ? 0 : ENXIO;
+ return s ? BUS_PROBE_DEFAULT : ENXIO;
}
-@@ -803,5 +808,5 @@
+ static int
+@@ -803,7 +808,7 @@ au_pci_attach(device_t dev)
+ data = pci_read_config(dev, PCIR_COMMAND, 2);
for (i = 0; i < 3; i++) {
- au->regid[i] = PCIR_MAPS + i*4;
+ au->regid[i] = PCIR_BAR(i);
au->regtype[i] = SYS_RES_MEMORY;
au->reg[i] = bus_alloc_resource(dev, au->regtype[i], &au->regid[i], 0, ~0, 1, RF_ACTIVE);
-@@ -853,5 +858,7 @@
+ if (!au->reg[i]) {
+@@ -853,7 +858,9 @@ au_pci_attach(device_t dev)
+ /*highaddr*/BUS_SPACE_MAXADDR,
/*filter*/NULL, /*filterarg*/NULL,
/*maxsize*/AU_BUFFSIZE, /*nsegments*/1, /*maxsegz*/0x3ffff,
- /*flags*/0, &au->parent_dmat) != 0) {
@@ -47,7 +56,9 @@
+ &au->parent_dmat) != 0) {
device_printf(dev, "unable to create dma tag\n");
goto bad;
-@@ -943,5 +950,5 @@
+ }
+@@ -943,6 +950,6 @@ static driver_t au_driver = {
+
DRIVER_MODULE(snd_au88x0, pci, au_driver, pcm_devclass, 0, 0);
-MODULE_DEPEND(snd_au88x0, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER);