Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
c09866c
ASoC: core: Allow topology to override machine driver FE DAI link con…
lrgirdwo Jan 8, 2018
c59e0d3
[SQUASHME?] ASoC: core: Add name prefix for machines with topology re…
lrgirdwo Mar 9, 2018
c0c46a1
ASoC: topology: Give more data to clients via callbacks
lrgirdwo Jan 8, 2018
7b47108
ASoC: topology: Add callback for DAPM route load/unload
lrgirdwo Jan 8, 2018
0795a17
ALSA: core: Allow drivers to set R/W wait time.
lrgirdwo Jan 8, 2018
908d35a
ASoC: DAPM: Check for DAI private data - NEEDED ???
lrgirdwo Jan 8, 2018
cf8e473
ASoC: Intel: rename 'reef' to 'sof' in ACPI matching table
plbossart Mar 12, 2018
2bb970f
ASoC: Intel: Skylake: cleanup before moving ACPI tables
plbossart May 29, 2018
c8542b3
ASoC: Intel: move SKL+ codec ACPI tables to common directory
plbossart May 29, 2018
0779134
ASoC: Intel: common: add firmware/topology information for SOF
plbossart May 29, 2018
9b9f68a
ASoC: SOF: Add Sound Open Firmware driver core
lrgirdwo Jan 8, 2018
40ac5ea
ASoC: SOF: Add Sound Open Firmware KControl support
lrgirdwo Jan 8, 2018
936c53a
ASoC: SOF: Add driver debug support.
lrgirdwo Jan 8, 2018
39315dd
ASoC: SOF: Add support for IPC IO between DSP and Host
lrgirdwo Jan 8, 2018
6245e5e
ASoC: SOF: Add PCM operations support
lrgirdwo Jan 8, 2018
2abf96d
ASoC: SOF: Add support for loading topologies
lrgirdwo Jan 8, 2018
1ebacc8
ASoC: SOF: Add DSP firmware trace event support
lrgirdwo Jan 8, 2018
a1e523d
ASoC: SOF: Add DSP HW abstraction operations
lrgirdwo Jan 8, 2018
121138b
ASoC: SOF: Add firmware loader support
lrgirdwo Jan 8, 2018
b4f4dc0
ASoC: SOF: Add compressed PCM support
lrgirdwo Jan 8, 2018
a1ed847
ASoC: SOF: Add PM support
lrgirdwo Jan 16, 2018
a46071d
ASoC: SOF: Add Nocodec machine driver support
lrgirdwo Jan 8, 2018
2a80a39
ASoC: SOF: Intel: Add BYT, CHT and BSW DSP HW support.
lrgirdwo Jan 8, 2018
308c3a9
ASoC: SOF: Intel: Add HSW HW DSP support
lrgirdwo Jan 8, 2018
9adbdbc
ASoC: SOF: Intel: Add support for BDW HW DSP support
lrgirdwo Jan 8, 2018
ddcad8b
ASoC: SOF: Intel: Add APL/CNL HW DSP support
lrgirdwo Jan 8, 2018
fc43fc9
ASoC: SOF: Intel: Add HDA controller for Intel DSP
lrgirdwo May 9, 2018
17eb800
ASoC: SOF: Intel: Add Intel specific HDA DSP HW operations
lrgirdwo May 9, 2018
042e224
ASoC: SOF: Intel: Add Intel specific HDA IPC mechanisms.
lrgirdwo May 9, 2018
aef0e8e
ASoC: SOF: Intel: Add Intel specific HDA firmware loader
lrgirdwo May 9, 2018
d870d10
ASoC: SOF: Intel: Add Intel specific HDA PCM operations
lrgirdwo May 9, 2018
0f92982
ASoC: SOF: Intel: Add Intel specific HDA stream operations
lrgirdwo May 9, 2018
6176aa8
ASoC: SOF: Intel: Add Intel specific HDA trace operations
lrgirdwo May 9, 2018
99815a5
ASoC: SOF: Intel: Add platform differentiation for SKL, APL and CNL
lrgirdwo May 9, 2018
56134da
ASoC: SOF: Add userspace ABI support
lrgirdwo Jan 8, 2018
03ab0f0
ASoC: SOF: Add VirtIO support
lrgirdwo Jan 8, 2018
8088bfb
ASoC: SOF: Add SPI device support
lrgirdwo Jan 8, 2018
6eddaa6
ASoC: SOF: Add ACPI device support
lrgirdwo Jan 8, 2018
2c322db
ASoC: SOF: Add PCI device support
lrgirdwo Jan 8, 2018
b9d911e
ASoC: SOF: Add Build support for SOF core and Intel drivers
lrgirdwo Jan 8, 2018
f9aee53
ASoC: Intel: Kconfig: disable SST and legacy drivers when SOF is sele…
plbossart May 31, 2018
2ceaf38
ASoC: SOF: refine dapm route loading in sof
RanderWang May 25, 2018
ecad572
ASoC: SOF: parse Xtensa exception causes
xiulipan May 25, 2018
b3637b0
ASoC: uapi: sof: Add ipc config params and topology tokens for DMIC D…
ranj063 May 27, 2018
d689361
ASoC: SOF: Add support for parsing DMIC specific tokens from topology
ranj063 May 27, 2018
e16acb0
ASoC: SOF: support DMIC DAI type during link fixup
ranj063 May 27, 2018
82f920d
[WORKAROUND] ASoC: SOF: start HDA DMA at hw_params() stage and remove…
keyonjie May 15, 2018
4e41f9e
ASoC: Intel: make bytcht_da7213 with SOF
plbossart Mar 9, 2018
3687d90
ASoC: Intel: make cht_bsw_max98090 work with SOF
plbossart Mar 9, 2018
69ebc99
ASoC: Intel: cht-bsw-rt5645: work with SOF
plbossart Nov 10, 2017
ce28883
ASoC: Intel: cht-bsw-rt5672: work with SOF
plbossart Nov 30, 2017
ca9d0b8
ASoC: Intel: make bytcr_rt5640 work with SOF
plbossart Dec 21, 2017
732b420
ASoC: Intel: Make sure HSW/BDW based machine drivers build for SOF
lrgirdwo Dec 7, 2017
c52dd1b
ASoC: Intel: Kconfig: expose common option between SST and SOF drivers
plbossart Jan 9, 2018
9c02407
ASoC: Intel: select relevant machine drivers for SOF
plbossart Dec 7, 2017
93687f2
ASoC: Intel: add machine driver for BXT/APL with pcm512x codec
plbossart Apr 23, 2018
1ca41e3
ASoC: Intel: add rt274 machine driver for cnl
RanderWang May 18, 2018
cb542f6
ASoC: Intel: make cnl_rt274 work with SOF
plbossart May 18, 2018
9537c0f
ASoC: tdf8532: NXP TDF8532 audio class-D amplifier driver
May 15, 2018
0f2257b
ASoC: tdf8532: Fix compilation warnings
May 15, 2018
f72a2a0
ASoC: tdf8532: Add delay while reading a packet from I2C
May 15, 2018
ed11dce
ASoC: tdf8532: Fix the codec status error issue on APL-GPMRB
May 15, 2018
ce0d208
ASoC: Intel: Boards: Add BXTP MRB machine driver for NXP TDF8532
keyonjie May 22, 2018
8921f8e
ASoC: Intel: bxt-tdf8532: reuse machine driver for GP-MRB
keyonjie May 22, 2018
20d41f6
ASoC: Intel: bxt-tdf8532: FIX: don't use add_dai_link() for SOF
keyonjie May 28, 2018
3f4da86
ALSA: HACK: Fix rmmod crash
lrgirdwo Nov 3, 2017
8f3da6d
[NOT FOR UPSTREAM] ASoC: SOF: enable DEBUG by default
plbossart Apr 16, 2018
93dc8cc
ASoC: Intel: replace snd_soc_codec to snd_soc_component in bxt-pcm512x
xiulipan Jun 7, 2018
6fa8f18
ASoC: Intel: bytcr_rt5651: work with sof only with SSP2 AIF1
xiulipan Jun 6, 2018
ce9b373
ASoC: SOF: topology: free volume table while unloading pga widget
ranj063 Jun 10, 2018
f4ac2b9
acpi: blacklist: remove quirk for Dell XPS13 when SOF is enabled
plbossart Jun 12, 2018
3670189
ASoC: Intel: common: add ACPI match for CannonLake
plbossart Jun 12, 2018
c7bb52f
ASoC: SOF: fix warning about assigning __le to u16 type
ranj063 Jun 12, 2018
5b36be0
ASoC: SOF: topology: fix dmic pdm token offsets
ranj063 Jun 12, 2018
1e0f505
ASoC: SOF: topology: fix logic for parsing dmic pdm tokens
ranj063 Jun 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions drivers/acpi/blacklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ static int __init dmi_enable_rev_override(const struct dmi_system_id *d)

