Skip to content

Instantly share code, notes, and snippets.

View HiassofT's full-sized avatar

Matthias Reichl HiassofT

View GitHub Profile
@HiassofT
HiassofT / bcm2835-dma.c
Created November 16, 2015 13:13
bcm2835 with dma pool patch
/*
* BCM2835 DMA engine support
*
* Author: Florian Meier <florian.meier@koalo.de>
* Copyright 2013
* Gellert Weisz <gellert@raspberrypi.org>
* Copyright 2013-2014
*
* Based on
* OMAP DMAengine support by Russell King
@HiassofT
HiassofT / bcm2835-dma.c
Created December 19, 2015 13:32
bcm2835-dma with dmapool and fixed cyclic dma setup
/*
* BCM2835 DMA engine support
*
* Author: Florian Meier <florian.meier@koalo.de>
* Copyright 2013
* Gellert Weisz <gellert@raspberrypi.org>
* Copyright 2013-2014
*
* Based on
* OMAP DMAengine support by Russell King
@HiassofT
HiassofT / cyclic-upstream.diff
Created December 21, 2015 17:41
cyclic code diff to upstream+dmapool patch
index 996c4b0..773b23e9 100644
--- a/drivers/dma/bcm2835-dma.c
+++ b/drivers/dma/bcm2835-dma.c
@@ -358,9 +376,18 @@ static struct dma_async_tx_descriptor *bcm2835_dma_prep_dma_cyclic(
struct bcm2835_desc *d;
dma_addr_t dev_addr;
unsigned int es, sync_type;
- unsigned int frame;
+ unsigned int frame, max_size;
int i;
@HiassofT
HiassofT / gist:5f458fdec1e6aec33d12
Created January 20, 2016 11:40
jitter optimized parent selection - untested, don't use
/*
* Jitter-optimized parent selection for fractional divisor mode
*
* Find a rate that's near to the requested rate and can be
* generated with the lowest possible jitter.
*
* All rates that can be derived from parents by using an integer
* divisor are possible candidates, the one which is nearest
* to the requested rate is selected as an intermediate result.
*
diff --git a/packages/addons/service/hyperion/source/bin/hyperiond.start b/packages/addons/service/hyperion/source/bin/hyperiond.start
index ca77dc4..5044aaa 100644
--- a/packages/addons/service/hyperion/source/bin/hyperiond.start
+++ b/packages/addons/service/hyperion/source/bin/hyperiond.start
@@ -18,4 +18,11 @@
oe_setup_addon service.hyperion
-exec hyperiond $ADDON_HOME/hyperion.config.json
+if [ -f $ADDON_HOME/hyperion.config.json ] ; then
diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c
index 815509b..483c33d 100644
--- a/sound/soc/bcm/bcm2835-i2s.c
+++ b/sound/soc/bcm/bcm2835-i2s.c
@@ -167,11 +167,14 @@ struct bcm2835_i2s_dev {
unsigned int bclk_ratio;
struct regmap *i2s_regmap;
+#if 0
struct regmap *clk_regmap;
@HiassofT
HiassofT / pack.diff
Created April 26, 2016 21:09
WIP dmaengine patch
diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h
index f86ef5e..67be244 100644
--- a/include/sound/dmaengine_pcm.h
+++ b/include/sound/dmaengine_pcm.h
@@ -51,6 +51,16 @@ struct dma_chan *snd_dmaengine_pcm_request_channel(dma_filter_fn filter_fn,
void *filter_data);
struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream);
+/*
+ * The DAI supports packed transfers, eg 2 16-bit samples in a 32-bit word.
diff --git a/sound/soc/bcm/iqaudio-dac.c b/sound/soc/bcm/iqaudio-dac.c
index b6b6dcf..b9a0c31 100644
--- a/sound/soc/bcm/iqaudio-dac.c
+++ b/sound/soc/bcm/iqaudio-dac.c
@@ -54,6 +54,38 @@ static int snd_rpi_iqaudio_dac_hw_params(struct snd_pcm_substream *substream,
return snd_soc_dai_set_bclk_ratio(cpu_dai, sample_bits * 2);
}
+static int snd_rpi_iqaudio_set_bias_level(struct snd_soc_card *card,
+ struct snd_soc_dapm_context *dapm,
@HiassofT
HiassofT / gist:20b18111591ff25149238e2738107e44
Created April 30, 2017 22:24
sample simple-card overlay for g2labs-dac card
/dts-v1/;
/plugin/;
/ {
compatible = "brcm,bcm2708";
fragment@0 {
target = <&i2s>;
__overlay__ {
status = "okay";
@HiassofT
HiassofT / linux-052-XBOX_remote_support.patch
Created May 18, 2017 21:10
lirc xbox patch for kernel 4.12
diff --git a/drivers/staging/media/lirc/Kconfig b/drivers/staging/media/lirc/Kconfig
index 3e350a9..935dcc2 100644
--- a/drivers/staging/media/lirc/Kconfig
+++ b/drivers/staging/media/lirc/Kconfig
@@ -12,10 +12,17 @@ menuconfig LIRC_STAGING
if LIRC_STAGING
+config LIRC_XBOX
+ tristate "XBOX USB IR Remote"