Skip to content

Commit

Permalink
Merge pull request torvalds#19 from hendecarows/feature/isdbt2071
Browse files Browse the repository at this point in the history
Windows版に対してISDBT2071(DTV03A-1TU シリアル202111以降)への暫定的な対応を追加
  • Loading branch information
tsukumijima authored Jan 10, 2025
2 parents 796bff8 + adf8f45 commit b97c90e
Show file tree
Hide file tree
Showing 9 changed files with 1,126 additions and 0 deletions.
19 changes: 19 additions & 0 deletions winusb/pkg/BonDriver_PX4/BonDriver_ISDBT2071.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[BonDriver]
Name="ISDBT2071"
System="ISDB-T"
DriverHostPath=".\DriverHost_PX4.exe"
PipeConnectTimeout=1000
TuneTimeout=5000
NumberOfPacketsPerBuffer=1024
MaximumNumberOfBuffers=64
MinimumNumberOfBuffers=4
NumberOfBuffersToIgnoreAfterPurge=1
DisplayErrorMessage=0

[BonDriver.ISDB-T]
ChSetPath="BonDriver_PX4-T.ChSet.txt"

[ReceiverDefinition0]
DeviceName="Digibest ISDBT2071"
DeviceGUID="{3dff00b8-b3f4-41ee-9d68-5e458143086e}"
System="ISDB-T"
20 changes: 20 additions & 0 deletions winusb/pkg/DriverHost_PX4/DriverHost_PX4.ini
Original file line number Diff line number Diff line change
Expand Up @@ -486,3 +486,23 @@ Name="PLEX PX-S1UR ISDB-T Receiver #0"
GUID="{f060ae2a-98d6-4149-9c9d-e0bfd28f6816}"
System="ISDB-T"
Index=0

[DeviceDefinition14]
Name="Digibest ISDBT2071"
GUID="{3dff00b8-b3f4-41ee-9d68-5e458143086e}"
Type="ISDBT2071"
DeviceInterfaceGUID="{ac1e5fa2-e265-4819-9b29-2be8a44ce4c9}"

