Using uaudio(4) on systems withoug ISA bus

Tilman Linneweh arved at arved.at
Mon Apr 25 14:54:55 PDT 2005


Hi everyone,

I have tried to use my USB Headphone on my Mac mini.

Unfortunately the sound system seems to require an ISA Bus, because in
channel.c sndbuf_dmasetdir and sndbuf_dmabounce are used, which are only
compiled if there is an isa device.

Without knowing what i am doing i commented out these lines and everything
seems to compile and work, apart from mixer(8) saying Device not configured
and the following LOR on the first sound output:

Apr 25 23:31:45 minimac kernel: Sleeping on "usbsyn" with the following non-slee
pable locks held:
Apr 25 23:31:45 minimac kernel: exclusive sleep mutex pcm0:play:0 (pcm play chan
nel) r = 0 (0xc0fbc0) locked @ /usr/src/sys/dev/sound/pcm/channel.c:335
Apr 25 23:31:45 minimac kernel: KDB: stack backtrace:
Apr 25 23:31:45 minimac kernel: 0xdbf158e0: at witness_warn+0x274
Apr 25 23:31:45 minimac kernel: 0xdbf15990: at msleep+0x9c
Apr 25 23:31:45 minimac kernel: 0xdbf159f0: at usbd_transfer+0x1c8
Apr 25 23:31:45 minimac kernel: 0xdbf15a20: at usbd_sync_transfer+0x20
Apr 25 23:31:45 minimac kernel: 0xdbf15a40: at usbd_do_request_flags_pipe+0xa0
Apr 25 23:31:45 minimac kernel: 0xdbf15a90: at usbd_do_request_flags+0x40
Apr 25 23:31:45 minimac kernel: 0xdbf15ab0: at usbd_do_request+0x20
Apr 25 23:31:45 minimac kernel: 0xdbf15ad0: at usbd_set_interface+0xac
Apr 25 23:31:45 minimac kernel: 0xdbf15af0: at uaudio_chan_open+0x5c
Apr 25 23:31:45 minimac kernel: 0xdbf15b20: at uaudio_trigger_output+0x74
Apr 25 23:31:45 minimac kernel: 0xdbf15b40: at ua_chan_trigger+0x54
Apr 25 23:31:45 minimac kernel: 0xdbf15b60: at chn_trigger+0x98
Apr 25 23:31:45 minimac kernel: 0xdbf15b90: at chn_start+0x130
Apr 25 23:31:45 minimac kernel: 0xdbf15bc0: at chn_write+0x270
Apr 25 23:31:45 minimac kernel: 0xdbf15bc0: at chn_write+0x270
Apr 25 23:31:45 minimac kernel: 0xdbf15c00: at dsp_write+0xb0
Apr 25 23:31:45 minimac kernel: 0xdbf15c20: at devfs_write_f+0xec
Apr 25 23:31:45 minimac kernel: 0xdbf15c50: at dofilewrite+0xe4
Apr 25 23:31:45 minimac kernel: 0xdbf15cb0: at write+0x5c
Apr 25 23:31:45 minimac kernel: 0xdbf15ce0: at syscall+0x29c
Apr 25 23:31:45 minimac kernel: 0xdbf15d60: at trap+0x168
Apr 25 23:31:45 minimac kernel: 0xdbf15da0: at powerpc_interrupt+0xc0
Apr 25 23:31:45 minimac kernel: 0xdbf15dd0: user SC trap by 0x218f3e6c: srr1=0xf
032
Apr 25 23:31:45 minimac kernel: r1=0x7fff8fc0 cr=0x44288048 xer=0 ctr=0x218f3e64
Apr 25 23:31:45 minimac kernel: lock order reversal
Apr 25 23:31:45 minimac kernel: 1st 0xc0fbc0 pcm0:play:0 (pcm play channel) @ /u
sr/src/sys/dev/sound/pcm/channel.c:335
Apr 25 23:31:45 minimac kernel: 2nd 0x45c150 Giant (Giant) @ /usr/src/sys/kern/k
ern_synch.c:236
[...]

Anyone got an idea how to solve this better?

regards
tilman
-------------- next part --------------
Index: channel.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/sound/pcm/channel.c,v
retrieving revision 1.98
diff -u -r1.98 channel.c
--- channel.c	6 Jan 2005 01:43:20 -0000	1.98
+++ channel.c	25 Apr 2005 21:25:32 -0000
@@ -870,8 +870,9 @@
 	CHN_LOCKASSERT(c);
 	c->direction = dir;
 	r = CHANNEL_SETDIR(c->methods, c->devinfo, c->direction);
-	if (!r && SND_DMA(b))
-		sndbuf_dmasetdir(b, c->direction);
+	if (!r && SND_DMA(b)) {
+		/* sndbuf_dmasetdir(b, c->direction); */
+	}
 	return r;
 }
 
@@ -1123,8 +1124,9 @@
 	int ret;
 
 	CHN_LOCKASSERT(c);
-	if (SND_DMA(b) && (go == PCMTRIG_EMLDMAWR || go == PCMTRIG_EMLDMARD))
-		sndbuf_dmabounce(b);
+	if (SND_DMA(b) && (go == PCMTRIG_EMLDMAWR || go == PCMTRIG_EMLDMARD)) {
+		/* sndbuf_dmabounce(b); */
+	}
 	ret = CHANNEL_TRIGGER(c->methods, c->devinfo, go);
 
 	return ret;


More information about the freebsd-usb mailing list