summaryrefslogtreecommitdiff
path: root/audio/sysvad/EndpointsCommon/mintopo.cpp
diff options
context:
space:
mode:
authorGirish Pattabiraman <[email protected]>2018-08-13 10:54:19 -0700
committerAdonais Romero González <[email protected]>2018-08-13 10:54:19 -0700
commit2af3e666d01a60568c2875b4ccbd56b122ad714f (patch)
tree29825a7b7cb0f6a9f77f1ab6e5813665d45ca4cc /audio/sysvad/EndpointsCommon/mintopo.cpp
parent181c180357cdf9a04d5e3bb21a8e86dc2155ca69 (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/mintopo.cpp')
-rw-r--r--audio/sysvad/EndpointsCommon/mintopo.cpp52
1 files changed, 25 insertions, 27 deletions
diff --git a/audio/sysvad/EndpointsCommon/mintopo.cpp b/audio/sysvad/EndpointsCommon/mintopo.cpp
index 42e61868..d0ecd848 100644
--- a/audio/sysvad/EndpointsCommon/mintopo.cpp
+++ b/audio/sysvad/EndpointsCommon/mintopo.cpp
@@ -110,30 +110,24 @@ Return Value:
DPF_ENTER(("[CMiniportTopology::~CMiniportTopology]"));
-#ifdef SYSVAD_BTH_BYPASS
- if (IsBthHfpDevice())
+#if defined(SYSVAD_BTH_BYPASS)
+ if (IsSidebandDevice())
{
- ASSERT(m_BthHfpDevice != NULL);
+ ASSERT(m_pSidebandDevice != NULL);
//
// Register with BthHfpDevice to get notification events.
//
- if (m_DeviceType == eBthHfpMicDevice)
- {
- m_BthHfpDevice->SetMicVolumeHandler(NULL, NULL);
- m_BthHfpDevice->SetMicConnectionStatusHandler(NULL, NULL);
- }
- else
+ if(IsSidebandDevice())
{
- ASSERT(m_DeviceType == eBthHfpSpeakerDevice);
-
- m_BthHfpDevice->SetSpeakerVolumeHandler(NULL, NULL);
- m_BthHfpDevice->SetSpeakerConnectionStatusHandler(NULL, NULL);
+ m_pSidebandDevice->SetVolumeHandler(m_DeviceType, NULL, NULL);
+ m_pSidebandDevice->SetMuteHandler(m_DeviceType, NULL, NULL);
+ m_pSidebandDevice->SetConnectionStatusHandler(m_DeviceType, NULL, NULL);
}
- SAFE_RELEASE(m_BthHfpDevice); // IBthHfpDeviceCommon
+ SAFE_RELEASE(m_pSidebandDevice); // ISidebandDeviceCommon
}
-#endif // SYSVAD_BTH_BYPASS
+#endif // defined(SYSVAD_BTH_BYPASS)
} // ~CMiniportTopology
@@ -287,24 +281,26 @@ Return Value:
DPF(D_ERROR, ("Init: CMiniportTopologySYSVAD::Init failed, 0x%x", ntStatus)),
Done);
-#ifdef SYSVAD_BTH_BYPASS
- if (IsBthHfpDevice())
+#if defined(SYSVAD_BTH_BYPASS)
+ if (IsSidebandDevice())
{
- PBTHHFPDEVICECOMMON bthHfpDevice = NULL;
+ PSIDEBANDDEVICECOMMON sidebandDevice = NULL;
- bthHfpDevice = GetBthHfpDevice(); // weak ref.
- ASSERT(bthHfpDevice != NULL);
+ sidebandDevice = GetSidebandDevice(); // weak ref.
+ ASSERT(sidebandDevice != NULL);
//
// Register with BthHfpDevice to get notification events.
//
if (m_DeviceType == eBthHfpMicDevice)
{
- bthHfpDevice->SetMicVolumeHandler(
+ sidebandDevice->SetVolumeHandler(
+ m_DeviceType,
EvtMicVolumeHandler, // handler
PCMiniportTopology(this)); // context.
- bthHfpDevice->SetMicConnectionStatusHandler(
+ sidebandDevice->SetConnectionStatusHandler(
+ m_DeviceType,
EvtMicConnectionStatusHandler, // handler
PCMiniportTopology(this)); // context.
}
@@ -312,16 +308,18 @@ Return Value:
{
ASSERT(m_DeviceType == eBthHfpSpeakerDevice);
- bthHfpDevice->SetSpeakerVolumeHandler(
+ sidebandDevice->SetVolumeHandler(
+ m_DeviceType,
EvtSpeakerVolumeHandler, // handler
PCMiniportTopology(this)); // context.
- bthHfpDevice->SetSpeakerConnectionStatusHandler(
+ sidebandDevice->SetConnectionStatusHandler(
+ m_DeviceType,
EvtSpeakerConnectionStatusHandler, // handler
PCMiniportTopology(this)); // context.
}
}
-#endif // SYSVAD_BTH_BYPASS
+#endif // defined(SYSVAD_BTH_BYPASS)
Done:
return ntStatus;
@@ -583,7 +581,7 @@ Return Value:
return ntStatus;
}
-#ifdef SYSVAD_BTH_BYPASS
+#if defined(SYSVAD_BTH_BYPASS)
//=============================================================================
#pragma code_seg()
VOID
@@ -687,7 +685,7 @@ CMiniportTopology::EvtMicConnectionStatusHandler
FALSE, // do not use node ID.
ULONG(-1)); // node ID, not used.
}
-#endif // SYSVAD_BTH_BYPASS
+#endif // defined(SYSVAD_BTH_BYPASS)
//=============================================================================
#pragma code_seg("PAGE")