Changeset 6233c4e in mainline for uspace/drv/audio/sb16/dsp_commands.h


Ignore:
Timestamp:
2011-10-24T21:50:31Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
88dcd19
Parents:
0b4f060
Message:

sb16: Prettify debug output.

Add mode to string conversion.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/audio/sb16/dsp_commands.h

    r0b4f060 r6233c4e  
    162162        DMA_16B_EXIT = 0xd9, /* Ends DMA transfer and terminates I/O process */
    163163} dsp_command_t;
     164/*----------------------------------------------------------------------------*/
     165#define DSP_MODE_16BIT 0x10
     166#define DSP_MODE_STEREO 0x20
     167
     168static inline const char * mode_to_str(uint8_t mode)
     169{
     170        if (mode & 0xcf)
     171                return "unknown";
     172        static const char * names[] = {
     173                "unsigned mono (8bit)",
     174                "signed mono (16bit)",
     175                "unsigned stereo (8bit)",
     176                "signed stereo (16bit)",
     177        };
     178        return names[mode >> 4];
     179}
    164180
    165181#endif
Note: See TracChangeset for help on using the changeset viewer.