[DeviceDefinition14.Config]
XferPackets=816
UrbMaxPackets=816
MaxUrbs=5
NoRawIo=false
ReceiverMaxPackets=2048
PsbPurgeTimeout=2000
DiscardNullPackets=true
[DeviceDefinition14.Receiver0]
Name="Digibest ISDBT2071 ISDB-T Receiver #0"
GUID="{b1f46b07-89ef-4f64-b531-21295108a393}"
System="ISDB-T"
Index=0
44 changes: 44 additions & 0 deletions winusb/pkg/inf/DTV03A-1TU_ISDBT2071.inf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
;
; Digibest ISDBT2071 (MAXWIN DTV03A-1TU)
;
[Version]
Signature="$Windows NT$"
Class=Media
ClassGuid={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider=%AuthorName%
DriverVer=05/01/2021,21.05.01.00
;CatalogFile=px4_drv_winusb.cat

[Manufacturer]
%AuthorName%=ISDBT2071_WinUSB,ntx86,ntamd64,ntarm64

[ISDBT2071_WinUSB.ntx86]
%ISDBT2071_WinUSB.DeviceDesc%=ISDBT2071_WinUSB.DeviceInstall,USB\VID_0511&PID_0052

[ISDBT2071_WinUSB.ntamd64]
%ISDBT2071_WinUSB.DeviceDesc%=ISDBT2071_WinUSB.DeviceInstall,USB\VID_0511&PID_0052

[ISDBT2071_WinUSB.ntarm64]
%ISDBT2071_WinUSB.DeviceDesc%=ISDBT2071_WinUSB.DeviceInstall,USB\VID_0511&PID_0052

[ISDBT2071_WinUSB.DeviceInstall]
Include=winusb.inf
Needs=WINUSB.NT
AddProperty=ISDBT2071_WinUSB.DeviceSetup.AddProperty

[ISDBT2071_WinUSB.DeviceInstall.Services]
Include=winusb.inf
Needs=WINUSB.NT.Services

[ISDBT2071_WinUSB.DeviceInstall.HW]
AddReg=ISDBT2071_WinUSB.DeviceSetup.AddReg

[ISDBT2071_WinUSB.DeviceSetup.AddReg]
HKR,,DeviceInterfaceGUIDs,0x00010000,"{ac1e5fa2-e265-4819-9b29-2be8a44ce4c9}"

[ISDBT2071_WinUSB.DeviceSetup.AddProperty]
{afd97640-86a3-4210-b67c-289c41aabe55},3,0x00000011,,0 ;DEVPKEY_Device_SafeRemovalRequiredOverride=FALSE

[Strings]
AuthorName="nns779"
ISDBT2071_WinUSB.DeviceDesc="Digibest ISDBT2071 (DTV03A-1TU) ISDB-T Receiver Device (WinUSB)"
2 changes: 2 additions & 0 deletions winusb/src/DriverHost_PX4/DriverHost_PX4.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@
<ClCompile Include="device_notifier.cpp" />
<ClCompile Include="driver_host.cpp" />
<ClCompile Include="isdb2056_device.cpp" />
<ClCompile Include="isdbt2071_device.cpp" />
<ClCompile Include="itedtv_bus_winusb.c" />
<ClCompile Include="main.cpp" />
<ClCompile Include="misc_win.c" />
Expand Down Expand Up @@ -296,6 +297,7 @@
<ClInclude Include="device_notifier.hpp" />
<ClInclude Include="driver_host.hpp" />
<ClInclude Include="isdb2056_device.hpp" />
<ClInclude Include="isdbt2071_device.hpp" />
<ClInclude Include="misc_win.h" />
<ClInclude Include="notify_icon.hpp" />
<ClInclude Include="pipe_server.hpp" />
Expand Down
6 changes: 6 additions & 0 deletions winusb/src/DriverHost_PX4/DriverHost_PX4.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@
<ClCompile Include="isdb2056_device.cpp">
<Filter>ソース ファイル</Filter>
</ClCompile>
<ClCompile Include="isdbt2071_device.cpp">
<Filter>ソース ファイル</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\driver\cxd2856er.h">
Expand Down Expand Up @@ -212,6 +215,9 @@
<ClInclude Include="isdb2056_device.hpp">
<Filter>ヘッダー ファイル</Filter>
</ClInclude>
<ClInclude Include="isdbt2071_device.hpp">
<Filter>ヘッダー ファイル</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\pkg\DriverHost_PX4\DriverHost_PX4.ini">
Expand Down
13 changes: 13 additions & 0 deletions winusb/src/DriverHost_PX4/device_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "px4_device.hpp"
#include "pxmlt_device.hpp"
#include "isdb2056_device.hpp"
#include "isdbt2071_device.hpp"

namespace px4 {

Expand Down Expand Up @@ -50,6 +51,8 @@ DeviceManager::DeviceManager(const px4::DeviceDefinitionSet &device_defs, px4::R
type = DeviceType::PXMLT;
else if (it->first == L"ISDB2056")
type = DeviceType::ISDB2056;
else if (it->first == L"ISDBT2071")
type = DeviceType::ISDBT2071;

if (type == DeviceType::UNKNOWN)
continue;
Expand Down Expand Up @@ -149,6 +152,16 @@ void DeviceManager::Add(const std::wstring &path, const std::pair<DeviceType, px
break;
}

case px4::DeviceType::ISDBT2071:
{
auto dev = std::make_unique<Isdbt2071Device>(path, def.second, ++index_, receiver_manager_);

if (!dev->Init())
devices_.emplace(path, std::move(dev));

break;
}

default:
break;
}
Expand Down
1 change: 1 addition & 0 deletions winusb/src/DriverHost_PX4/device_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ enum class DeviceType : std::uint32_t {
PX4,
PXMLT,
ISDB2056,
ISDBT2071,
};

class DeviceManager final {
Expand Down
Loading

0 comments on commit b97c90e

Please sign in to comment.