• Jaroslav Kysela's avatar
    [ALSA] add 96Khz support and setting sample rate for direct SPDIF output · 6d92388b
    Jaroslav Kysela authored
    EMU10K1/EMU10K2 driver
    This patch should add support for 96Khz 'direct SPDIF' aka 'SPDIF
    Bypass' (not P16V) playback mode available on the Audigy1 and 2 and
    newer SBLives (?).  It lets you bypass the 48khz DSP resampling when
    using the card in digital mode.  It also adds 96khz analog playback
    support, good for testing but less interesting because it's downsampled
    to 48khz.  A new mixer control 'Audigy SPDIF Output Sample Rate' is
    created, you can choose 44100, 48000, or 96000.  Standard SPDIF
    playback, AC3 passthrough (real 96khz playback), and analog playback
    (96khz is resampled to 48khz in the DSP) all work with a 16 bit,96khz
    wav file.  Only the last was tested due to lack of any SPDIF hardware.
    
    This was derived mostly from the opensource.creative.com driver.  All
    that was needed for 96khz playback to work in analog mode was changing
    the format to 8000_96000 (looks like the creative driver supports 192khz
    too).  And, of course this sample rate has always been supported (albeit
    downsampled) because if you have 48khz samples in a soundfont the
    envelope engine has to be able to pitch shift them in both directions.
    
    I still have not been able to figure out how to get 24 bit playback to
    work.  This is possible, independent of the P16V, for spdif and analog
    24/48 playback via the DSP.  I do know how to access the full 24 bits
    from the ADC from within the DSP, just not how to get it in there.  For
    one thing I have no idea which 24 bit format it supports.  Some of them
    seemed to work with JACK but produced noise.
    
    This was generated with my multichannel patch but it applies against
    ALSA CVS as well.
    Signed-off-by: default avatarLee Revell <rlrevell@joe-job.com>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    6d92388b
emumixer.c 21.6 KB