diff options
Diffstat (limited to 'target/linux/brcm2708/patches-4.14/950-0236-Removing-broken-RaspiDac3-support.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.14/950-0236-Removing-broken-RaspiDac3-support.patch | 339 |
1 files changed, 0 insertions, 339 deletions
diff --git a/target/linux/brcm2708/patches-4.14/950-0236-Removing-broken-RaspiDac3-support.patch b/target/linux/brcm2708/patches-4.14/950-0236-Removing-broken-RaspiDac3-support.patch deleted file mode 100644 index 5f8974fb70..0000000000 --- a/target/linux/brcm2708/patches-4.14/950-0236-Removing-broken-RaspiDac3-support.patch +++ /dev/null pre { line-height: 125%; margin: 0; }
td.linenos pre { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
span.linenos { color: #000000; background-color: #f0f0f0; padding: 0 5px 0 5px; }
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding: 0 5px 0 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #ffffff; }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ From 336129ed3ae12518df30c332a500ffe1739af4df Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Fri, 29 Apr 2016 17:27:37 +0100
Subject: [PATCH 315/381] Revert "bcm2835: interpolate audio delay"
This reverts commit 83eca613d0eddd2c8299f114b8fe573ccaffdefc.
---
sound/arm/bcm2835-pcm.c | 12 +-----------
sound/arm/bcm2835.h | 1 -
2 files changed, 1 insertion(+), 12 deletions(-)
--- a/sound/arm/bcm2835-pcm.c
+++ b/sound/arm/bcm2835-pcm.c
@@ -25,7 +25,7 @@
/* hardware definition */
static struct snd_pcm_hardware snd_bcm2835_playback_hw = {
.info = (SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER |
- SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_BATCH),
+ SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID),
.formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S16_LE,
.rates = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
.rate_min = 8000,
@@ -99,8 +99,6 @@ static irqreturn_t bcm2835_playback_fifo
alsa_stream->pos %= alsa_stream->buffer_size;
}
- alsa_stream->interpolate_start = ktime_get_ns();
-
if (alsa_stream->substream) {
if (new_period)
snd_pcm_period_elapsed(alsa_stream->substream);
@@ -401,7 +399,6 @@ static int snd_bcm2835_pcm_prepare(struc
alsa_stream->buffer_size = snd_pcm_lib_buffer_bytes(substream);
alsa_stream->period_size = snd_pcm_lib_period_bytes(substream);
alsa_stream->pos = 0;
- alsa_stream->interpolate_start = ktime_get_ns();
audio_debug("buffer_size=%d, period_size=%d pos=%d frame_bits=%d\n",
alsa_stream->buffer_size, alsa_stream->period_size,
@@ -498,7 +495,6 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_s
{
struct snd_pcm_runtime *runtime = substream->runtime;
bcm2835_alsa_stream_t *alsa_stream = runtime->private_data;
- u64 now = ktime_get_ns();
audio_info(" .. IN\n");
@@ -507,12 +503,6 @@ snd_bcm2835_pcm_pointer(struct snd_pcm_s
frames_to_bytes(runtime, runtime->control->appl_ptr),
alsa_stream->pos);
- /* Give userspace better delay reporting by interpolating between GPU
- * notifications, assuming audio speed is close enough to the clock
- * used for ktime */
- if (alsa_stream->interpolate_start && alsa_stream->interpolate_start < now)
- runtime->delay = -(int)div_u64((now - alsa_stream->interpolate_start) * runtime->rate, 1000000000);
-
audio_info(" .. OUT\n");
rpi-proto-objs := rpi-proto.o - snd-soc-iqaudio-dac-objs := iqaudio-dac.o - snd-soc-iqaudio-digi-objs := iqaudio_digi.o --snd-soc-raspidac3-objs := raspidac3.o - snd-soc-audioinjector-pi-soundcard-objs := audioinjector-pi-soundcard.o - snd-soc-audioinjector-octo-soundcard-objs := audioinjector-octo-soundcard.o - snd-soc-digidac1-soundcard-objs := digidac1-soundcard.o -@@ -52,7 +51,6 @@ obj-$(CONFIG_SND_BCM2708_SOC_RPI_DAC) += - obj-$(CONFIG_SND_BCM2708_SOC_RPI_PROTO) += snd-soc-rpi-proto.o - obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DAC) += snd-soc-iqaudio-dac.o - obj-$(CONFIG_SND_BCM2708_SOC_IQAUDIO_DIGI) += snd-soc-iqaudio-digi.o --obj-$(CONFIG_SND_BCM2708_SOC_RASPIDAC3) += snd-soc-raspidac3.o - obj-$(CONFIG_SND_AUDIOINJECTOR_PI_SOUNDCARD) += snd-soc-audioinjector-pi-soundcard.o - obj-$(CONFIG_SND_AUDIOINJECTOR_OCTO_SOUNDCARD) += snd-soc-audioinjector-octo-soundcard.o - obj-$(CONFIG_SND_DIGIDAC1_SOUNDCARD) += snd-soc-digidac1-soundcard.o ---- a/sound/soc/bcm/raspidac3.c -+++ /dev/null -@@ -1,172 +0,0 @@ --/* -- * ASoC Driver for RaspiDAC v3 -- * -- * Author: Jan Grulich <jan@grulich.eu> -- * Copyright 2015 -- * based on code by Daniel Matuschek <daniel@hifiberry.com> -- * based on code by Florian Meier <florian.meier@koalo.de> -- * -- * 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. -- * -- * This program is distributed in the hope that it will be useful, but -- * WITHOUT ANY WARRANTY; without even the implied warranty of -- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -- * General Public License for more details. -- */ -- --#include <linux/module.h> --#include <linux/platform_device.h> -- --#include <sound/core.h> --#include <sound/pcm.h> --#include <sound/pcm_params.h> --#include <sound/soc.h> --#include <sound/jack.h> --#include <sound/soc-dapm.h> -- --#include "../codecs/pcm512x.h" --#include "../codecs/tpa6130a2.h" -- --/* sound card init */ --static int snd_rpi_raspidac3_init(struct snd_soc_pcm_runtime *rtd) --{ -- int ret; -- struct snd_soc_card *card = rtd->card; -- struct snd_soc_codec *codec = rtd->codec; -- snd_soc_update_bits(codec, PCM512x_GPIO_EN, 0x08, 0x08); -- snd_soc_update_bits(codec, PCM512x_GPIO_OUTPUT_4, 0xf, 0x02); -- snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x00); -- -- ret = snd_soc_limit_volume(card, "Digital Playback Volume", 207); -- if (ret < 0) -- dev_warn(card->dev, "Failed to set volume limit: %d\n", ret); -- else { -- struct snd_kcontrol *kctl; -- -- ret = snd_soc_limit_volume(card, -- "TPA6130A2 Headphone Playback Volume", -- 54); -- if (ret < 0) -- dev_warn(card->dev, "Failed to set TPA6130A2 volume limit: %d\n", -- ret); -- kctl = snd_soc_card_get_kcontrol(card, -- "TPA6130A2 Headphone Playback Volume"); -- if (kctl) { -- strcpy(kctl->id.name, "Headphones Playback Volume"); -- /* disable the volume dB scale so alsamixer works */ -- kctl->vd[0].access = SNDRV_CTL_ELEM_ACCESS_READWRITE; -- } -- -- kctl = snd_soc_card_get_kcontrol(card, -- "TPA6130A2 Headphone Playback Switch"); -- if (kctl) -- strcpy(kctl->id.name, "Headphones Playback Switch"); -- } -- -- return 0; --} -- --/* startup */ --static int snd_rpi_raspidac3_startup(struct snd_pcm_substream *substream) { -- struct snd_soc_pcm_runtime *rtd = substream->private_data; -- struct snd_soc_codec *codec = rtd->codec; -- snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x08); -- return 0; --} -- --/* shutdown */ --static void snd_rpi_raspidac3_shutdown(struct snd_pcm_substream *substream) { -- struct snd_soc_pcm_runtime *rtd = substream->private_data; -- struct snd_soc_codec *codec = rtd->codec; -- snd_soc_update_bits(codec, PCM512x_GPIO_CONTROL_1, 0x08,0x00); --} -- --/* machine stream operations */ --static struct snd_soc_ops snd_rpi_raspidac3_ops = { -- .startup = snd_rpi_raspidac3_startup, -- .shutdown = snd_rpi_raspidac3_shutdown, --}; -- --/* interface setup */ --static struct snd_soc_dai_link snd_rpi_raspidac3_dai[] = { --{ -- .name = "RaspiDAC Rev.3x", -- .stream_name = "RaspiDAC HiFi", -- .cpu_dai_name = "bcm2708-i2s.0", -- .codec_dai_name = "pcm512x-hifi", -- .platform_name = "bcm2708-i2s.0", -- .codec_name = "pcm512x.1-004c", -- .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | -- SND_SOC_DAIFMT_CBS_CFS, -- .ops = &snd_rpi_raspidac3_ops, -- .init = snd_rpi_raspidac3_init, --}, --}; -- --/* audio machine driver */ --static struct snd_soc_card snd_rpi_raspidac3 = { -- .name = "RaspiDAC Rev.3x HiFi Audio Card", -- .owner = THIS_MODULE, -- .dai_link = snd_rpi_raspidac3_dai, -- .num_links = ARRAY_SIZE(snd_rpi_raspidac3_dai), --}; -- --/* sound card test */ --static int snd_rpi_raspidac3_probe(struct platform_device *pdev) --{ -- int ret = 0; -- -- snd_rpi_raspidac3.dev = &pdev->dev; -- -- if (pdev->dev.of_node) { -- struct device_node *i2s_node; -- struct snd_soc_dai_link *dai = &snd_rpi_raspidac3_dai[0]; -- i2s_node = of_parse_phandle(pdev->dev.of_node, -- "i2s-controller", 0); -- -- if (i2s_node) { -- dai->cpu_dai_name = NULL; -- dai->cpu_of_node = i2s_node; -- dai->platform_name = NULL; -- dai->platform_of_node = i2s_node; -- } -- } -- -- ret = snd_soc_register_card(&snd_rpi_raspidac3); -- if (ret && ret != -EPROBE_DEFER) -- dev_err(&pdev->dev, -- "snd_soc_register_card() failed: %d\n", ret); -- -- return ret; --} -- --/* sound card disconnect */ --static int snd_rpi_raspidac3_remove(struct platform_device *pdev) --{ -- return snd_soc_unregister_card(&snd_rpi_raspidac3); --} -- --static const struct of_device_id raspidac3_of_match[] = { -- { .compatible = "jg,raspidacv3", }, -- {}, --}; --MODULE_DEVICE_TABLE(of, raspidac3_of_match); -- --/* sound card platform driver */ --static struct platform_driver snd_rpi_raspidac3_driver = { -- .driver = { -- .name = "snd-rpi-raspidac3", -- .owner = THIS_MODULE, -- .of_match_table = raspidac3_of_match, -- }, -- .probe = snd_rpi_raspidac3_probe, -- .remove = snd_rpi_raspidac3_remove, --}; -- --module_platform_driver(snd_rpi_raspidac3_driver); -- --MODULE_AUTHOR("Jan Grulich <jan@grulich.eu>"); --MODULE_DESCRIPTION("ASoC Driver for RaspiDAC Rev.3x"); --MODULE_LICENSE("GPL v2"); |