argh, forgot the bus_dma_tag_creates.
also, panic if channel init fails instead of derefing null.
This commit is contained in:
parent
af7aa614bb
commit
8af7f72e8b
@ -890,7 +890,7 @@ mss_doattach(device_t dev, struct mss_info *mss)
|
||||
/*lowaddr*/BUS_SPACE_MAXADDR_24BIT,
|
||||
/*highaddr*/BUS_SPACE_MAXADDR,
|
||||
/*filter*/NULL, /*filterarg*/NULL,
|
||||
/*maxsize*/DSP_BUFFSIZE, /*nsegments*/1,
|
||||
/*maxsize*/MSS_BUFFSIZE, /*nsegments*/1,
|
||||
/*maxsegz*/0x3ffff,
|
||||
/*flags*/0, &mss->parent_dmat) != 0) {
|
||||
device_printf(dev, "unable to create dma tag\n");
|
||||
|
@ -464,6 +464,7 @@ sb_doattach(device_t dev, struct sb_info *sb)
|
||||
snddev_info *d = device_get_softc(dev);
|
||||
void *ih;
|
||||
char status[SND_STATUSLEN];
|
||||
int bs = (sb->bd_flags & BD_F_ESS)? ESS_BUFFSIZE : DSP_BUFFSIZE;
|
||||
|
||||
if (sb_alloc_resources(sb, dev)) goto no;
|
||||
if (sb_reset_dsp(sb)) goto no;
|
||||
@ -482,7 +483,7 @@ sb_doattach(device_t dev, struct sb_info *sb)
|
||||
/*lowaddr*/BUS_SPACE_MAXADDR_24BIT,
|
||||
/*highaddr*/BUS_SPACE_MAXADDR,
|
||||
/*filter*/NULL, /*filterarg*/NULL,
|
||||
/*maxsize*/DSP_BUFFSIZE, /*nsegments*/1,
|
||||
/*maxsize*/bs, /*nsegments*/1,
|
||||
/*maxsegz*/0x3ffff,
|
||||
/*flags*/0, &sb->parent_dmat) != 0) {
|
||||
device_printf(dev, "unable to create dma tag\n");
|
||||
|
@ -464,6 +464,7 @@ sb_doattach(device_t dev, struct sb_info *sb)
|
||||
snddev_info *d = device_get_softc(dev);
|
||||
void *ih;
|
||||
char status[SND_STATUSLEN];
|
||||
int bs = (sb->bd_flags & BD_F_ESS)? ESS_BUFFSIZE : DSP_BUFFSIZE;
|
||||
|
||||
if (sb_alloc_resources(sb, dev)) goto no;
|
||||
if (sb_reset_dsp(sb)) goto no;
|
||||
@ -482,7 +483,7 @@ sb_doattach(device_t dev, struct sb_info *sb)
|
||||
/*lowaddr*/BUS_SPACE_MAXADDR_24BIT,
|
||||
/*highaddr*/BUS_SPACE_MAXADDR,
|
||||
/*filter*/NULL, /*filterarg*/NULL,
|
||||
/*maxsize*/DSP_BUFFSIZE, /*nsegments*/1,
|
||||
/*maxsize*/bs, /*nsegments*/1,
|
||||
/*maxsegz*/0x3ffff,
|
||||
/*flags*/0, &sb->parent_dmat) != 0) {
|
||||
device_printf(dev, "unable to create dma tag\n");
|
||||
|
@ -464,6 +464,7 @@ sb_doattach(device_t dev, struct sb_info *sb)
|
||||
snddev_info *d = device_get_softc(dev);
|
||||
void *ih;
|
||||
char status[SND_STATUSLEN];
|
||||
int bs = (sb->bd_flags & BD_F_ESS)? ESS_BUFFSIZE : DSP_BUFFSIZE;
|
||||
|
||||
if (sb_alloc_resources(sb, dev)) goto no;
|
||||
if (sb_reset_dsp(sb)) goto no;
|
||||
@ -482,7 +483,7 @@ sb_doattach(device_t dev, struct sb_info *sb)
|
||||
/*lowaddr*/BUS_SPACE_MAXADDR_24BIT,
|
||||
/*highaddr*/BUS_SPACE_MAXADDR,
|
||||
/*filter*/NULL, /*filterarg*/NULL,
|
||||
/*maxsize*/DSP_BUFFSIZE, /*nsegments*/1,
|
||||
/*maxsize*/bs, /*nsegments*/1,
|
||||
/*maxsegz*/0x3ffff,
|
||||
/*flags*/0, &sb->parent_dmat) != 0) {
|
||||
device_printf(dev, "unable to create dma tag\n");
|
||||
|
@ -1021,6 +1021,7 @@ chn_init(pcm_channel *c, void *devinfo, int dir)
|
||||
c->feeder = &feeder_root;
|
||||
c->buffer.chan = -1;
|
||||
c->devinfo = c->init(devinfo, &c->buffer, c, dir);
|
||||
if (c->devinfo == NULL) panic("c->init() failed");
|
||||
chn_setdir(c, dir);
|
||||
|
||||
/* And the secondary buffer. */
|
||||
|
Loading…
Reference in New Issue
Block a user