Skip to content

Instantly share code, notes, and snippets.

View takaswie's full-sized avatar

坂本 貴史 takaswie

View GitHub Profile
@takaswie
takaswie / boot log
Created December 23, 2023 02:48
Trial with patched v6.6 kernel
[ 0.000000] Linux version 6.6.0+ (mocchi@workstation) (gcc (Ubuntu 12.3.0-1ubuntu1~23.04) 12.3.0, GNU ld (GNU Binutils for Ubuntu) 2.40) #2 SMP PREEMPT_DYNAMIC Fri Dec 22 22:15:27 JST 2023
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-6.6.0+ root=UUID=26a542b3-43b6-462c-a156-e04bbd1f7371 ro console=ttyS0,115200 console=tty module_blacklist=usbnet,r8152 vt.handoff=7 efi=debug "dyndbg=file arch/x86/pci/* +p"
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Hygon HygonGenuine
[ 0.000000] Centaur CentaurHauls
[ 0.000000] zhaoxin Shanghai
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
@takaswie
takaswie / sample
Last active September 24, 2023 02:10
Hitaki.SndDice sample program for Python 3 runtime
#!/usr/bin/env python3
import gi
gi.require_versions({'GLib': '2.0', 'Hitaki': '0.0'})
from gi.repository import GLib, Hitaki
from sys import argv, exit
from pathlib import Path
from threading import Thread
from time import sleep
@takaswie
takaswie / mixer-class-event-removal.c
Last active June 25, 2022 11:16
Assertion test at mixer class implementation for removal event
#include <alsa/asoundlib.h>
#include <sys/epoll.h>
#include <stdbool.h>
static bool unsafe;
// (alsa-lib:src/mixer/mixer.c)
// snd_mixer_handle_events()
// (alsa-lib:src/control/hcontrol.c)
// ->snd_hctl_handle_events()
@takaswie
takaswie / result.log
Created March 6, 2022 07:27
speaker-test result
$ speaker-test -D hw:2,0 -r 48000 -FS32_LE -c18
speaker-test 1.2.6
再生デバイス: hw:2,0
ストリームパラメータ: 48000Hz, S32_LE, 18 チャネル
16 オクターブのピンクノイズを使用
レート 48000Hz (要求値 48000Hz)
バッファサイズ範囲 32 〜 4096
ピリオドサイズ範囲 16 〜 1536
@takaswie
takaswie / trx
Created March 5, 2022 12:10
Asynchronous transaction tool with libhinawa2
#!/usr/bin/env python3
import gi
gi.require_version('GLib', '2.0')
gi.require_version('Hinawa', '3.0')
from gi.repository import GLib, Hinawa
from sys import argv, exit
from threading import Thread
from struct import unpack, pack
@takaswie
takaswie / migration-to-gi-docgen.txt
Created February 19, 2022 07:24
Migration to gi-docgen
# gi-docgenについて
2022/02/19
坂本 貴史
* 概要
* 2021年にGNOMEプロジェクトの標準ドキュメンテーションツールが変わりました
* gtkdocからgi-docgenへ
* gtkdoc
@takaswie
takaswie / dump-offset-and-size.c
Last active October 7, 2021 07:42
ABI compatibility test for asound.h in regards of snd_pcm_mmap_control
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <stdint.h>
#define __user
#include "path-to-include/uapi/sound/asound.h"
#if defined(PREVIOUS)
@takaswie
takaswie / pcm-rw-interleaved.c
Last active June 23, 2024 12:54
ALSA PCM application to utilize intermediate buffer inner kernel space
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <limits.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@takaswie
takaswie / parse.py
Last active December 25, 2020 00:40
parser for 'perf.data.script.211220202054.txt'
#!/usr/bin/env python3
from sys import argv
from re import compile, search
records = []
with open(argv[1], 'r') as f:
record = []
for line in f.readlines():
@takaswie
takaswie / avid-trx.py
Last active September 17, 2020 03:41
Avid Adlenarine asynchronous protocol
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (c) 2020 Takashi Sakamoto
import gi
gi.require_version('GLib', '2.0')
gi.require_version('Hinawa', '3.0')
from gi.repository import GLib, Hinawa