usb/78028: The system must tell users information of a USB
sound device.
Alexander Leidinger
Alexander at Leidinger.net
Fri Mar 4 11:10:24 GMT 2005
The following reply was made to PR usb/78028; it has been noted by GNATS.
From: Alexander Leidinger <Alexander at Leidinger.net>
To: Kazuhito HONDA <kazuhito at ph.noda.tus.ac.jp>
Cc: FreeBSD-gnats-submit at freebsd.org
Subject: Re: usb/78028: The system must tell users information of a USB
sound device.
Date: Fri, 4 Mar 2005 12:00:21 +0100
Kazuhito HONDA <kazuhito at ph.noda.tus.ac.jp> wrote:
> Right. But I don't know the management of /dev/sndstat.
> are three patches bellow correct?
At least they work and produce the following output:
---snip---
pcm0: <USB Audio> at addr ? (1p/1r/0v channels duplex default)
playback: 2ch, 16/16bit, pcm, 44100Hz
playback: 2ch, 24/24bit, pcm, 44100Hz
playback: 4ch, 16/16bit, pcm, 44100Hz
playback: 4ch, 24/24bit, pcm, 44100Hz
playback: 6ch, 16/16bit, pcm, 44100Hz
playback: 6ch, 24/24bit, pcm, 44100Hz
playback: 2ch, 16/16bit, pcm, 48000Hz
playback: 2ch, 24/24bit, pcm, 48000Hz
playback: 4ch, 16/16bit, pcm, 48000Hz
playback: 4ch, 24/24bit, pcm, 48000Hz
playback: 6ch, 16/16bit, pcm, 48000Hz
playback: 6ch, 24/24bit, pcm, 48000Hz
playback: 2ch, 16/16bit, pcm, 96000Hz
playback: 2ch, 24/24bit, pcm, 96000Hz
recording: 2ch, 16/16bit, pcm, 44100Hz
recording: 2ch, 24/24bit, pcm, 44100Hz
recording: 2ch, 16/16bit, pcm, 48000Hz
recording: 2ch, 24/24bit, pcm, 48000Hz
recording: 2ch, 16/16bit, pcm, 96000Hz
recording: 2ch, 24/24bit, pcm, 96000Hz
---snip---
Maybe there should be a descriptive text before those lines, e.g. "Supported
formats:" or something like this.
This is an:
---snip---
uaudio0: Creative Technology SB Live! 24-bit External, rev 1.10/1.00, addr 2
uaudio0: audio rev 1.00
pcm0: <USB Audio> on uaudio0
---snip---
Some style(9) issues I found:
> @@ -444,6 +450,7 @@
> #elif defined(__FreeBSD__)
> Static int audio_attach_mi(device_t);
> Static int uaudio_init_params(struct uaudio_softc * sc, struct chan
> *ch, int mode);
> +static int uaudio_sndstat_prepare_pcm(struct sbuf *s, device_t dev,
> int verbose);
It has to be "Static" (uppercase 'S') to fit the style of the file.
> @@ -4171,6 +4210,118 @@
> return (1 << mc->slctrtype[mc->minval - 1]);
> }
>
> +static int
> +uaudio_sndstat_prepare_pcm(struct sbuf *s, device_t dev, int verbose)
Here too.
uaudio doesn't has io or irq resources assigned to it, but is there a way to
display the kld which provides the driver (AFAIR the driver is responsible
to fill out at least the kld part)? Here's an example of what I talk about:
---snip---
pcm1: <VIA VT8235> at io 0xe100 irq 5 kld snd_via8233 (5p/1r/0v channels
duplex)
---snip---
Bye,
Alexander.
--
http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137
The explanation requiring the fewest assumptions
is the most likely to be correct.
-- William of Occam
More information about the freebsd-usb
mailing list