Skip to content

Instantly share code, notes, and snippets.

@derrod
Created August 11, 2020 12:12
Show Gist options
  • Save derrod/c50fc6f7516a26a8707b4674687aea84 to your computer and use it in GitHub Desktop.
Save derrod/c50fc6f7516a26a8707b4674687aea84 to your computer and use it in GitHub Desktop.
Live Gamer 4K Linux driver patch
diff --git a/Generic_Ubuntu_CL511HN_Drv_1.0.0031/cl511_20200706_release/driver/board/cx511h/board_alsa.c b/Generic_Ubuntu_CL511HN_Drv_1.0.0031/cl511_20200706_release/driver/board/cx511h/board_alsa.c
index 92b2ef9..709f29f 100644
--- a/Generic_Ubuntu_CL511HN_Drv_1.0.0031/cl511_20200706_release/driver/board/cx511h/board_alsa.c
+++ b/Generic_Ubuntu_CL511HN_Drv_1.0.0031/cl511_20200706_release/driver/board/cx511h/board_alsa.c
@@ -125,7 +125,7 @@ void board_alsa_init(cxt_mgr_handle_t cxt_mgr)
err=BOARD_ALSA_ERROR_ALLOC_CXT;
break;
}
- if (subsystem_id == 0x5113)
+ if (subsystem_id == 0x5730)
alsa_info.name="AVerMedia CL511H";
alsa_info.pcm_count=sizeof(cl511h_pcm_info)/sizeof(alsa_model_pcm_info_t);
alsa_info.support_fmt_mask=BIT_ALSA_MODEL_FMT_S16_LE | BIT_ALSA_MODEL_FMT_S24_LE;
diff --git a/Generic_Ubuntu_CL511HN_Drv_1.0.0031/cl511_20200706_release/driver/board/cx511h/board_config.c b/Generic_Ubuntu_CL511HN_Drv_1.0.0031/cl511_20200706_release/driver/board/cx511h/board_config.c
index d4a4f8d..e770a0f 100644
--- a/Generic_Ubuntu_CL511HN_Drv_1.0.0031/cl511_20200706_release/driver/board/cx511h/board_config.c
+++ b/Generic_Ubuntu_CL511HN_Drv_1.0.0031/cl511_20200706_release/driver/board/cx511h/board_config.c
@@ -53,7 +53,7 @@ pci_model_id_t id_table[]={
.vendor=0x1461,
.device=0x0054, //according to hw DEVICE ID config
.sub_vendor = 0x1461,
- .sub_device = 0x5113,
+ .sub_device = 0x5730,
.driver_data=CL511H,
},
{
diff --git a/Generic_Ubuntu_CL511HN_Drv_1.0.0031/cl511_20200706_release/install.sh b/Generic_Ubuntu_CL511HN_Drv_1.0.0031/cl511_20200706_release/install.sh
index cb34067..e4ce1c0 100644
--- a/Generic_Ubuntu_CL511HN_Drv_1.0.0031/cl511_20200706_release/install.sh
+++ b/Generic_Ubuntu_CL511HN_Drv_1.0.0031/cl511_20200706_release/install.sh
@@ -7,7 +7,7 @@
#echo "Please boot to correct kernel version then install again. Thanks"
#exit
#fi
-MODULE_INSTALL_DIR=/lib/module/`uname -r`/kernel/drivers/media/avermedia
+MODULE_INSTALL_DIR=/lib/modules/`uname -r`/kernel/drivers/media/avermedia
install -d $MODULE_INSTALL_DIR
install -m 644 cx511h.ko $MODULE_INSTALL_DIR
/sbin/depmod -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment