Skip to content

Instantly share code, notes, and snippets.

View perexg's full-sized avatar
🙃
I may be here and there or anywhere.

Jaroslav Kysela perexg

🙃
I may be here and there or anywhere.
View GitHub Profile
From alsa-devel-bounces@alsa-project.org Wed May 10 11:26:00 2023
Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201])
(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by alsa0.perex.cz (Postfix) with ESMTPS id D05F41054;
Wed, 10 May 2023 11:26:00 +0200 (CEST)
DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D05F41054
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org;
s=default; t=1683710810;
bh=PpCLyPPCFpLGMRu5ntFX7k1vMw5XbEx/7uBCbcrNbso=;
@perexg
perexg / nhlt-dmic-info.c
Last active April 13, 2023 13:33
NHLT DMIC INFO (ACPI)
/*
* Extract microphone configuration from the ACPI NHLT table
*
* Specification:
* https://01.org/sites/default/files/595976_intel_sst_nhlt.pdf
*
* Author: Jaroslav Kysela <perex@perex.cz>
*
*
* This program is free software; you can redistribute it and/or modify
#include <unistd.h>
#include <alsa/asoundlib.h>
static void open_pcm(const char *card, const char *dev)
{
char name[128];
snd_pcm_t *handle;
int err;
snprintf(name, sizeof(name), "hw:%s,%s", card, dev);
diff --git a/src/modules/alsa/alsa-util.c b/src/modules/alsa/alsa-util.c
index 7dc373fa0..255811a24 100644
--- a/src/modules/alsa/alsa-util.c
+++ b/src/modules/alsa/alsa-util.c
@@ -1654,15 +1654,28 @@ static int mixer_class_event(snd_mixer_class_t *class, unsigned int mask,
{
int err;
const char *name = snd_hctl_elem_get_name(helem);
- if (mask & SND_CTL_EVENT_MASK_ADD) {
+ // NOTE: The remove event defined as '~0U`.
@perexg
perexg / gist:b7811a2991c3ff3d874eb3140aace738
Last active December 4, 2021 09:46
Zigbee plug - EZSP
Period resets:
==============
zigbee-herdsman:adapter:ezsp:log Time to watchdog ... 0 +2s
zigbee-herdsman:adapter:ezsp:log ===> Send command nop: () +0ms
zigbee-herdsman:adapter:ezsp:log ===> Send data nop: (fe00010500) +0ms
zigbee-herdsman:adapter:ezsp:uart Send DATA frame (6,6,0): fe00010500 +2s
zigbee-herdsman:adapter:ezsp:uart waiting (7) +0ms
zigbee-herdsman:adapter:ezsp:uart --> [66bc21a9512aa3ad7e] [102,188,33,169,81,42,163,173,126] +0ms
zigbee-herdsman:adapter:ezsp:uart waiting (7) success +2ms
@perexg
perexg / gist:4f6df2f0d03a89b31eb653e94c425504
Created February 14, 2020 16:33
SOF driver kernel 5.5.2 IPC errors
[ 11.170279] snd_soc_skl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[ 11.171046] snd_soc_skl 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 11.177728] snd_sof_intel_hda: loading out-of-tree module taints kernel.
[ 11.329885] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040380
[ 11.331077] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 11.331263] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[ 11.331270] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
[ 11.331473] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 11.337195] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[ 11.337257] sof-audio-pci 0000:00:1f.3: Debug PCIR: 00000000 at 00000044