Discussion:
5.1-channel USB sound device on 8.0-RELEASE
(too old to reply)
Hans Petter Selasky
2009-12-15 17:52:59 UTC
Permalink
Hi.
I tested below device on 8.0-RELEASE with patch.
*1 Kyo-On DIGI(sorry,this page was writtin in Japanese)
http://www.area-powers.jp/product/usb_product/product/kyo-on/u1soundt4.htm
l
This device is 5.1-channel USB sound device.
Without patch, ``No playback!''
ugen0.6: <vendor 0x0d8c> at usbus0
uaudio1: <vendor 0x0d8c product 0x0006, class 0/0, rev 1.10/0.10, addr 6>
on usbus0 uaudio1: No playback!
uaudio1: Record: 48000 Hz, 2 ch, 16-bit S-LE PCM format
uaudio1: No midi sequencer
pcm1: <USB audio> on uaudio1
uaudio1: <vendor 0x0d8c product 0x0006, class 0/0, rev 1.10/0.10, addr 6>
on usb us0
uaudio1: Play: 48000 Hz, 8 ch, 16-bit S-LE PCM format
uaudio1: Record: 48000 Hz, 2 ch, 16-bit S-LE PCM format
uaudio1: No midi sequencer
pcm1: <USB audio> on uaudio1
But I could not play with mpg123, only noise.
How can I use this device on 8.0-RELEASE.
Cheers.
---
MIHIRA, Sanpei Yoshiro
Tokyo, Japan.
http://freebsd.monkey.org/freebsd-usb/200905/msg00090.html
--- sys/dev/sound/usb/uaudio.c.org 2009-12-07 10:29:05.593175070 +0900
+++ sys/dev/sound/usb/uaudio.c 2009-12-07 10:29:51.030304905 +0900
@@ -112,7 +112,8 @@
#define MAKE_WORD(h,l) (((h) << 8) | (l))
#define BIT_TEST(bm,bno) (((bm)[(bno) / 8] >> (7 - ((bno) % 8))) & 1)
-#define UAUDIO_MAX_CHAN(x) (x)
+#define UAUDIO_MAX_CHAN(x) (((x) < 2) ? (x) : 2) /* XXX fixme later
*/ +
struct uaudio_mixer_node {
int32_t minval;
Hi,

Your audio device does not provide a 2 or 1 channel alternate setting.

Currently the PCM sound system does not support more than 2 channels.

That's why it doesn't work.

Feel free to start working on a more complete patch.

--HPS
Ariff Abdullah
2009-12-16 00:55:38 UTC
Permalink
On Tue, 15 Dec 2009 18:52:59 +0100
Post by Hans Petter Selasky
Hi.
I tested below device on 8.0-RELEASE with patch.
*1 Kyo-On DIGI(sorry,this page was writtin in Japanese)
http://www.area-powers.jp/product/usb_product/product/kyo-on/u1s
oundt4.htm l
This device is 5.1-channel USB sound device.
Without patch, ``No playback!''
ugen0.6: <vendor 0x0d8c> at usbus0
uaudio1: <vendor 0x0d8c product 0x0006, class 0/0, rev 1.10/0.10,
addr 6> on usbus0 uaudio1: No playback!
uaudio1: Record: 48000 Hz, 2 ch, 16-bit S-LE PCM format
uaudio1: No midi sequencer
pcm1: <USB audio> on uaudio1
uaudio1: <vendor 0x0d8c product 0x0006, class 0/0, rev 1.10/0.10,
addr 6> on usb us0
uaudio1: Play: 48000 Hz, 8 ch, 16-bit S-LE PCM format
uaudio1: Record: 48000 Hz, 2 ch, 16-bit S-LE PCM format
uaudio1: No midi sequencer
pcm1: <USB audio> on uaudio1
But I could not play with mpg123, only noise.
How can I use this device on 8.0-RELEASE.
Cheers.
---
MIHIRA, Sanpei Yoshiro
Tokyo, Japan.
http://freebsd.monkey.org/freebsd-usb/200905/msg00090.html
--- sys/dev/sound/usb/uaudio.c.org 2009-12-07 10:29:05.593175070
+0900 +++ sys/dev/sound/usb/uaudio.c 2009-12-07 10:29:51.030304905 +0900
@@ -112,7 +112,8 @@
#define MAKE_WORD(h,l) (((h) << 8) | (l))
#define BIT_TEST(bm,bno) (((bm)[(bno) / 8] >> (7 - ((bno) % 8))) & 1)
-#define UAUDIO_MAX_CHAN(x) (x)
+#define UAUDIO_MAX_CHAN(x) (((x) < 2) ? (x) : 2) /* XXX
fixme later */ +
struct uaudio_mixer_node {
int32_t minval;
Hi,
Your audio device does not provide a 2 or 1 channel alternate
setting.
Currently the PCM sound system does not support more than 2
channels.
It does.
Post by Hans Petter Selasky
That's why it doesn't work.
Feel free to start working on a more complete patch.
Sent him a patch 6 months ago, without reply. Here it is, again:

http://people.freebsd.org/~ariff/uaudio_multi.diff



--
Ariff Abdullah
FreeBSD

... Recording in stereo is obviously too advanced
and confusing for us idiot ***** users :P ........

... Going with the standard and orthodox
is the death of intellect ..............
Hans Petter Selasky
2009-12-16 08:56:23 UTC
Permalink
Post by Ariff Abdullah
On Tue, 15 Dec 2009 18:52:59 +0100
Post by Hans Petter Selasky
Hi.
I tested below device on 8.0-RELEASE with patch.
*1 Kyo-On DIGI(sorry,this page was writtin in Japanese)
http://www.area-powers.jp/product/usb_product/product/kyo-on/u1s
oundt4.htm l
This device is 5.1-channel USB sound device.
Without patch, ``No playback!''
ugen0.6: <vendor 0x0d8c> at usbus0
uaudio1: <vendor 0x0d8c product 0x0006, class 0/0, rev 1.10/0.10,
addr 6> on usbus0 uaudio1: No playback!
uaudio1: Record: 48000 Hz, 2 ch, 16-bit S-LE PCM format
uaudio1: No midi sequencer
pcm1: <USB audio> on uaudio1
uaudio1: <vendor 0x0d8c product 0x0006, class 0/0, rev 1.10/0.10,
addr 6> on usb us0
uaudio1: Play: 48000 Hz, 8 ch, 16-bit S-LE PCM format
uaudio1: Record: 48000 Hz, 2 ch, 16-bit S-LE PCM format
uaudio1: No midi sequencer
pcm1: <USB audio> on uaudio1
But I could not play with mpg123, only noise.
How can I use this device on 8.0-RELEASE.
Cheers.
---
MIHIRA, Sanpei Yoshiro
Tokyo, Japan.
http://freebsd.monkey.org/freebsd-usb/200905/msg00090.html
--- sys/dev/sound/usb/uaudio.c.org 2009-12-07 10:29:05.593175070
+0900 +++ sys/dev/sound/usb/uaudio.c 2009-12-07 10:29:51.030304905
#define MAKE_WORD(h,l) (((h) << 8) | (l))
#define BIT_TEST(bm,bno) (((bm)[(bno) / 8] >> (7 - ((bno) % 8))) & 1)
-#define UAUDIO_MAX_CHAN(x) (x)
+#define UAUDIO_MAX_CHAN(x) (((x) < 2) ? (x) : 2) /* XXX
fixme later */ +
struct uaudio_mixer_node {
int32_t minval;
Hi,
Your audio device does not provide a 2 or 1 channel alternate setting.
Currently the PCM sound system does not support more than 2
channels.
It does.
Post by Hans Petter Selasky
That's why it doesn't work.
Feel free to start working on a more complete patch.
http://people.freebsd.org/~ariff/uaudio_multi.diff
Hi,

There is one more change you need to do in uaudio.c before it works. I will
get this integrated into USB P4!

Thanks!

--HPS
Hans Petter Selasky
2009-12-16 09:18:54 UTC
Permalink
Post by Ariff Abdullah
Ariff Abdullah
Hi,

Try the following patch:

http://p4web.freebsd.org/chv.cgi?CH=171834

or

http://perforce.freebsd.org/chv.cgi?CH=171834

--HPS
MIHIRA Sanpei Yoshiro
2009-12-19 05:29:43 UTC
Permalink
Post by Hans Petter Selasky
Post by Ariff Abdullah
Ariff Abdullah
Hi,
http://p4web.freebsd.org/chv.cgi?CH=171834
or
http://perforce.freebsd.org/chv.cgi?CH=171834
I tested above uaudio.c(rev.64). I could play MP3 with Line and PCM output.
Please comit to 9-current and 8-stable :-)

Cheers.
---
MIHIRA, Sanpei Yoshiro
Tokyo, Japan.

Loading...