Skip to content

Instantly share code, notes, and snippets.

View kimmoli's full-sized avatar

Kimmo Lindholm kimmoli

View GitHub Profile
@kimmoli
kimmoli / Keystest.qml
Last active June 3, 2017 13:47
Keystest
import QtQuick 2.0
import Sailfish.Media 1.0
Page
{
MediaKey { enabled: true; key: Qt.Key_MediaTogglePlayPause; onReleased: console.log("playPause") }
MediaKey { enabled: true; key: Qt.Key_MediaPlay; onReleased: console.log("play") }
MediaKey { enabled: true; key: Qt.Key_MediaPause; onReleased: console.log("pause") }
}
// ==UserScript==
// @name reload monitor
// @namespace rradb
// @include https://build.merproject.org/project/monitor/*
// @version 1
// @grant none
// ==/UserScript==
setTimeout(function(){ location.reload(); }, 10*1000);
original
HF->handset:
D/audio_hw_primary( 1205): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=1;
D/audio_hw_primary( 1205): select_devices: out_snd_device(6: voice-handset) in_snd_device(55: voice-dmic-ef)
D/hardware_info( 1205): hw_info_append_hw_type : device_name = voice-speaker
D/hardware_info( 1205): hw_info_append_hw_type : device_name = voice-speaker-dmic-ef
W/msm8974_platform( 1205): Codec backend bitwidth 16, samplerate 48000
W/msm8974_platform( 1205): platform_check_codec_backend_cfg:Use default bw and sr for voice/voip calls
D/hardware_info( 1205): hw_info_append_hw_type : device_name = voice-handset
with changes
HF->handset:
D/audio_hw_primary( 1080): out_set_parameters: enter: usecase(1: low-latency-playback) kvpairs: routing=1;
D/audio_hw_primary( 1080): select_devices: out_snd_device(6: voice-handset) in_snd_device(55: voice-dmic-ef)
D/hardware_info( 1080): hw_info_append_hw_type : device_name = voice-speaker
D/hardware_info( 1080): hw_info_append_hw_type : device_name = voice-speaker-dmic-ef
W/msm8974_platform( 1080): Codec backend bitwidth 16, samplerate 48000
W/msm8974_platform( 1080): platform_check_codec_backend_cfg:Use default bw and sr for voice/voip calls
D/hardware_info( 1080): hw_info_append_hw_type : device_name = voice-handset
@kimmoli
kimmoli / driver.c.patch
Created October 14, 2016 22:10
simplelink and dereferencing type-punned pointer will break strict-aliasing rules
union
{
_u8 TempBuf[_SL_RESP_HDR_SIZE];
_u32 DummyBuf[2];
} uBuf;
----------------------------------------------------------------------------------------
diff --git a/simplelink/source/driver.c b/simplelink/source/driver.c
index 0102ff9..8cf6bba 100755
@kimmoli
kimmoli / Nappi.qml
Last active September 30, 2016 17:01
Nappi
Button
{
text : "huuhaanappi"
anchors.centerIn: parent
onClicked: console.log("huuhaa")
}
@kimmoli
kimmoli / buildscript.sh
Last active August 24, 2016 23:38
onyx sfdroid - Android patches and builds
#!/bin/bash
source build/envsetup.sh
set -e
SOURCE_DIR=~/android/system
INSTALLDIR=~/onyx_sfdroid
DEVICE=onyx
@kimmoli
kimmoli / New file
Created August 24, 2016 06:52
Ostoslista
Risifrutti
Kaasu
Patterit 4*D
Wc paperi
fold=sfdroid-0.0.0
rm -rf $fold
mkdir $fold
mkdir -p $fold/system/bin
mkdir -p $fold/system/framework
mkdir -p $fold/system/lib
mkdir -p $fold/system/lib/hw
mkdir -p $fold/system/priv-app

Project config

Prefer: libhybris-libGLESv1-devel
Release: <CI_CNT>.<B_CNT>
Macros:
%vendor %%foo

Meta

in Meta, add `` with your device project and repo containing droid-hal