Skip to content

Instantly share code, notes, and snippets.

@ouija
ouija / jack-detect.sh
Last active August 2, 2019 06:53
Headphone Jack Detection Script for bytcrrt_5651
#!/system/bin/sh
# Audio input jack detection script by @ouija
# get headset input device
DEVICE=$(getevent -Sv | grep -B 5 -m1 'bytcr-rt5651 Headset' | grep -m1 'add device' | cut -d : -f 2)
if [ ! -z "$DEVICE" ]; then
sleep 3
while true
@ouija
ouija / rt5651.c
Last active July 27, 2019 21:47
kernel-4.18/sound/soc/codec/rt5651.c [Insigina Flex8 NS-P08W7100]
/*
* rt5651.c -- RT5651 ALSA SoC audio codec driver
*
* Copyright 2014 Realtek Semiconductor Corp.
* Author: Bard Liao <bardliao@realtek.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
@ouija
ouija / rt5651.c
Last active July 22, 2019 13:09
kernel-4.16/sound/soc/codec/rt5651.c [Insigina Flex8 NS-P08W7100]
/*
* rt5651.c -- RT5651 ALSA SoC audio codec driver
*
* Copyright 2014 Realtek Semiconductor Corp.
* Author: Bard Liao <bardliao@realtek.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
// ==UserScript==
// @name swfobject-patch
// @namespace http://saschanaz.github.io/
// @version 0.2
// @description try to take over the world!
// @author You
// @match http://*/*
// @grant none
// @run-at document-start
// ==/UserScript==