From 94b98e031bb001ddfb076176ee098dad37d3fcb9 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Mon, 20 Jan 2014 18:17:58 +0000 Subject: [PATCH] Added defaulting back to PCM when stream stops if was in native DSD mode. Guarded by DEFAULT_TO_PCM and disabled by default. --- module_usb_audio/endpoint0/endpoint0.xc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/module_usb_audio/endpoint0/endpoint0.xc b/module_usb_audio/endpoint0/endpoint0.xc index 55960487..4994529a 100755 --- a/module_usb_audio/endpoint0/endpoint0.xc +++ b/module_usb_audio/endpoint0/endpoint0.xc @@ -253,6 +253,18 @@ void Endpoint0( chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, { case 0: /* Stream stop */ +#if defined(NATIVE_DSD) && defined(DEFAULT_TO_PCM) + /* Default to PCM mode */ + if(g_dsdMode) + { + outuint(c_audioControl, SET_DSD_MODE); + outuint(c_audioControl, DSD_MODE_OFF); + + /* Handshake */ + chkct(c_audioControl, XS1_CT_END); + g_dsdMode = 0; + } +#endif break; case 1: /* Stream active + 0 chans */