diff options
| author | Girish Pattabiraman <[email protected]> | 2018-08-13 10:54:19 -0700 |
|---|---|---|
| committer | Adonais Romero González <[email protected]> | 2018-08-13 10:54:19 -0700 |
| commit | 2af3e666d01a60568c2875b4ccbd56b122ad714f (patch) | |
| tree | 29825a7b7cb0f6a9f77f1ab6e5813665d45ca4cc /audio/sysvad/EndpointsCommon/micarraytopo.cpp | |
| parent | 181c180357cdf9a04d5e3bb21a8e86dc2155ca69 (diff) | |
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
Diffstat (limited to 'audio/sysvad/EndpointsCommon/micarraytopo.cpp')
| -rw-r--r-- | audio/sysvad/EndpointsCommon/micarraytopo.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
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); } |
