•  Back 
  •  XBIOS Function Reference 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-FileSoundcmd()
Devconnect()                                                          XBIOS

Syntax

LONG Devconnect( source, dest, clk, prescale, protocol )
WORD source, dest, clk, prescale, protocol;

Function      Devconnect() attaches a source device in the sound system to
              one or multiple destination devices through the use of the
              connection matrix.

Opcode        139 (0x8B)

Availability  Available only when bit #2 of the '_SND' cookie is set.

Parameters    source indicates the source device to connect as follows:

              Name     source   Meaning

              DMAPLAY     0     DMA Playback

              DSPXMIT     1     DSP Transmit

              EXTINP      2     External Input

              ADC         3     Microphone/Yamaha PSG

              dest is a bit mask which is used to choose which destination
              devices to connect as follows:

              Name     Mask     Meaning

              DMAREC   0x01     DMA Record

              DSPRECV  0x02     DSP Receive

              EXTOUT   0x04     External Out

              DAC      0x08     DAC (Headphone or Internal Speaker)

              clk is the clock the source device will use as follows:

              Name     clk      Meaning

              CLK_25M   0       Internal 25.175 MHz clock

              CLK_EXT   1       External clock

              CLK_32M   2       Internal 32 MHz clock

              prescale chooses the source clock prescaler. Sample rate is
              determined by the formula:

                                  clockrate / 256
                          rate = ----------------
                                   prescale + 1

              Valid prescaler values for the internal CODEC using
              the 25.175 MHz clock are:

              Name      prescale   Meaning/Sample Rate

              CLK_COMPAT    0      TT030/STe compatiblity mode. Use
                                   prescale value set with Soundcmd().

              CLK_50K       1      49170 Hz

              CLK_33K       2      32880 Hz

              CLK_25K       3      24585 Hz

              CLK_20K       4      19668 Hz

              CLK_16K       5      16390 Hz

              CLK_12K       7      12292 Hz

              CLK_10K       9       9834 Hz

              CLK_8K       11       8195 Hz

              protocol sets the handshaking mode. A value of HANDSHAKE (0)
              enables handshaking, NO_SHAKE (1) disables it. When
              transferring sound or video data through the CODEC it is
              usually recommended that handshaking be disabled. When
              incoming data must be 100% error free, however, handshaking
              should be enabled.

Binding       move.w   protocol,-(sp)
              move.w   prescale,-(sp)
              move.w   clk,-(sp)
              move.w   dest,-(sp)
              move.w   source,-(sp)
              move.w   #$8B,-(sp)
              trap     #14
              lea      12(sp),sp

Return Value  Devconnect() returns 0 if the operation was successful or
              non-zero otherwise.

Caveats       Setting the prescaler to an invalid value will result in
              a mute condition.

See Also      Soundcmd()