From owner-FreeBSD-users-jp@jp.FreeBSD.org Thu May  9 15:34:39 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g496Yds44540;
	Thu, 9 May 2002 15:34:39 +0900 (JST)
	(envelope-from owner-FreeBSD-users-jp@jp.FreeBSD.org)
Received: from ml001.gate01.com ([61.122.115.133])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with SMTP/inet id g496Ycf44534
	for <FreeBSD-users-jp@jp.FreeBSD.org>; Thu, 9 May 2002 15:34:38 +0900 (JST)
	(envelope-from ginga@ginganet.org)
Received: from athena.ginganet.org (tk0008-202x210x243x26.ap-TK.usen.ad.jp[202.210.243.26])
	by ml001.gate01.com;
	Thu, 9 May 2002 15:34:33 +0900
Received: by athena.ginganet.org (Postfix, from userid 5003)
	id 5C6633ECC; Thu,  9 May 2002 15:34:32 +0900 (JST)
Date: Thu, 9 May 2002 15:34:32 +0900
From: Kawaguti Ginga <ginga-freebsd@ginganet.org>
To: FreeBSD-users-jp@jp.FreeBSD.org
Message-ID: <20020509063432.GB8960%ginga-freebsd@ginganet.org>
References: <20020508094436.1169.qmail@pikachu.bsp.bc.niigata-u.ac.jp> <20020508102405.GA6225%ginga-freebsd@ginganet.org> <20020509043608.4043.qmail@pikachu.bsp.bc.niigata-u.ac.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-2022-jp
Content-Disposition: inline
In-Reply-To: <20020509043608.4043.qmail@pikachu.bsp.bc.niigata-u.ac.jp>
User-Agent: Mutt/1.3.27i-ja.2
Reply-To: FreeBSD-users-jp@jp.FreeBSD.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020417
X-Sequence: FreeBSD-users-jp 68405
Subject: [FreeBSD-users-jp 68405] Re: Q. pcm and sbc in O_RDWR
Errors-To: owner-FreeBSD-users-jp@jp.FreeBSD.org
Sender: owner-FreeBSD-users-jp@jp.FreeBSD.org
X-Originator: ginga-freebsd@ginganet.org

