Skip to content

Instantly share code, notes, and snippets.

View warped-rudi's full-sized avatar

Rüdiger Ihle warped-rudi

  • Ilmenau, Germany
View GitHub Profile
@warped-rudi
warped-rudi / Proposal for device detection via libCEC
Created October 22, 2012 07:00
CEC device detection in XBMC Eden (Cubox)
diff --git a/xbmc/peripherals/PeripheralTypes.h b/xbmc/peripherals/PeripheralTypes.h
index 53831fc..94baaf9 100644
--- a/xbmc/peripherals/PeripheralTypes.h
+++ b/xbmc/peripherals/PeripheralTypes.h
@@ -35,7 +35,8 @@ namespace PERIPHERALS
{
PERIPHERAL_BUS_UNKNOWN = 0,
PERIPHERAL_BUS_USB,
- PERIPHERAL_BUS_PCI
+ PERIPHERAL_BUS_PCI,
@warped-rudi
warped-rudi / tda995x_fix_names.diff
Created February 28, 2013 11:27
Forgot to rename variables in 2.1.0 and master
diff --git a/src/lib/adapter/AdapterFactory.cpp b/src/lib/adapter/AdapterFactory.cpp
index dbff5c4..42cdd0b 100644
--- a/src/lib/adapter/AdapterFactory.cpp
+++ b/src/lib/adapter/AdapterFactory.cpp
@@ -100,8 +100,8 @@ int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8
if (iAdaptersFound < iBufSize && CTDA995xCECAdapterDetection::FindAdapter() &&
(!strDevicePath || !strcmp(strDevicePath, CEC_TDA995x_VIRTUAL_COM)))
{
- snprintf(deviceList[iAdaptersFound].path, sizeof(deviceList[iAdaptersFound].strComPath), CEC_TDA995x_PATH);
- snprintf(deviceList[iAdaptersFound].comm, sizeof(deviceList[iAdaptersFound].strComName), CEC_TDA995x_VIRTUAL_COM);
@warped-rudi
warped-rudi / audioengine-fix-24bit-pcm.diff
Created April 10, 2013 10:31
Fix audio engine's float to S24 conversion
diff -aur --unidirectional-new-file a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp
--- a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp 2013-01-28 03:07:32.000000000 +0100
+++ b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp 2013-03-17 13:01:25.000000000 +0100
@@ -837,7 +837,7 @@
_mm_empty();
#else /* no SSE */
for (uint32_t i = 0; i < samples; ++i)
- *dst++ = (safeRound(*data++ * ((float)INT24_MAX+.5f)) & 0xFFFFFF) << 8;
+ *dst++ = safeRound(*data++ * ((float)INT24_MAX+.5f)) & 0x00FFFFFF;
#endif
@warped-rudi
warped-rudi / suppress-mangling-has-changed-warning.diff
Created October 4, 2013 21:42
Suppress *mangling has chnaged in GCC 4.4' warnings
diff --git a/configure.ac b/configure.ac
index 9b2ac34..772ca7f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -342,7 +342,7 @@ fi
LIBS_LIBCEC="$LIBS"
LIBS="$libs_client"
-CXXFLAGS="$CXXFLAGS -fPIC -Wall -Wextra -Wno-missing-field-initializers"
+CXXFLAGS="$CXXFLAGS -fPIC -Wall -Wextra -Wno-missing-field-initializers -Wno-psabi"
@warped-rudi
warped-rudi / Restore-ALSA-device-enumeration.diff
Created April 21, 2014 12:32
XBMC iMX6 audio device test
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2014-04-21 13:36:56.099428215 +0200
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2014-04-21 13:36:56.111428214 +0200
@@ -721,9 +721,11 @@
* We don't want to do that if "default" can handle multichannel
* itself (e.g. in case of a pulseaudio server). */
+#ifndef WANDBOARD_ENUM
/* For Wandboard, we do not enurate default device as it will be grabbed
* as one of the sysdefault devices... */
-
@warped-rudi
warped-rudi / Set-validity-bit-3-0-35.diff
Created April 25, 2014 23:06
SPDIF and HDMI validity
--- a/sound/soc/codecs/mxc_spdif.c
+++ b/sound/soc/codecs/mxc_spdif.c
@@ -367,7 +367,7 @@
static void spdif_write_channel_status(void)
{
- unsigned int ch_status;
+ unsigned int ch_status, regval;
ch_status =
@warped-rudi
warped-rudi / fileinfo.txt
Created May 25, 2014 19:42
Dolby TrueHD failure
General
Unique ID : 189316946870555579104555688705780798964 (0x8E6D1E214FCF28DE83A684628942D5F4)
Complete name : /home/rudi/Downloads/Audio/Dani/hd_dthd_5.1.mkv
Format : Matroska
Format version : Version 2
File size : 31.4 MiB
Duration : 20s 53ms
Overall bit rate mode : Variable
Overall bit rate : 13.1 Mbps
Movie name : HD Dolby TrueHD 5.1
diff -Naur a/Texture.cpp b/Texture.cpp
--- a/xbmc/guilib/Texture.cpp 2013-12-12 22:47:49.000000000 +0100
+++ b/xbmc/guilib/Texture.cpp 2014-01-16 21:22:58.000000000 +0100
@@ -36,6 +36,8 @@
#include "filesystem/AndroidAppFile.h"
#endif
+#include "threads/SystemClock.h"
+
/************************************************************************/
diff --git a/sound/soc/fsl/imx-hdmi-dma.c b/sound/soc/fsl/imx-hdmi-dma.c
index 612f8ed..3af0450 100644
--- a/sound/soc/fsl/imx-hdmi-dma.c
+++ b/sound/soc/fsl/imx-hdmi-dma.c
@@ -213,6 +213,7 @@ static void hdmi_mask(int mask)
static inline int odd_ones(unsigned a)
{
+ a ^= a >> 16;
a ^= a >> 8;
diff --git a/packages/system/busybox/profile.d/keymap.sh b/packages/system/busybox/profile.d/keymap.sh
index f1e2bd6..c32ee55 100755
--- a/packages/system/busybox/profile.d/keymap.sh
+++ b/packages/system/busybox/profile.d/keymap.sh
@@ -1,6 +1,18 @@
#!/bin/sh
-# load keymap given on kernel cmdline
-keymap=$(sed -n "s/.*keymap=\([^ ]*\).*/\1/p" /proc/cmdline)
-[ "x$keymap" != "x" ] && [ -r /etc/keymaps/${keymap}.kmap ] && cat /etc/keymaps/${keymap}.kmap | /sbin/loadkmap