From 2af3e666d01a60568c2875b4ccbd56b122ad714f Mon Sep 17 00:00:00 2001 From: Girish Pattabiraman Date: Mon, 13 Aug 2018 10:54:19 -0700 Subject: Update sample to get ready for RS4 changes - merge pre-RS4 fixes. (#256) * Format Changes ============== * Add KSEVENT_PINCAPS_FORMATCHANGE to Bluetooth HFP Endpoints * Remove 8 bit formats from Bluetooth HFP Endpoints Name Template ============== * Bluetooth Endpoints are now based on templates in INF and then customized with endpoints specific data Sideband Common Interface for future Sideband buses =================================================== * Add ISidebandDevice * Add current directory to TabletAudioSample include path. Remove unused compiler flags. * RS4 bug fixes --- audio/sysvad/EndpointsCommon/micarraytopo.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'audio/sysvad/EndpointsCommon/micarraytopo.cpp') diff --git a/audio/sysvad/EndpointsCommon/micarraytopo.cpp b/audio/sysvad/EndpointsCommon/micarraytopo.cpp index a8125a08..88431df1 100644 --- a/audio/sysvad/EndpointsCommon/micarraytopo.cpp +++ b/audio/sysvad/EndpointsCommon/micarraytopo.cpp @@ -20,6 +20,7 @@ Abstract: #include "micarray1toptable.h" constexpr float MICARRAY_SENSITIVITY = -46.5f; +constexpr float MICARRAY_SENSITIVITY2 = -23.5f; constexpr float MICARRAY_SNR = 66.0f; constexpr inline LONG FloatToFixedPoint16_16(float fl) @@ -514,8 +515,8 @@ CMicArrayMiniportTopology::PropertyHandlerMicProperties Routine Description: -Handles ( KSPROPSETID_Audio, KSPROPERTY_AUDIO_MIC_SENSITIVITY ) Handles ( KSPROPSETID_Audio, KSPROPERTY_AUDIO_MIC_SNR ) +Handles ( KSPROPSETID_Audio, KSPROPERTY_AUDIO_MIC_SENSITIVITY2 ) Arguments: @@ -568,28 +569,26 @@ NT status code. { if (PropertyRequest->Verb & KSPROPERTY_TYPE_GET) { - if (PropertyRequest->PropertyItem->Id == KSPROPERTY_AUDIO_MIC_SENSITIVITY) + if (PropertyRequest->PropertyItem->Id == KSPROPERTY_AUDIO_MIC_SNR) { - LONG* micSensitivity = (LONG*)PropertyRequest->Value; - + LONG* micSNR = (LONG*)PropertyRequest->Value; fstatus = KeSaveFloatingPointState(&saveData); if (NT_SUCCESS(fstatus)) { - // Return microphone sensitivity information. - *micSensitivity = FloatToFixedPoint16_16(MICARRAY_SENSITIVITY); // convert float dBFS to fixed point arithmetic + // Return microphone SNR information. + *micSNR = FloatToFixedPoint16_16(MICARRAY_SNR); // convert float dB to fixed point arithmetic KeRestoreFloatingPointState(&saveData); } - PropertyRequest->ValueSize = sizeof(LONG); ntStatus = STATUS_SUCCESS; } - else if (PropertyRequest->PropertyItem->Id == KSPROPERTY_AUDIO_MIC_SNR) + else if (PropertyRequest->PropertyItem->Id == KSPROPERTY_AUDIO_MIC_SENSITIVITY2) { - LONG* micSNR = (LONG*)PropertyRequest->Value; + LONG* micSensitivity2 = (LONG*)PropertyRequest->Value; fstatus = KeSaveFloatingPointState(&saveData); if (NT_SUCCESS(fstatus)) { // Return microphone SNR information. - *micSNR = FloatToFixedPoint16_16(MICARRAY_SNR); // convert float dB to fixed point arithmetic + *micSensitivity2 = FloatToFixedPoint16_16(MICARRAY_SENSITIVITY2); // convert float dB to fixed point arithmetic KeRestoreFloatingPointState(&saveData); } ntStatus = STATUS_SUCCESS; @@ -842,7 +841,7 @@ Return Value: { ntStatus = pMiniport->PropertyHandlerMicArrayGeometry(PropertyRequest); } - else if (PropertyRequest->PropertyItem->Id == KSPROPERTY_AUDIO_MIC_SENSITIVITY) + else if (PropertyRequest->PropertyItem->Id == KSPROPERTY_AUDIO_MIC_SENSITIVITY2) { ntStatus = pMiniport->PropertyHandlerMicProperties(PropertyRequest); } -- cgit v1.3.1