--- /tmp/ns_geode.c.org 2008-08-03 17:04:49.499537114 +0200 +++ ../../dev/sound/pci/ns_geode.c 2008-08-03 17:20:51.383500858 +0200 @@ -246,8 +246,8 @@ #include -#include -#include +#include +#include /*---- @@ Debug enables. ---------------------------------------------------*/ @@ -264,7 +264,7 @@ /* Use HARDCLOCK_POLL 1 with added code in "kern_clock.c/hardclock()". * Use HARDCLOCK 0 if "timeout()" is to be used instead. */ -#define USE_TIMER_POLL 0 +#define USE_TIMER_POLL 1 #define HARDCLOCK_POLL 0 @@ -951,7 +951,7 @@ if( NSC_ID1 != b2 ) fail++; b2 = codec_direct_reg_read( LM4549_VENDOR_ID2 ); - if( NSC_ID2 != b2 ) fail++; + if( NSC_ID2 != b2 && NSC_ID2_2 != b2) fail++; if( fail ) return( 0 ); @@ -1247,7 +1247,8 @@ /* Allocate a data buffer for DMA using associated DMA tag.*/ if ( sndbuf_alloc( ch->ch_snd_dbuf, /* For this control buffer*/ sc->sc_parent_dmat, /* using this TAG (mem rqmts).*/ - sc->sc_buf_size ) == -1) /* Allocate this size buffer.*/ + 0, /* DMA flags */ + sc->sc_buf_size ) != 0) /* Allocate this size buffer.*/ return( NULL ); prd_filldtbl( ch ); /* Write default DMA descriptors.*/ @@ -1752,7 +1753,6 @@ case 0x1031078: device_set_desc( dev, "NatSemi CS5530A (Geode)" ); return( 0 ); /* Yes, give it to us!*/ - default: return( ENXIO ); } @@ -1884,7 +1884,7 @@ * F3 Audio function uses memory-mapped registers. */ - sc->sc_regid = PCIR_MAPS; + sc->sc_regid = PCIR_BAR(0); sc->sc_regtype = SYS_RES_MEMORY; /* Not SYS_RES_IOPORT, enable access to mem in dev.*/ sc->sc_reg = bus_alloc_resource( dev, sc->sc_regtype, &sc->sc_regid, @@ -1971,8 +1971,9 @@ BUS_SPACE_MAXADDR, /* highaddr(cant access above this)*/ NULL, NULL, /* filter, filterarg (per page Y/N)*/ sc->sc_buf_size, /* Maxsize in single alloc.*/ - 1, 0x0000FFFF, /* Num scat/gath segs, Max such seg size.*/ + 1, 0x00010000, /* Num scat/gath segs, Max such seg size.*/ 0, /* flags*/ + NULL, NULL, &sc->sc_parent_dmat ) /* Returned TAG for DMA mem ops.*/ != 0 ) { @@ -2231,7 +2232,7 @@ * child of the "pci" driver (bus), with driver_t "geode_driver". */ DRIVER_MODULE( snd_geode, pci, geode_driver, pcm_devclass, 0, 0 ); -MODULE_DEPEND( snd_geode, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER ); +MODULE_DEPEND( snd_geode, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER ); MODULE_VERSION( snd_geode, 1 ); --- /tmp/ns_geode.h.org 2008-08-03 17:04:55.156031445 +0200 +++ ../../dev/sound/pci/ns_geode.h 2008-08-03 17:05:29.736919519 +0200 @@ -195,4 +195,5 @@ /* LM4549_VENDOR_ID1 and LM4549_VENDOR_ID2 values: */ #define NSC_ID1 0x4E53 #define NSC_ID2 0x4331 +#define NSC_ID2_2 0x4300 /* Different (but compatible) LM45xx codec */