diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/audio_format.c | 12 | ||||
-rw-r--r-- | src/audio_format.h | 9 | ||||
-rw-r--r-- | src/audio_parser.c | 6 | ||||
-rw-r--r-- | src/decoder/flac_pcm.c | 1 | ||||
-rw-r--r-- | src/output/alsa_output_plugin.c | 1 | ||||
-rw-r--r-- | src/output/oss_output_plugin.c | 1 | ||||
-rw-r--r-- | src/pcm_convert.c | 36 | ||||
-rw-r--r-- | src/pcm_export.c | 2 | ||||
-rw-r--r-- | src/pcm_format.c | 4 | ||||
-rw-r--r-- | src/pcm_mix.c | 2 | ||||
-rw-r--r-- | src/pcm_volume.c | 1 |
11 files changed, 1 insertions, 74 deletions
diff --git a/src/audio_format.c b/src/audio_format.c index 73b11096a..45d94a853 100644 --- a/src/audio_format.c +++ b/src/audio_format.c @@ -29,15 +29,6 @@ audio_format_mask_apply(struct audio_format *af, assert(audio_format_valid(af)); assert(audio_format_mask_valid(mask)); - if (af->format == SAMPLE_FORMAT_DSD && - mask->format == SAMPLE_FORMAT_DSD_OVER_USB && - mask->sample_rate == 0) - /* each DSD-over-USB sample contains 2 DSD bytes (16 - DSD bits), which means the sample rate must be - halved; this is not the real 1 bit sample rate, but - MPD's point of view */ - af->sample_rate /= 2; - if (mask->sample_rate != 0) af->sample_rate = mask->sample_rate; @@ -74,9 +65,6 @@ sample_format_to_string(enum sample_format format) case SAMPLE_FORMAT_DSD: return "dsd"; - - case SAMPLE_FORMAT_DSD_OVER_USB: - return "dsdusb"; } /* unreachable */ diff --git a/src/audio_format.h b/src/audio_format.h index 43d624243..bf77add3b 100644 --- a/src/audio_format.h +++ b/src/audio_format.h @@ -50,13 +50,6 @@ enum sample_format { * byte (8 samples) per channel. */ SAMPLE_FORMAT_DSD, - - /** - * DSD packed in 24 bit samples (padded to 32 bit), according - * to the dCS suggested standard: - * http://www.dcsltd.co.uk/page/assets/DSDoverUSB.pdf - */ - SAMPLE_FORMAT_DSD_OVER_USB, }; static const unsigned MAX_CHANNELS = 8; @@ -174,7 +167,6 @@ audio_valid_sample_format(enum sample_format format) case SAMPLE_FORMAT_S32: case SAMPLE_FORMAT_FLOAT: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: return true; case SAMPLE_FORMAT_UNDEFINED: @@ -245,7 +237,6 @@ sample_format_size(enum sample_format format) case SAMPLE_FORMAT_S24_P32: case SAMPLE_FORMAT_S32: case SAMPLE_FORMAT_FLOAT: - case SAMPLE_FORMAT_DSD_OVER_USB: return 4; case SAMPLE_FORMAT_DSD: diff --git a/src/audio_parser.c b/src/audio_parser.c index d5a3eb97e..b1be8887a 100644 --- a/src/audio_parser.c +++ b/src/audio_parser.c @@ -87,12 +87,6 @@ parse_sample_format(const char *src, bool mask, return true; } - if (memcmp(src, "dsdusb", 6) == 0) { - *sample_format_r = SAMPLE_FORMAT_DSD_OVER_USB; - *endptr_r = src + 6; - return true; - } - if (memcmp(src, "dsd", 3) == 0) { *sample_format_r = SAMPLE_FORMAT_DSD; *endptr_r = src + 3; diff --git a/src/decoder/flac_pcm.c b/src/decoder/flac_pcm.c index 173213f9e..6964d8ac6 100644 --- a/src/decoder/flac_pcm.c +++ b/src/decoder/flac_pcm.c @@ -103,7 +103,6 @@ flac_convert(void *dest, case SAMPLE_FORMAT_FLOAT: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: case SAMPLE_FORMAT_UNDEFINED: /* unreachable */ assert(false); diff --git a/src/output/alsa_output_plugin.c b/src/output/alsa_output_plugin.c index 9faacb0a9..a6dc92fa0 100644 --- a/src/output/alsa_output_plugin.c +++ b/src/output/alsa_output_plugin.c @@ -227,7 +227,6 @@ get_bitformat(enum sample_format sample_format) switch (sample_format) { case SAMPLE_FORMAT_UNDEFINED: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: return SND_PCM_FORMAT_UNKNOWN; case SAMPLE_FORMAT_S8: diff --git a/src/output/oss_output_plugin.c b/src/output/oss_output_plugin.c index f59ee3b92..e366a4537 100644 --- a/src/output/oss_output_plugin.c +++ b/src/output/oss_output_plugin.c @@ -433,7 +433,6 @@ sample_format_to_oss(enum sample_format format) case SAMPLE_FORMAT_UNDEFINED: case SAMPLE_FORMAT_FLOAT: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: return AFMT_QUERY; case SAMPLE_FORMAT_S8: diff --git a/src/pcm_convert.c b/src/pcm_convert.c index f19a95223..63f9a1b98 100644 --- a/src/pcm_convert.c +++ b/src/pcm_convert.c @@ -22,7 +22,6 @@ #include "pcm_channels.h" #include "pcm_format.h" #include "pcm_pack.h" -#include "pcm_dsd_usb.h" #include "audio_format.h" #include "glib_compat.h" @@ -76,7 +75,6 @@ pcm_convert_channels(struct pcm_buffer *buffer, enum sample_format format, case SAMPLE_FORMAT_S8: case SAMPLE_FORMAT_FLOAT: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: g_set_error(error_r, pcm_convert_quark(), 0, "Channel conversion not implemented for format '%s'", sample_format_to_string(format)); @@ -326,40 +324,6 @@ pcm_convert(struct pcm_convert_state *state, size_t *dest_size_r, GError **error_r) { - struct audio_format usb_format; - - if (src_format->format == SAMPLE_FORMAT_DSD && - dest_format->format == SAMPLE_FORMAT_DSD_OVER_USB) { - size_t u_size; - const uint32_t *u = pcm_dsd_to_usb(&state->dsd.buffer, - src_format->channels, - src, src_size, - &u_size); - if (u == NULL) { - g_set_error_literal(error_r, pcm_convert_quark(), 0, - "DSD to USB conversion failed"); - return NULL; - } - - usb_format = *src_format; - usb_format.format = SAMPLE_FORMAT_DSD_OVER_USB; - - /* each DSD-over-USB sample contains 2 DSD bytes (16 - DSD bits), which means the sample rate must be - halved; this is not the real 1 bit sample rate, but - MPD's point of view */ - usb_format.sample_rate = usb_format.sample_rate / 2; - - if (audio_format_equals(&usb_format, dest_format)) { - *dest_size_r = u_size; - return u; - } - - src_format = &usb_format; - src = u; - src_size = u_size; - } - struct audio_format float_format; if (src_format->format == SAMPLE_FORMAT_DSD) { size_t f_size; diff --git a/src/pcm_export.c b/src/pcm_export.c index dbd9f2e8e..e586b51d2 100644 --- a/src/pcm_export.c +++ b/src/pcm_export.c @@ -54,7 +54,7 @@ pcm_export_open(struct pcm_export_state *state, sample_format = SAMPLE_FORMAT_S24_P32; state->shift8 = shift8 && sample_format == SAMPLE_FORMAT_S24_P32; - state->pack24 = pack && (sample_format == SAMPLE_FORMAT_S24_P32 || sample_format == SAMPLE_FORMAT_DSD_OVER_USB); + state->pack24 = pack && sample_format == SAMPLE_FORMAT_S24_P32; assert(!state->shift8 || !state->pack24); diff --git a/src/pcm_format.c b/src/pcm_format.c index 06fc94472..d3ea3acb0 100644 --- a/src/pcm_format.c +++ b/src/pcm_format.c @@ -121,7 +121,6 @@ pcm_convert_to_16(struct pcm_buffer *buffer, struct pcm_dither *dither, switch (src_format) { case SAMPLE_FORMAT_UNDEFINED: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: break; case SAMPLE_FORMAT_S8: @@ -237,7 +236,6 @@ pcm_convert_to_24(struct pcm_buffer *buffer, switch (src_format) { case SAMPLE_FORMAT_UNDEFINED: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: break; case SAMPLE_FORMAT_S8: @@ -345,7 +343,6 @@ pcm_convert_to_32(struct pcm_buffer *buffer, switch (src_format) { case SAMPLE_FORMAT_UNDEFINED: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: break; case SAMPLE_FORMAT_S8: @@ -463,7 +460,6 @@ pcm_convert_to_float(struct pcm_buffer *buffer, switch (src_format) { case SAMPLE_FORMAT_UNDEFINED: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: break; case SAMPLE_FORMAT_S8: diff --git a/src/pcm_mix.c b/src/pcm_mix.c index 5119f5921..6c6d1b4ab 100644 --- a/src/pcm_mix.c +++ b/src/pcm_mix.c @@ -120,7 +120,6 @@ pcm_add_vol(void *buffer1, const void *buffer2, size_t size, switch (format) { case SAMPLE_FORMAT_UNDEFINED: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: /* not implemented */ return false; @@ -230,7 +229,6 @@ pcm_add(void *buffer1, const void *buffer2, size_t size, switch (format) { case SAMPLE_FORMAT_UNDEFINED: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: /* not implemented */ return false; diff --git a/src/pcm_volume.c b/src/pcm_volume.c index a694d99e9..49c86026f 100644 --- a/src/pcm_volume.c +++ b/src/pcm_volume.c @@ -159,7 +159,6 @@ pcm_volume(void *buffer, size_t length, switch (format) { case SAMPLE_FORMAT_UNDEFINED: case SAMPLE_FORMAT_DSD: - case SAMPLE_FORMAT_DSD_OVER_USB: /* not implemented */ return false; |