From eb95a1532c6a44e52494aeb3935da238fc1dfa6a Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 24 Oct 2013 11:19:17 +0100 Subject: [PATCH] Added dsd_support.h --- module_usb_audio/audiohw.h | 2 -- module_usb_audio/commands.h | 2 +- module_usb_audio/dsd_support.h | 16 ++++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 module_usb_audio/dsd_support.h diff --git a/module_usb_audio/audiohw.h b/module_usb_audio/audiohw.h index e8dafa27..bce49770 100644 --- a/module_usb_audio/audiohw.h +++ b/module_usb_audio/audiohw.h @@ -1,8 +1,6 @@ #ifndef _CODEC_H_ #define _CODEC_H_ -#include "dsd.h" - /* These functions must be implemented for the CODEC/ADC/DAC arrangement of a specific design */ /* TODO Are the channel args required? */ diff --git a/module_usb_audio/commands.h b/module_usb_audio/commands.h index 8eeca362..bf9f824b 100644 --- a/module_usb_audio/commands.h +++ b/module_usb_audio/commands.h @@ -27,7 +27,7 @@ #define SET_CHAN_COUNT_OUT 6 #define SET_DSD_MODE 7 -#include "dsd.h" +#include "dsd_support.h" diff --git a/module_usb_audio/dsd_support.h b/module_usb_audio/dsd_support.h new file mode 100644 index 00000000..6f3ad91c --- /dev/null +++ b/module_usb_audio/dsd_support.h @@ -0,0 +1,16 @@ + +#ifndef _DSD_H_ +#define _DSD_H_ + +#define DSD_MODE_OFF 0 +#define DSD_MODE_DOP 1 +#define DSD_MODE_NATIVE 2 + +/* DoP defines */ +#define DSD_MARKER_1 0xFA +#define DSD_MARKER_2 0x05 +#define DSD_MARKER_XOR 0xFF +#define DSD_EN_THRESH 32 /* Number of consecutive DSD markers before switching to DSD mode */ +#define DSD_MASK(x) ((x >> 24) & 0xff) + +#endif