X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=blobdiff_plain;f=debian%2Fpatches%2F0001_libcec_add-exynos-cec-variable.patch;fp=debian%2Fpatches%2F0001_libcec_add-exynos-cec-variable.patch;h=4e0024a77ffa3007eb8900af39da990abe1d3181;hp=0000000000000000000000000000000000000000;hb=1f0601e16902dc2a020c027dcfee18d10f5ea2f9;hpb=c7811b86b80fb01034ca1dcfd487480522fd1d72 diff --git a/debian/patches/0001_libcec_add-exynos-cec-variable.patch b/debian/patches/0001_libcec_add-exynos-cec-variable.patch new file mode 100644 index 0000000..4e0024a --- /dev/null +++ b/debian/patches/0001_libcec_add-exynos-cec-variable.patch @@ -0,0 +1,27 @@ +diff -Nur a/src/lib/adapter/Exynos/ExynosCECAdapterCommunication.cpp b/src/lib/adapter/Exynos/ExynosCECAdapterCommunication.cpp +--- a/src/lib/adapter/Exynos/ExynosCECAdapterCommunication.cpp 2014-10-28 15:20:50.000000000 +0000 ++++ b/src/lib/adapter/Exynos/ExynosCECAdapterCommunication.cpp 2015-01-25 23:42:05.324537990 +0000 +@@ -161,16 +161,14 @@ + + uint16_t CExynosCECAdapterCommunication::GetPhysicalAddress(void) + { +- uint16_t phys_addr = CEC_DEFAULT_PADDR; ++ char* addr_string = getenv("CEC_HDMI_PORT"); ++ if (addr_string == NULL) ++ return CEC_DEFAULT_PHYSICAL_ADDRESS; ++ int addr_int = atoi(addr_string); ++ if (addr_int == 0) ++ return CEC_DEFAULT_PHYSICAL_ADDRESS; + +- FILE *f = fopen(CEC_PADDR_NAME, "r"); +- if(f) { +- if(fscanf(f, "%hu", &phys_addr) != 1) +- phys_addr = CEC_DEFAULT_PADDR; +- +- fclose(f); +- } +- return phys_addr; ++ return 0x1000 * addr_int; + } + +