Merge branch 'develop' of github.com:techmadot/px4_drv into develop

This commit is contained in:
tsukumi
2023-05-28 17:14:37 +00:00
5 changed files with 51 additions and 3 deletions

View File

@@ -27,7 +27,8 @@ PLEX 社の [Webサイト](http://plex-net.co.jp) にて配布されている公
- Visual Studio 2019 が入っていれば、build.jse をクリックするだけで全自動でビルドからパッケージングまで行える
- READMEこのページに WinUSB 版についての記述を追記
Linux 版は、[otya 氏のフォーク](https://github.com/otya128/px4_drv) での更新を取り込んだこと以外はオリジナルのままです。
Linux 版は、[otya 氏のフォーク](https://github.com/otya128/px4_drv) での更新を取り込んだことと、
[techmadot 氏のフォーク](https://github.com/techmadot/px4_drv) の内容を取り込み PX-M1UR に対応したこと以外はオリジナルのままです。
## 対応デバイス
@@ -41,6 +42,7 @@ Linux 版は、[otya 氏のフォーク](https://github.com/otya128/px4_drv) で
- PX-Q3PE5
- PX-MLT5PE
- PX-MLT8PE
- PX-M1UR (Windows 非対応)
- e-Better
@@ -170,6 +172,13 @@ gcc, make, カーネルソース/ヘッダ, dkms がインストールされて
すべてのチューナーにおいて、ISDB-T と ISDB-S のどちらも受信可能です。
##### PLEX PX-M1UR を接続した場合
$ ls /dev/pxm1urvideo*
/dev/pxm1urvideo0
すべてのチューナーにおいて、ISDB-T と ISDB-S のどちらも受信可能です。
##### e-Better DTV02-1T1S-U/DTV02A-1T1S-U を接続した場合
$ ls /dev/isdb2056video*

View File

@@ -49,6 +49,11 @@
#endif
#define ISDB6014_4TS_USB_MAX_CHRDEV (ISDB6014_4TS_USB_MAX_DEVICE * ISDB6014_4TS_CHRDEV_NUM)
#ifndef PXM1UR_USB_MAX_DEVICE
#define PXM1UR_USB_MAX_DEVICE 64
#endif
#define PXM1UR_USB_MAX_CHRDEV (PXM1UR_USB_MAX_DEVICE * ISDB2056_CHRDEV_NUM)
struct px4_usb_context {
enum px4_usb_device_type type;
struct completion quit_completion;
@@ -59,7 +64,7 @@ struct px4_usb_context {
} ctx;
};
static struct ptx_chrdev_context *px4_usb_chrdev_ctx[6];
static struct ptx_chrdev_context *px4_usb_chrdev_ctx[7];
static int px4_usb_init_bridge(struct device *dev, struct usb_device *usb_dev,
struct it930x_bridge *it930x)
@@ -189,6 +194,18 @@ static int px4_usb_probe(struct usb_interface *intf,
&ctx->quit_completion);
break;
case USB_PID_PX_M1UR:
ret = px4_usb_init_bridge(dev, usb_dev,
&ctx->ctx.isdb2056.it930x);
if (ret)
break;
ctx->type = PXM1UR_USB_DEVICE;
ret = isdb2056_device_init(&ctx->ctx.isdb2056, dev,
px4_usb_chrdev_ctx[PXM1UR_USB_DEVICE],
&ctx->quit_completion);
break;
default:
ret = -EINVAL;
break;
@@ -246,6 +263,11 @@ static void px4_usb_disconnect(struct usb_interface *intf)
isdb2056_device_term(&ctx->ctx.isdb2056);
wait_for_completion(&ctx->quit_completion);
break;
case PXM1UR_USB_DEVICE:
isdb2056_device_term(&ctx->ctx.isdb2056);
wait_for_completion(&ctx->quit_completion);
break;
default:
/* unknown device */
@@ -283,6 +305,7 @@ static const struct usb_device_id px4_usb_ids[] = {
{ USB_DEVICE(0x0511, USB_PID_PX_MLT8PE5) },
{ USB_DEVICE(0x0511, USB_PID_DIGIBEST_ISDB2056) },
{ USB_DEVICE(0x0511, USB_PID_DIGIBEST_ISDB6014_4TS) },
{ USB_DEVICE(0x0511, USB_PID_PX_M1UR) },
{ 0 }
};
@@ -349,6 +372,14 @@ int px4_usb_register()
goto fail_isdb6014;
}
ret = ptx_chrdev_context_create("pxm1ur", "pxm1urvideo",
PXM1UR_USB_MAX_CHRDEV,
&px4_usb_chrdev_ctx[PXM1UR_USB_DEVICE]);
if (ret) {
pr_err("px4_usb_register: ptx_chrdev_context_create(\"pxm1ur\") failed.\n");
goto fail_pxm1ur;
}
ret = usb_register(&px4_usb_driver);
if (ret) {
pr_err("px4_usb_register: usb_register() failed.\n");
@@ -360,6 +391,9 @@ int px4_usb_register()
fail_usb:
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[ISDB6014_4TS_USB_DEVICE]);
fail_pxm1ur:
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[PXM1UR_USB_DEVICE]);
fail_isdb6014:
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[ISDB2056_USB_DEVICE]);
@@ -379,6 +413,7 @@ fail:
void px4_usb_unregister()
{
usb_deregister(&px4_usb_driver);
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[PXM1UR_USB_DEVICE]);
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[ISDB6014_4TS_USB_DEVICE]);
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[ISDB2056_USB_DEVICE]);
ptx_chrdev_context_destroy(px4_usb_chrdev_ctx[PXMLT8_USB_DEVICE]);

View File

@@ -20,6 +20,7 @@
#define USB_PID_PX_MLT8PE5 0x0253
#define USB_PID_DIGIBEST_ISDB2056 0x004b
#define USB_PID_DIGIBEST_ISDB6014_4TS 0x0254
#define USB_PID_PX_M1UR 0x0854
enum px4_usb_device_type {
UNKNOWN_USB_DEVICE = 0,
@@ -27,7 +28,8 @@ enum px4_usb_device_type {
PXMLT5_USB_DEVICE,
PXMLT8_USB_DEVICE,
ISDB2056_USB_DEVICE,
ISDB6014_4TS_USB_DEVICE
ISDB6014_4TS_USB_DEVICE,
PXM1UR_USB_DEVICE,
};
int px4_usb_register(void);

View File

@@ -3,3 +3,4 @@ KERNEL=="pxmlt5video*", GROUP="video", MODE="0664"
KERNEL=="pxmlt8video*", GROUP="video", MODE="0664"
KERNEL=="isdb2056video*", GROUP="video", MODE="0664"
KERNEL=="isdb6014video*", GROUP="video", MODE="0644"
KERNEL=="pxm1urvideo*", GROUP="video", MODE="0644"

View File

@@ -1,4 +1,5 @@
description target size crc32 align firmware_code firmware_segment firmware_partition firmware_crc32
PX-M1UR Ver 2022.07 64bit it930x 187136 c1fab42a 4 000225B0 00024120 000245b8 df0bf49a
PX-W3U4 BDA Ver.1.4 64bit it930x 207232 a1e8223d 4 00029f50 0002bac0 0002bf58 df0bf49a
PX-Q3U4 BDA Ver.1.4 64bit it930x 207232 f9953f08 4 00029f50 0002bac0 0002bf58 df0bf49a
PX-W3PE4 BDA Ver.1.4 64bit it930x 207232 69900db0 4 00029f50 0002bac0 0002bf58 df0bf49a
1 description target size crc32 align firmware_code firmware_segment firmware_partition firmware_crc32
2 PX-M1UR Ver 2022.07 64bit it930x 187136 c1fab42a 4 000225B0 00024120 000245b8 df0bf49a
3 PX-W3U4 BDA Ver.1.4 64bit it930x 207232 a1e8223d 4 00029f50 0002bac0 0002bf58 df0bf49a
4 PX-Q3U4 BDA Ver.1.4 64bit it930x 207232 f9953f08 4 00029f50 0002bac0 0002bf58 df0bf49a
5 PX-W3PE4 BDA Ver.1.4 64bit it930x 207232 69900db0 4 00029f50 0002bac0 0002bf58 df0bf49a