Changeset 84d6c39 in mainline for uspace/drv/audio/sb16/dsp.c


Ignore:
Timestamp:
2011-11-30T23:13:35Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
57cf3b3
Parents:
ac07a13
Message:

sb16: Drop support for 8bit format for now.

Looks like 8bit playback needs working dma8 channel (need to verify).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/sb16/dsp.c

    rac07a13 r84d6c39  
    148148static inline size_t sample_count(uint8_t mode, size_t byte_count)
    149149{
    150         if (mode & DSP_MODE_16BIT) {
     150        // FIXME we only support 16 bit playback for now.
     151        return byte_count / 2;
     152
     153        if (mode & DSP_MODE_SIGNED) {
    151154                return byte_count / 2;
    152155        }
     
    256259
    257260        /* Check supported parameters */
    258         if (sample_size != 8 && sample_size != 16)
     261        if (sample_size != 16) // FIXME We only support 16 bit playback
    259262                return ENOTSUP;
    260263        if (channels != 1 && channels != 2)
     
    275278        dsp->playing.mode = 0;
    276279
    277         if (sample_size == 16)
    278                 dsp->playing.mode |= DSP_MODE_16BIT;
     280                dsp->playing.mode |= DSP_MODE_SIGNED;
    279281        if (channels == 2)
    280282                dsp->playing.mode |= DSP_MODE_STEREO;
Note: See TracChangeset for help on using the changeset viewer.