$B@n8}$G$9(B

In Thu, May 09, 2002 at 01:36:06PM +0900,
Mamoru Iwaki <iwaki@bc.niigata-u.ac.jp> wrote:
> > 3$BG/A0$K$d$C$F$?$b$N$=$N$b$N$@(B...
> 
> $B$d$C$F$_$?$/$J$j$^$9$h$M$'!"$d$C$Q$j!#(B
> $B$=$N$H$-$O!"$&$^$/9T$-$^$7$?$+!)(B

$BBgBN$J$s$H$+$J$C$F$$$?$O$:$G$9!%(B
($BF~NO$r$A$g$C$H=hM}$7$FCY1dEy2C$($D$D:F@8!$$G$9(B)

> >  * $B%O!<%I%&%'%"$,(B full duplex $BBP1~$+$I$&$+!$(B
> >  * $B%I%i%$%P$,BP1~$7$F$$$k$+$I$&$+!$(B
> >  * $BBP1~$7$F$$$k$H$-$K(B full duplex $B$G07$&$?$a$N(B mixer $B$N(B setting
> > $B3F!9A4$F$,J,$+$C$F$J$$$HBLL\$G$9!%(B
> 
> $B$=$&$G$9$M!#@Z$jJ,$1$O$O$C$-$j$7$^$;$s$,!"(BNG$B$J4D6-$G$O!"(B

$B$9$_$^$;$s!$(BNG $B$H$$$&$N$O$I$&(B no good $B$J$N$G$7$g$&$+(B?
  * $B%G%P%$%9$,3+$1$J$$(B
  * loop back mixing $B$,@Z$jN%$;$J$$(B
  * $B%W%m%0%i%`$OF0$/$1$I!$4|BT$7$?$b$N$H0c$&(B($B$I$&0c$&(B?)
  * $B$=$NB>(B

> % cat /dev/sndstat 
> FreeBSD Audio Driver (newpcm)
> Installed devices:
> pcm0: <SB16 DSP 4.16> at io 0x220 irq 5 drq 1:5 bufsz 4096d
> (1p/1r/0v channels duplex)

$B$3$l!$3N$+(B AWE64 $B$G$9$h$M!%(BAWE64 gold $B$O?($C$?$3$H$"$j$^$9$,(B
hardware $B$O(B full duplex $B$J$N$@$1$I$&$^$/(B loop back $BJ,$r(B
$B@Z$jN%$;$?$+$I$&$+3P$($F$$$^$;$s(B(OSS)

> iwaki@mi000_[2]% mixer
> Mixer vol      is currently set to  90:90
> Mixer bass     is currently set to  50:50
> Mixer treble   is currently set to  50:50
> Mixer synth    is currently set to  90:90
$B$3$l$O$?$V$s(B MIDI $B$+$J$K$+$J$N$G(B 0 $B$G(B OK
> Mixer pcm      is currently set to  90:90
> Mixer speaker  is currently set to  90:90
speaker $B;H$o$J$1$l$P(B 0
> Mixer line     is currently set to   0:0
line 0 $B$C$FO?2;%\%j%e!<%`(B0 $B$H$$$&$3$H$G$O$"$j$^$;$s$+(B?
> Mixer mic      is currently set to  90:90
mic $B$NJ}$r;H$C$F$$$k$N$G$7$g$&$+(B?
> Mixer cd       is currently set to  90:90
cd $BF~NO;H$o$J$$$J$i$3$l$b(B 0 $B$G(B OK
> Mixer igain    is currently set to  90:90
> Mixer ogain    is currently set to  90:90

igain $B$?$V$s=EMW!$$J$N$G$9$,$3$N(B igain, ogain $B$C$F(B
$B2?$KBP1~$9$k$N$+NI$/J,$+$j$^$;$s(B...
$B$I$J$?$+$4B8$8$G$7$?$i65$($F$/$@$5$$!%(B
$B3F%G%P%$%98DJL%\%j%e!<%`$H$OJL$K2?$+$^$H$a$?(B 
master volume $B$_$?$$$J$b$N(B?
($B$@$H$9$k$H(B vol $B$H$I$&0c$&$N$@$m$&(B?)

> $B$H$J$C$F$$$k$N$KBP$7$F!"(BOK$B$J4D6-$G$O!"(B
> 
> %cat /dev/sndstat 
> FreeBSD Audio Driver (newpcm)
> Installed devices:
> pcm0: <OPL3-SA3 (YMF715)> at io 0x530 irq 5 drq 1:0 bufsz 4096
> (1p/1r/0v channels duplex)

719 $B$J$i;d$b(B luigi pcm $B$G;H$C$?$3$H$"$C$?$O$:!%(B

> > $B$"!$(B#ifdef OSS $B$H$+F~$C$F$$$^$9$M!%(B
> 
> $B<B$O(BOSS$B$NI>2AHG$G$b;n$7$F$$$?$N$G$9$,!"%@%a$@$C$?$N$G$9!#(B
> $B$3$l$O$=$N$H$-$N;D3<$G$9!#(B
> 
> > # full duplex $B$GF0$/$N$O3N$+$J$s$@$1$I!$(B($B%I%i%$%P$K$h$C$F$O(B?)
> > # in => out $B$X$N(B mixing $B$r;_$a$kJ}K!$,J,$+$i$J$$(B
> > # $B$b$N$b$"$j$^$9!%;_$a$k$H:F@8$7$?$$$b$N$b;_$^$C$A$c$&E[$H$+!%(B
> 
> sbc$B$,$=$&$J$N$G$7$g$&$+!)(B

sbc $B$,!$$H$$$&$h$j$O%O!<%I%&%'%"$NJ}$NLdBj$@$C$?$j$7$J$$$G$7$g$&$+!%(B
(mixer $B$H$+$J$s$F$I$&$;$I$C$+$N%l%8%9%?(B(?)$B$r(B
$B%;%C%H$7$F$$$k$@$1$G$9$h$M!$$-$C$H(B)

> > > ($B>&MQ(B)OSS$B$@$H$=$NJU$N(B buffer size $B$r;XDj$9$k$?$a$N(B ioctl $B$,$"$j$^$9!%(B
> 
> > $B$3$N(B SNDCTL_DSP_SETFRAGMENT $B;H$C$F$bBLL\$G$7$?$G$7$g$&$+(B?
> 
> $B$^$@!";n$7$F$$$^$;$s!#:#EY$d$C$F$_$^$9!#(B

$B$3$l$OK\Ev$K0lHV:G=i$K$d$kI,MW$,$"$j$^$9!%(B

> > # $B%G%P%$%9$K$h$C$F$O@_Dj$7$F$b5Q2<$@$C$?$j$9$k$b$N$b$"$j$^$9$,!%(B
> > # SNDCTL_DSP_GETCAPS $B$9$l$PJ,$+$k$s$8$c$J$+$C$?$+$J(B...
> 
> capability$B$O%A%'%C%/$7$F$$$^$;$s!#(B/dev/sndstat$B$r$_$?$@$1$G$9!#(B
> $B:#EYD4$Y$F$_$^$9!#(B

oss $B%^%K%e%"%k(B p98 $B$K$G$F$$$^$9$,!$(BGETCAPS $B$8$c$J$$$G$9(B($B$9$_$^$;$s(B)$B!%(B
GETBLKSIZE or GETISPACE/GETOSPACE $B$G$9!%(B
($B<+J,$N(B source $B$b8+D>$7$?$i(B SNDCTL_DSP_GETBLKSIZE $B$r;H$C$F$$$^$7$?(B)

> > $B$=$l$+$i(B... #define FLAGS   O_RDWR $B$C$F%I%i%$%P$K$h$C$F(B(?)
> > /dev/dsp0 $B$H(B /dev/dsp1 $B$r(B write/read $B$G3+$+$J$$$H$$$1$J$+$C$?$j(B
> > $B$7$?$h$&$J5$$b!%(B
> 
> $B$=$&$J$s$G$9$+!#$3$l$OCN$j$^$;$s$G$7$?!#(B
> $B$3$NJU$N$3$H$O2?$r8+$?$i$h$$$G$7$g$&$+!)(B

$B$h$/$o$+$j$^$;$s!%%I%i%$%P(B(?)$B$K$h$C$F(B try & error $B$J(B
$B>uBV$@$C$?$H;W$$$^$9(B($B$J$N$G(B #ifdef $B$7$F$$$^$7$?(B)$B!%(B

> > $B$"$H!$(BSNDCTL_DSP_RESET $B$C$FI,MW$G$9$+(B?
> 
> OSS$B$N%,%$%I$N(Bp.31 SettingSamplingParameters$B$K!"(B
> 
>      The device must be reset using the ioctl SNDCTL_DSP_RESET
>      before it can accept new sampling parameters.

$B$3$l$O$?$V$sESCf$G(B sampling rate $B$r@Z$jBX$($k;~$O(B
RESET $B$+$1$^$7$g$&!$$H$$$&$3$H$8$c$J$$$+$H;W$$$^$9!%(B

# $B0c$&$+$J(B...?


$B$"$H!$(Bp106 $B$K(B "full duplex $B$N=q$-J}$N4pK\(B" $B$C$F$N$,(B
$B:\$C$F$^$9$M!%$3$N(B SNDCTL_DSP_SETDUPLEX $B$,(B(OSS$B$@$H(B)
$BI,MW$@$C$?$j$7$J$$$G$7$g$&$+(B?
-- 
       $B"J"J(B
Zzz.. (- - )$B"^"^"=!A(B           $B@n8}(B $B6d2O(B
      ##############   ginga-freebsd@ginganet.org