static const struct dmi_system_id acpi_rev_dmi_table[] __initconst = {
#ifdef CONFIG_ACPI_REV_OVERRIDE_POSSIBLE
#if !IS_ENABLED(CONFIG_SND_SOC_SOF_INTEL)
/*
* DELL XPS 13 (2015) switches sound between HDA and I2S
* depending on the ACPI _REV callback. If userspace supports
Expand All @@ -105,6 +106,7 @@ static const struct dmi_system_id acpi_rev_dmi_table[] __initconst = {
DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9343"),
},
},
#endif
{
.callback = dmi_enable_rev_override,
.ident = "DELL Precision 5520",
Expand Down
6 changes: 6 additions & 0 deletions include/sound/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ struct snd_pcm_substream {
/* -- timer section -- */
struct snd_timer *timer; /* timer */
unsigned timer_running: 1; /* time is running */
unsigned wait_time; /* time in ms for R/W to wait for avail */
/* -- next substream -- */
struct snd_pcm_substream *next;
/* -- linked substreams -- */
Expand Down Expand Up @@ -579,6 +580,11 @@ int snd_pcm_start(struct snd_pcm_substream *substream);
int snd_pcm_stop(struct snd_pcm_substream *substream, snd_pcm_state_t status);
int snd_pcm_drain_done(struct snd_pcm_substream *substream);
int snd_pcm_stop_xrun(struct snd_pcm_substream *substream);
static inline void snd_pcm_wait_time(struct snd_pcm_substream *substream,
unsigned wait_time)
{
substream->wait_time = wait_time;
}
#ifdef CONFIG_PM
int snd_pcm_suspend(struct snd_pcm_substream *substream);
int snd_pcm_suspend_all(struct snd_pcm *pcm);
Expand Down
5 changes: 5 additions & 0 deletions include/sound/soc-acpi-intel-match.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@ extern struct snd_soc_acpi_mach snd_soc_acpi_intel_broadwell_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_legacy_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_baytrail_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cherrytrail_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_skl_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_kbl_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_bxt_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_glk_machines[];
extern struct snd_soc_acpi_mach snd_soc_acpi_intel_cnl_machines[];

#endif
30 changes: 21 additions & 9 deletions include/sound/soc-topology.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ struct snd_soc_dapm_context;
struct snd_soc_card;
struct snd_kcontrol_new;
struct snd_soc_dai_link;
struct snd_soc_dai_driver;
struct snd_soc_dai;
struct snd_soc_dapm_route;

/* object scan be loaded and unloaded in groups with identfying indexes */
#define SND_SOC_TPLG_INDEX_ALL 0 /* ID that matches all FW objects */
Expand Down Expand Up @@ -109,35 +112,44 @@ struct snd_soc_tplg_widget_events {
struct snd_soc_tplg_ops {

/* external kcontrol init - used for any driver specific init */
int (*control_load)(struct snd_soc_component *,
int (*control_load)(struct snd_soc_component *, int index,
struct snd_kcontrol_new *, struct snd_soc_tplg_ctl_hdr *);
int (*control_unload)(struct snd_soc_component *,
struct snd_soc_dobj *);

/* DAPM graph route element loading and unloading */
int (*dapm_route_load)(struct snd_soc_component *, int index,
struct snd_soc_dapm_route *route);
int (*dapm_route_unload)(struct snd_soc_component *,
struct snd_soc_dobj *);

/* external widget init - used for any driver specific init */
int (*widget_load)(struct snd_soc_component *,
int (*widget_load)(struct snd_soc_component *, int index,
struct snd_soc_dapm_widget *,
struct snd_soc_tplg_dapm_widget *);
int (*widget_ready)(struct snd_soc_component *,
int (*widget_ready)(struct snd_soc_component *, int index,
struct snd_soc_dapm_widget *,
struct snd_soc_tplg_dapm_widget *);
int (*widget_unload)(struct snd_soc_component *,
struct snd_soc_dobj *);

/* FE DAI - used for any driver specific init */
int (*dai_load)(struct snd_soc_component *,
struct snd_soc_dai_driver *dai_drv);
int (*dai_load)(struct snd_soc_component *, int index,
struct snd_soc_dai_driver *dai_drv,
struct snd_soc_tplg_pcm *pcm, struct snd_soc_dai *dai);

int (*dai_unload)(struct snd_soc_component *,
struct snd_soc_dobj *);

/* DAI link - used for any driver specific init */
int (*link_load)(struct snd_soc_component *,
struct snd_soc_dai_link *link);
int (*link_load)(struct snd_soc_component *, int index,
struct snd_soc_dai_link *link,
struct snd_soc_tplg_link_config *cfg);
int (*link_unload)(struct snd_soc_component *,
struct snd_soc_dobj *);

/* callback to handle vendor bespoke data */
int (*vendor_load)(struct snd_soc_component *,
int (*vendor_load)(struct snd_soc_component *, int index,
struct snd_soc_tplg_hdr *);
int (*vendor_unload)(struct snd_soc_component *,
struct snd_soc_tplg_hdr *);
Expand All @@ -146,7 +158,7 @@ struct snd_soc_tplg_ops {
void (*complete)(struct snd_soc_component *);

/* manifest - optional to inform component of manifest */
int (*manifest)(struct snd_soc_component *,
int (*manifest)(struct snd_soc_component *, int index,
struct snd_soc_tplg_manifest *);

/* vendor specific kcontrol handlers available for binding */
Expand Down
13 changes: 13 additions & 0 deletions include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,14 @@ struct snd_soc_platform_driver {

/* platform stream compress ops */
const struct snd_compr_ops *compr_ops;

/* this platform uses topology and ignore machine driver FEs */
const char *ignore_machine;
const char *topology_name_prefix;
int (*be_hw_params_fixup)(struct snd_soc_pcm_runtime *rtd,
struct snd_pcm_hw_params *params);
bool use_dai_pcm_id; /* use the DAI link PCM ID as PCM device number */
int be_pcm_base; /* base device ID for all BE PCMs */
};

struct snd_soc_dai_link_component {
Expand Down Expand Up @@ -1123,6 +1131,9 @@ struct snd_soc_dai_link {
/* pmdown_time is ignored at stop */
unsigned int ignore_pmdown_time:1;

/* Do not create a PCM for this DAI link (Backend link) */
unsigned int ignore:1;

struct list_head list; /* DAI link list of the soc card */
struct snd_soc_dobj dobj; /* For topology */
};
Expand Down Expand Up @@ -1162,6 +1173,7 @@ struct snd_soc_card {
const char *long_name;
const char *driver_name;
char dmi_longname[80];
char topology_shortname[32];

struct device *dev;
struct snd_card *snd_card;
Expand Down Expand Up @@ -1281,6 +1293,7 @@ struct snd_soc_pcm_runtime {
/* runtime devices */
struct snd_pcm *pcm;
struct snd_compr *compr;
struct snd_sof_pcm *sof;
struct snd_soc_codec *codec;
struct snd_soc_platform *platform; /* will be removed */
struct snd_soc_dai *codec_dai;
Expand Down
81 changes: 81 additions & 0 deletions include/sound/sof.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/* SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) */
/*
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
*
* Copyright(c) 2017 Intel Corporation. All rights reserved.
*
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/

#ifndef __INCLUDE_SOUND_SOF_H
#define __INCLUDE_SOUND_SOF_H

#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/platform_device.h>
#include <linux/pci.h>
#include <sound/soc-acpi.h>
#include <uapi/sound/sof-ipc.h>

struct snd_sof_dsp_ops;

/*
* SOF Platform data.
*/
struct snd_sof_pdata {
u32 id; /* PCI/ACPI ID */
const struct firmware *fw;
const char *drv_name;
const char *name;

/* parent devices */
struct device *dev;
struct pci_dev *pci;
struct platform_device *pdev;

/* descriptor */
const struct sof_dev_desc *desc;

/* machine */
struct platform_device *pdev_mach;
const struct snd_soc_acpi_mach *machine;
};

/*
* Descriptor used for setting up SOF platform data. This is used when
* ACPI/PCI data is missing or mapped differently.
*/
struct sof_dev_desc {
/* list of machines using this configuration */
struct snd_soc_acpi_mach *machines;

/* Platform resource indexes in BAR / ACPI resources. */
/* Must set to -1 if not used - add new items to end */
int resindex_lpe_base;
int resindex_pcicfg_base;
int resindex_imr_base;
int irqindex_host_ipc;
int resindex_dma_base;

/* DMA only valid when resindex_dma_base != -1*/
int dma_engine;
int dma_size;

/* IPC timeouts in ms */
int ipc_timeout;
int boot_timeout;

/* defaults for no codec mode */
const char *nocodec_fw_filename;
const char *nocodec_tplg_filename;
};

int sof_nocodec_setup(struct device *dev,
struct snd_sof_pdata *sof_pdata,
struct snd_soc_acpi_mach *mach,
const struct sof_dev_desc *desc);

#endif
29 changes: 29 additions & 0 deletions include/uapi/sound/sof-abi.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note)) OR BSD-3-Clause) */
/*
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
*
* Copyright(c) 2017 Intel Corporation. All rights reserved.
*/

#ifndef __INCLUDE_UAPI_ABI_H__
#define __INCLUDE_UAPI_ABI_H__

#define SOF_ABI_VERSION 1
#define SOF_ABI_MAGIC 0x00464F53 /* "SOF\0" */

/*
* Header for all non IPC ABI data. Identifies data type, size and ABI.
* Used by any bespoke component data structures or binary blobs.
*/

struct sof_abi_hdr {
uint32_t magic; /* 'S', 'O', 'F', '\0' */
uint32_t type; /* component specific type */
uint32_t size; /* size in bytes of data excluding this struct */
uint32_t abi; /* SOF ABI version */
uint32_t comp_abi; /* component specific ABI version */
char data[0];
} __attribute__((packed));

#endif
102 changes: 102 additions & 0 deletions include/uapi/sound/sof-eq.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
/* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note)) OR BSD-3-Clause) */
/*
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
*
* Copyright(c) 2017 Intel Corporation. All rights reserved.
*
* Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
*/

#ifndef EQ_H
#define EQ_H

/* FIR EQ type */

/* Component will reject non-matching configuration. The version number need
* to be incremented with any ABI changes in function fir_cmd().
*/
#define SOF_EQ_FIR_ABI_VERSION 1

#define SOF_EQ_FIR_IDX_SWITCH 0

#define SOF_EQ_FIR_MAX_SIZE 4096 /* Max size allowed for coef data in bytes */

/*
* eq_fir_configuration data structure contains this information
* uint16_t channels_in_config
* This describes the number of channels in this EQ config data. It
* can be different from PLATFORM_MAX_CHANNELS.
* uint16_t number_of_responses
* 0=no responses, 1=one response defined, 2=two responses defined, etc.
* int16_t data[]
* assign_response[STREAM_MAX_CHANNELS]
* -1 = not defined, 0 = use first response, 1 = use 2nd response, etc.
* E.g. {0, 0, 0, 0, -1, -1, -1, -1} would apply to channels 0-3 the
* same first defined response and leave channels 4-7 unequalized.
* coef_data[]
* Repeated data { filter_length, input_shift, output_shift, h[] }
* for every EQ response defined where vector h has filter_length
* number of coefficients. Coefficients in h[] are in Q1.15 format.
* E.g. 16384 (Q1.15) = 0.5. The shifts are number of right shifts.
*/

struct sof_eq_fir_config {
uint16_t channels_in_config;
uint16_t number_of_responses;
int16_t data[];
};

/* IIR EQ type */

/* Component will reject non-matching configuration. The version number need
* to be incremented with any ABI changes in function fir_cmd().
*/
#define SOF_EQ_FIR_ABI_VERSION 1

#define SOF_EQ_IIR_IDX_SWITCH 0

#define SOF_EQ_IIR_MAX_SIZE 1024 /* Max size allowed for coef data in bytes */

/* eq_iir_configuration
* uint32_t channels_in_config
* This describes the number of channels in this EQ config data. It
* can be different from PLATFORM_MAX_CHANNELS.
* uint32_t number_of_responses_defined
* 0=no responses, 1=one response defined, 2=two responses defined, etc.
* int32_t data[]
* Data consist of two parts. First is the response assign vector that
* has length of channels_in_config. The latter part is coefficient
* data.
* uint32_t assign_response[channels_in_config]
* -1 = not defined, 0 = use first response, 1 = use 2nd, etc.
* E.g. {0, 0, 0, 0, -1, -1, -1, -1} would apply to channels 0-3 the
* same first defined response and leave channels 4-7 unequalized.
* coefficient_data[]
* <1st EQ>
* uint32_t num_biquads
* uint32_t num_biquads_in_series
* <1st biquad>
* int32_t coef_a2 Q2.30 format
* int32_t coef_a1 Q2.30 format
* int32_t coef_b2 Q2.30 format
* int32_t coef_b1 Q2.30 format
* int32_t coef_b0 Q2.30 format
* int32_t output_shift number of shifts right, shift left is negative
* int32_t output_gain Q2.14 format
* <2nd biquad>
* ...
* <2nd EQ>
*
* Note: A flat response biquad can be made with a section set to
* b0 = 1.0, gain = 1.0, and other parameters set to 0
* {0, 0, 0, 0, 1073741824, 0, 16484}
*/

struct sof_eq_iir_config {
uint32_t channels_in_config;
uint32_t number_of_responses;
int32_t data[];
};

#endif /* EQ_H */
Loading