All of lore.kernel.org
 help / color / mirror / Atom feed
* Audigy 2 SPDIF rates.
@ 2005-03-12 22:24 James Courtier-Dutton
  0 siblings, 0 replies; only message in thread
From: James Courtier-Dutton @ 2005-03-12 22:24 UTC (permalink / raw)
  To: ALSA development

I have found some more rates that the Audigy 2 SPDIF can run at:

Using the register 0x76 A_SPDIF_RATE.
00 => 48000
20 => 192000
40 => 96000
80 => 44100
No other rates are possible.

To detect the rate, loop the SPDIF output into an input and look at 
register 0x61 GPSRCS

Detected rate = ( ( GPSRCS & 0xFFFFF ) * 48000 ) / 0x40000
or
Detected rate = ( ( GPSRCS & 0xFFFFF ) * 48000 ) / 262144

The GPSRCS register is only valid if 0x51 != 0xffffffff
0x51 is GPSCS which is the SPDIF status register. containing details 
about non-audio bits etc.

Likewise, 0x50 and 0x60 for the CD SPDIF input.

So, the header file should be changed from:
#define A_SPDIF_SAMPLERATE      0x76            /* Set the sample rate 
of SPDIF output          */
#define A_SPDIF_RATE_MASK       0x000000c0
#define A_SPDIF_48000           0x00000000
#define A_SPDIF_44100           0x00000080
#define A_SPDIF_96000           0x00000040

To:
#define A_SPDIF_SAMPLERATE      0x76            /* Set the sample rate 
of SPDIF output          */
#define A_SPDIF_RATE_MASK       0x000000e0
#define A_SPDIF_48000           0x00000000
#define A_SPDIF_44100           0x00000080
#define A_SPDIF_96000           0x00000040
#define A_SPDIF_192000          0x00000020


James


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-12 22:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-12 22:24 Audigy 2 SPDIF rates James Courtier-Dutton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.