diff --git a/sys/man/4/nusb b/sys/man/4/nusb index e1d03a5c5..ad4cbd1b6 100644 --- a/sys/man/4/nusb +++ b/sys/man/4/nusb @@ -272,8 +272,12 @@ and configures and manages a USB audio device. It implements a file system (normally seen under .BR /dev ), -compatible with -.IR audio (3). +exporting +.BN audioU N +and +.BI volumeU N +files that have the same semantics as +.IR audio (1)). .SS Camera devices .I Cam configures and exposes a USB camera device's capabilities, diff --git a/sys/src/cmd/nusb/audio/audio.c b/sys/src/cmd/nusb/audio/audio.c index 195bd6bd5..e11ac4db1 100644 --- a/sys/src/cmd/nusb/audio/audio.c +++ b/sys/src/cmd/nusb/audio/audio.c @@ -395,9 +395,9 @@ Foundaltc: devctl(d, "sampledelay %d", audiodelay); devctl(d, "hz %d", speed); if(e->dir==Ein) - devctl(d, "name audioin"); + devctl(d, "name audioinU%s", audiodev->hname); else - devctl(d, "name audio"); + devctl(d, "name audioU%s", audiodev->hname); return d; } @@ -549,7 +549,8 @@ main(int argc, char *argv[]) sysfatal("no output stream found"); fs.tree = alloctree(user, "usb", DMDIR|0555, nil); - createfile(fs.tree->root, "volume", user, 0666, nil); + snprint(buf, sizeof buf, "volumeU%s", audiodev->hname); + createfile(fs.tree->root, buf, user, 0666, nil); snprint(buf, sizeof buf, "%d.audio", audiodev->id); postsharesrv(&fs, nil, "usb", buf);