You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge remote-tracking branch 'asoc/topic/intel' into asoc-next
This commit is contained in:
@@ -55,6 +55,7 @@ enum sst_audio_device_id_mrfld {
|
||||
PIPE_MEDIA0_IN = 0x8F,
|
||||
PIPE_MEDIA1_IN = 0x90,
|
||||
PIPE_MEDIA2_IN = 0x91,
|
||||
PIPE_MEDIA3_IN = 0x9C,
|
||||
PIPE_RSVD = 0xFF,
|
||||
};
|
||||
|
||||
|
||||
@@ -233,6 +233,15 @@ enum { SDI0, SDI1, SDI2, SDI3, SDO0, SDO1, SDO2, SDO3 };
|
||||
#define AZX_MLCTL_SPA (1<<16)
|
||||
#define AZX_MLCTL_CPA 23
|
||||
|
||||
|
||||
/* registers for DMA Resume Capability Structure */
|
||||
#define AZX_DRSM_CAP_ID 0x5
|
||||
#define AZX_REG_DRSM_CTL 0x4
|
||||
/* Base used to calculate the iterating register offset */
|
||||
#define AZX_DRSM_BASE 0x08
|
||||
/* Interval used to calculate the iterating register offset */
|
||||
#define AZX_DRSM_INTERVAL 0x08
|
||||
|
||||
/*
|
||||
* helpers to read the stream position
|
||||
*/
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
* @spbcap: SPIB capabilities pointer
|
||||
* @mlcap: MultiLink capabilities pointer
|
||||
* @gtscap: gts capabilities pointer
|
||||
* @drsmcap: dma resume capabilities pointer
|
||||
* @hlink_list: link list of HDA links
|
||||
*/
|
||||
struct hdac_ext_bus {
|
||||
@@ -23,6 +24,7 @@ struct hdac_ext_bus {
|
||||
void __iomem *spbcap;
|
||||
void __iomem *mlcap;
|
||||
void __iomem *gtscap;
|
||||
void __iomem *drsmcap;
|
||||
|
||||
struct list_head hlink_list;
|
||||
};
|
||||
@@ -72,6 +74,9 @@ enum hdac_ext_stream_type {
|
||||
* @pplc_addr: processing pipe link stream pointer
|
||||
* @spib_addr: software position in buffers stream pointer
|
||||
* @fifo_addr: software position Max fifos stream pointer
|
||||
* @dpibr_addr: DMA position in buffer resume pointer
|
||||
* @dpib: DMA position in buffer
|
||||
* @lpib: Linear position in buffer
|
||||
* @decoupled: stream host and link is decoupled
|
||||
* @link_locked: link is locked
|
||||
* @link_prepared: link is prepared
|
||||
@@ -86,6 +91,10 @@ struct hdac_ext_stream {
|
||||
void __iomem *spib_addr;
|
||||
void __iomem *fifo_addr;
|
||||
|
||||
void __iomem *dpibr_addr;
|
||||
|
||||
u32 dpib;
|
||||
u32 lpib;
|
||||
bool decoupled:1;
|
||||
bool link_locked:1;
|
||||
bool link_prepared;
|
||||
@@ -116,6 +125,11 @@ int snd_hdac_ext_stream_set_spib(struct hdac_ext_bus *ebus,
|
||||
struct hdac_ext_stream *stream, u32 value);
|
||||
int snd_hdac_ext_stream_get_spbmaxfifo(struct hdac_ext_bus *ebus,
|
||||
struct hdac_ext_stream *stream);
|
||||
void snd_hdac_ext_stream_drsm_enable(struct hdac_ext_bus *ebus,
|
||||
bool enable, int index);
|
||||
int snd_hdac_ext_stream_set_dpibr(struct hdac_ext_bus *ebus,
|
||||
struct hdac_ext_stream *stream, u32 value);
|
||||
int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream *stream, u32 value);
|
||||
|
||||
void snd_hdac_ext_link_stream_start(struct hdac_ext_stream *hstream);
|
||||
void snd_hdac_ext_link_stream_clear(struct hdac_ext_stream *hstream);
|
||||
@@ -133,6 +147,7 @@ struct hdac_ext_link {
|
||||
|
||||
int snd_hdac_ext_bus_link_power_up(struct hdac_ext_link *link);
|
||||
int snd_hdac_ext_bus_link_power_down(struct hdac_ext_link *link);
|
||||
int snd_hdac_ext_bus_link_power_up_all(struct hdac_ext_bus *ebus);
|
||||
int snd_hdac_ext_bus_link_power_down_all(struct hdac_ext_bus *ebus);
|
||||
void snd_hdac_ext_link_set_stream_id(struct hdac_ext_link *link,
|
||||
int stream);
|
||||
@@ -186,9 +201,15 @@ struct hdac_ext_device {
|
||||
/* codec ops */
|
||||
struct hdac_ext_codec_ops ops;
|
||||
|
||||
struct snd_card *card;
|
||||
void *scodec;
|
||||
void *private_data;
|
||||
};
|
||||
|
||||
struct hdac_ext_dma_params {
|
||||
u32 format;
|
||||
u8 stream_tag;
|
||||
};
|
||||
#define to_ehdac_device(dev) (container_of((dev), \
|
||||
struct hdac_ext_device, hdac))
|
||||
/*
|
||||
|
||||
@@ -49,6 +49,9 @@ struct device;
|
||||
#define SND_SOC_DAPM_SIGGEN(wname) \
|
||||
{ .id = snd_soc_dapm_siggen, .name = wname, .kcontrol_news = NULL, \
|
||||
.num_kcontrols = 0, .reg = SND_SOC_NOPM }
|
||||
#define SND_SOC_DAPM_SINK(wname) \
|
||||
{ .id = snd_soc_dapm_sink, .name = wname, .kcontrol_news = NULL, \
|
||||
.num_kcontrols = 0, .reg = SND_SOC_NOPM }
|
||||
#define SND_SOC_DAPM_INPUT(wname) \
|
||||
{ .id = snd_soc_dapm_input, .name = wname, .kcontrol_news = NULL, \
|
||||
.num_kcontrols = 0, .reg = SND_SOC_NOPM }
|
||||
@@ -485,6 +488,7 @@ enum snd_soc_dapm_type {
|
||||
snd_soc_dapm_aif_in, /* audio interface input */
|
||||
snd_soc_dapm_aif_out, /* audio interface output */
|
||||
snd_soc_dapm_siggen, /* signal generator */
|
||||
snd_soc_dapm_sink,
|
||||
snd_soc_dapm_dai_in, /* link to DAI structure */
|
||||
snd_soc_dapm_dai_out,
|
||||
snd_soc_dapm_dai_link, /* link between two DAI structures */
|
||||
|
||||
+4
-1
@@ -1106,7 +1106,7 @@ struct snd_soc_card {
|
||||
/* CPU <--> Codec DAI links */
|
||||
struct snd_soc_dai_link *dai_link;
|
||||
int num_links;
|
||||
struct snd_soc_pcm_runtime *rtd;
|
||||
struct list_head rtd_list;
|
||||
int num_rtd;
|
||||
|
||||
/* optional codec specific configuration */
|
||||
@@ -1201,6 +1201,9 @@ struct snd_soc_pcm_runtime {
|
||||
struct dentry *debugfs_dpcm_root;
|
||||
struct dentry *debugfs_dpcm_state;
|
||||
#endif
|
||||
|
||||
unsigned int num; /* 0-based and monotonic increasing */
|
||||
struct list_head list; /* rtd list of the soc card */
|
||||
};
|
||||
|
||||
/* mixer control */
|
||||
|
||||
@@ -77,6 +77,12 @@ int snd_hdac_ext_bus_parse_capabilities(struct hdac_ext_bus *ebus)
|
||||
ebus->spbcap = bus->remap_addr + offset;
|
||||
break;
|
||||
|
||||
case AZX_DRSM_CAP_ID:
|
||||
/* DMA resume capability found, handler function */
|
||||
dev_dbg(bus->dev, "Found DRSM capability\n");
|
||||
ebus->drsmcap = bus->remap_addr + offset;
|
||||
break;
|
||||
|
||||
default:
|
||||
dev_dbg(bus->dev, "Unknown capability %d\n", cur_cap);
|
||||
break;
|
||||
@@ -240,7 +246,7 @@ static int check_hdac_link_power_active(struct hdac_ext_link *link, bool enable)
|
||||
int mask = (1 << AZX_MLCTL_CPA);
|
||||
|
||||
udelay(3);
|
||||
timeout = 50;
|
||||
timeout = 150;
|
||||
|
||||
do {
|
||||
val = readl(link->ml_addr + AZX_REG_ML_LCTL);
|
||||
@@ -281,6 +287,27 @@ int snd_hdac_ext_bus_link_power_down(struct hdac_ext_link *link)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_link_power_down);
|
||||
|
||||
/**
|
||||
* snd_hdac_ext_bus_link_power_up_all -power up all hda link
|
||||
* @ebus: HD-audio extended bus
|
||||
*/
|
||||
int snd_hdac_ext_bus_link_power_up_all(struct hdac_ext_bus *ebus)
|
||||
{
|
||||
struct hdac_ext_link *hlink = NULL;
|
||||
int ret;
|
||||
|
||||
list_for_each_entry(hlink, &ebus->hlink_list, list) {
|
||||
snd_hdac_updatel(hlink->ml_addr,
|
||||
AZX_REG_ML_LCTL, 0, AZX_MLCTL_SPA);
|
||||
ret = check_hdac_link_power_active(hlink, true);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hdac_ext_bus_link_power_up_all);
|
||||
|
||||
/**
|
||||
* snd_hdac_ext_bus_link_power_down_all -power down all hda link
|
||||
* @ebus: HD-audio extended bus
|
||||
|
||||
@@ -59,6 +59,10 @@ void snd_hdac_ext_stream_init(struct hdac_ext_bus *ebus,
|
||||
AZX_SPB_MAXFIFO;
|
||||
}
|
||||
|
||||
if (ebus->drsmcap)
|
||||
stream->dpibr_addr = ebus->drsmcap + AZX_DRSM_BASE +
|
||||
AZX_DRSM_INTERVAL * idx;
|
||||
|
||||
stream->decoupled = false;
|
||||
snd_hdac_stream_init(bus, &stream->hstream, idx, direction, tag);
|
||||
}
|
||||
@@ -107,6 +111,7 @@ void snd_hdac_stream_free_all(struct hdac_ext_bus *ebus)
|
||||
while (!list_empty(&bus->stream_list)) {
|
||||
s = list_first_entry(&bus->stream_list, struct hdac_stream, list);
|
||||
stream = stream_to_hdac_ext_stream(s);
|
||||
snd_hdac_ext_stream_decouple(ebus, stream, false);
|
||||
list_del(&s->list);
|
||||
kfree(stream);
|
||||
}
|
||||
@@ -497,3 +502,70 @@ void snd_hdac_ext_stop_streams(struct hdac_ext_bus *ebus)
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hdac_ext_stop_streams);
|
||||
|
||||
/**
|
||||
* snd_hdac_ext_stream_drsm_enable - enable DMA resume for a stream
|
||||
* @ebus: HD-audio ext core bus
|
||||
* @enable: flag to enable/disable DRSM
|
||||
* @index: stream index for which DRSM need to be enabled
|
||||
*/
|
||||
void snd_hdac_ext_stream_drsm_enable(struct hdac_ext_bus *ebus,
|
||||
bool enable, int index)
|
||||
{
|
||||
u32 mask = 0;
|
||||
u32 register_mask = 0;
|
||||
struct hdac_bus *bus = &ebus->bus;
|
||||
|
||||
if (!ebus->drsmcap) {
|
||||
dev_err(bus->dev, "Address of DRSM capability is NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
mask |= (1 << index);
|
||||
|
||||
register_mask = readl(ebus->drsmcap + AZX_REG_SPB_SPBFCCTL);
|
||||
|
||||
mask |= register_mask;
|
||||
|
||||
if (enable)
|
||||
snd_hdac_updatel(ebus->drsmcap, AZX_REG_DRSM_CTL, 0, mask);
|
||||
else
|
||||
snd_hdac_updatel(ebus->drsmcap, AZX_REG_DRSM_CTL, mask, 0);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_drsm_enable);
|
||||
|
||||
/**
|
||||
* snd_hdac_ext_stream_set_dpibr - sets the dpibr value of a stream
|
||||
* @ebus: HD-audio ext core bus
|
||||
* @stream: hdac_ext_stream
|
||||
* @value: dpib value to set
|
||||
*/
|
||||
int snd_hdac_ext_stream_set_dpibr(struct hdac_ext_bus *ebus,
|
||||
struct hdac_ext_stream *stream, u32 value)
|
||||
{
|
||||
struct hdac_bus *bus = &ebus->bus;
|
||||
|
||||
if (!ebus->drsmcap) {
|
||||
dev_err(bus->dev, "Address of DRSM capability is NULL");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
writel(value, stream->dpibr_addr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_set_dpibr);
|
||||
|
||||
/**
|
||||
* snd_hdac_ext_stream_set_lpib - sets the lpib value of a stream
|
||||
* @ebus: HD-audio ext core bus
|
||||
* @stream: hdac_ext_stream
|
||||
* @value: lpib value to set
|
||||
*/
|
||||
int snd_hdac_ext_stream_set_lpib(struct hdac_ext_stream *stream, u32 value)
|
||||
{
|
||||
snd_hdac_stream_writel(&stream->hstream, SD_LPIB, value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hdac_ext_stream_set_lpib);
|
||||
|
||||
@@ -66,6 +66,7 @@ config SND_SOC_ALL_CODECS
|
||||
select SND_SOC_ES8328_SPI if SPI_MASTER
|
||||
select SND_SOC_ES8328_I2C if I2C
|
||||
select SND_SOC_GTM601
|
||||
select SND_SOC_HDAC_HDMI
|
||||
select SND_SOC_ICS43432
|
||||
select SND_SOC_ISABELLE if I2C
|
||||
select SND_SOC_JZ4740_CODEC
|
||||
@@ -468,6 +469,11 @@ config SND_SOC_ES8328_SPI
|
||||
config SND_SOC_GTM601
|
||||
tristate 'GTM601 UMTS modem audio codec'
|
||||
|
||||
config SND_SOC_HDAC_HDMI
|
||||
tristate
|
||||
select SND_HDA_EXT_CORE
|
||||
select HDMI
|
||||
|
||||
config SND_SOC_ICS43432
|
||||
tristate
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ snd-soc-es8328-objs := es8328.o
|
||||
snd-soc-es8328-i2c-objs := es8328-i2c.o
|
||||
snd-soc-es8328-spi-objs := es8328-spi.o
|
||||
snd-soc-gtm601-objs := gtm601.o
|
||||
snd-soc-hdac-hdmi-objs := hdac_hdmi.o
|
||||
snd-soc-ics43432-objs := ics43432.o
|
||||
snd-soc-isabelle-objs := isabelle.o
|
||||
snd-soc-jz4740-codec-objs := jz4740.o
|
||||
@@ -254,6 +255,7 @@ obj-$(CONFIG_SND_SOC_ES8328) += snd-soc-es8328.o
|
||||
obj-$(CONFIG_SND_SOC_ES8328_I2C)+= snd-soc-es8328-i2c.o
|
||||
obj-$(CONFIG_SND_SOC_ES8328_SPI)+= snd-soc-es8328-spi.o
|
||||
obj-$(CONFIG_SND_SOC_GTM601) += snd-soc-gtm601.o
|
||||
obj-$(CONFIG_SND_SOC_HDAC_HDMI) += snd-soc-hdac-hdmi.o
|
||||
obj-$(CONFIG_SND_SOC_ICS43432) += snd-soc-ics43432.o
|
||||
obj-$(CONFIG_SND_SOC_ISABELLE) += snd-soc-isabelle.o
|
||||
obj-$(CONFIG_SND_SOC_JZ4740_CODEC) += snd-soc-jz4740-codec.o
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -488,6 +488,18 @@ static int is_sys_clk_from_pll(struct snd_soc_dapm_widget *source,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int is_using_asrc(struct snd_soc_dapm_widget *source,
|
||||
struct snd_soc_dapm_widget *sink)
|
||||
{
|
||||
struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm);
|
||||
struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec);
|
||||
|
||||
if (!rt5640->asrc_en)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Digital Mixer */
|
||||
static const struct snd_kcontrol_new rt5640_sto_adc_l_mix[] = {
|
||||
SOC_DAPM_SINGLE("ADC1 Switch", RT5640_STO_ADC_MIXER,
|
||||
@@ -1059,6 +1071,20 @@ static int rt5640_hp_post_event(struct snd_soc_dapm_widget *w,
|
||||
static const struct snd_soc_dapm_widget rt5640_dapm_widgets[] = {
|
||||
SND_SOC_DAPM_SUPPLY("PLL1", RT5640_PWR_ANLG2,
|
||||
RT5640_PWR_PLL_BIT, 0, NULL, 0),
|
||||
|
||||
/* ASRC */
|
||||
SND_SOC_DAPM_SUPPLY_S("Stereo Filter ASRC", 1, RT5640_ASRC_1,
|
||||
15, 0, NULL, 0),
|
||||
SND_SOC_DAPM_SUPPLY_S("I2S2 Filter ASRC", 1, RT5640_ASRC_1,
|
||||
12, 0, NULL, 0),
|
||||
SND_SOC_DAPM_SUPPLY_S("I2S2 ASRC", 1, RT5640_ASRC_1,
|
||||
11, 0, NULL, 0),
|
||||
SND_SOC_DAPM_SUPPLY_S("DMIC1 ASRC", 1, RT5640_ASRC_1,
|
||||
9, 0, NULL, 0),
|
||||
SND_SOC_DAPM_SUPPLY_S("DMIC2 ASRC", 1, RT5640_ASRC_1,
|
||||
8, 0, NULL, 0),
|
||||
|
||||
|
||||
/* Input Side */
|
||||
/* micbias */
|
||||
SND_SOC_DAPM_SUPPLY("LDO2", RT5640_PWR_ANLG1,
|
||||
@@ -1319,6 +1345,12 @@ static const struct snd_soc_dapm_widget rt5639_specific_dapm_widgets[] = {
|
||||
};
|
||||
|
||||
static const struct snd_soc_dapm_route rt5640_dapm_routes[] = {
|
||||
{ "I2S1", NULL, "Stereo Filter ASRC", is_using_asrc },
|
||||
{ "I2S2", NULL, "I2S2 ASRC", is_using_asrc },
|
||||
{ "I2S2", NULL, "I2S2 Filter ASRC", is_using_asrc },
|
||||
{ "DMIC1", NULL, "DMIC1 ASRC", is_using_asrc },
|
||||
{ "DMIC2", NULL, "DMIC2 ASRC", is_using_asrc },
|
||||
|
||||
{"IN1P", NULL, "LDO2"},
|
||||
{"IN2P", NULL, "LDO2"},
|
||||
{"IN3P", NULL, "LDO2"},
|
||||
@@ -1981,6 +2013,76 @@ int rt5640_dmic_enable(struct snd_soc_codec *codec,
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt5640_dmic_enable);
|
||||
|
||||
int rt5640_sel_asrc_clk_src(struct snd_soc_codec *codec,
|
||||
unsigned int filter_mask, unsigned int clk_src)
|
||||
{
|
||||
struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec);
|
||||
unsigned int asrc2_mask = 0;
|
||||
unsigned int asrc2_value = 0;
|
||||
|
||||
switch (clk_src) {
|
||||
case RT5640_CLK_SEL_SYS:
|
||||
case RT5640_CLK_SEL_ASRC:
|
||||
break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!filter_mask)
|
||||
return -EINVAL;
|
||||
|
||||
if (filter_mask & RT5640_DA_STEREO_FILTER) {
|
||||
asrc2_mask |= RT5640_STO_DAC_M_MASK;
|
||||
asrc2_value = (asrc2_value & ~RT5640_STO_DAC_M_MASK)
|
||||
| (clk_src << RT5640_STO_DAC_M_SFT);
|
||||
}
|
||||
|
||||
if (filter_mask & RT5640_DA_MONO_L_FILTER) {
|
||||
asrc2_mask |= RT5640_MDA_L_M_MASK;
|
||||
asrc2_value = (asrc2_value & ~RT5640_MDA_L_M_MASK)
|
||||
| (clk_src << RT5640_MDA_L_M_SFT);
|
||||
}
|
||||
|
||||
if (filter_mask & RT5640_DA_MONO_R_FILTER) {
|
||||
asrc2_mask |= RT5640_MDA_R_M_MASK;
|
||||
asrc2_value = (asrc2_value & ~RT5640_MDA_R_M_MASK)
|
||||
| (clk_src << RT5640_MDA_R_M_SFT);
|
||||
}
|
||||
|
||||
if (filter_mask & RT5640_AD_STEREO_FILTER) {
|
||||
asrc2_mask |= RT5640_ADC_M_MASK;
|
||||
asrc2_value = (asrc2_value & ~RT5640_ADC_M_MASK)
|
||||
| (clk_src << RT5640_ADC_M_SFT);
|
||||
}
|
||||
|
||||
if (filter_mask & RT5640_AD_MONO_L_FILTER) {
|
||||
asrc2_mask |= RT5640_MAD_L_M_MASK;
|
||||
asrc2_value = (asrc2_value & ~RT5640_MAD_L_M_MASK)
|
||||
| (clk_src << RT5640_MAD_L_M_SFT);
|
||||
}
|
||||
|
||||
if (filter_mask & RT5640_AD_MONO_R_FILTER) {
|
||||
asrc2_mask |= RT5640_MAD_R_M_MASK;
|
||||
asrc2_value = (asrc2_value & ~RT5640_MAD_R_M_MASK)
|
||||
| (clk_src << RT5640_MAD_R_M_SFT);
|
||||
}
|
||||
|
||||
snd_soc_update_bits(codec, RT5640_ASRC_2,
|
||||
asrc2_mask, asrc2_value);
|
||||
|
||||
if (snd_soc_read(codec, RT5640_ASRC_2)) {
|
||||
rt5640->asrc_en = true;
|
||||
snd_soc_update_bits(codec, RT5640_JD_CTRL, 0x3, 0x3);
|
||||
} else {
|
||||
rt5640->asrc_en = false;
|
||||
snd_soc_update_bits(codec, RT5640_JD_CTRL, 0x3, 0x0);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt5640_sel_asrc_clk_src);
|
||||
|
||||
static int rt5640_probe(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
|
||||
@@ -2175,6 +2277,7 @@ static const struct acpi_device_id rt5640_acpi_match[] = {
|
||||
{ "INT33CA", 0 },
|
||||
{ "10EC5640", 0 },
|
||||
{ "10EC5642", 0 },
|
||||
{ "INTCCFFD", 0 },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(acpi, rt5640_acpi_match);
|
||||
|
||||
@@ -1033,6 +1033,10 @@
|
||||
#define RT5640_DMIC_2_M_NOR (0x0 << 8)
|
||||
#define RT5640_DMIC_2_M_ASYN (0x1 << 8)
|
||||
|
||||
/* ASRC clock source selection (0x84) */
|
||||
#define RT5640_CLK_SEL_SYS (0x0)
|
||||
#define RT5640_CLK_SEL_ASRC (0x1)
|
||||
|
||||
/* ASRC Control 2 (0x84) */
|
||||
#define RT5640_MDA_L_M_MASK (0x1 << 15)
|
||||
#define RT5640_MDA_L_M_SFT 15
|
||||
@@ -2079,6 +2083,16 @@ enum {
|
||||
RT5640_DMIC2,
|
||||
};
|
||||
|
||||
/* filter mask */
|
||||
enum {
|
||||
RT5640_DA_STEREO_FILTER = 0x1,
|
||||
RT5640_DA_MONO_L_FILTER = (0x1 << 1),
|
||||
RT5640_DA_MONO_R_FILTER = (0x1 << 2),
|
||||
RT5640_AD_STEREO_FILTER = (0x1 << 3),
|
||||
RT5640_AD_MONO_L_FILTER = (0x1 << 4),
|
||||
RT5640_AD_MONO_R_FILTER = (0x1 << 5),
|
||||
};
|
||||
|
||||
struct rt5640_priv {
|
||||
struct snd_soc_codec *codec;
|
||||
struct rt5640_platform_data pdata;
|
||||
@@ -2095,9 +2109,12 @@ struct rt5640_priv {
|
||||
int pll_out;
|
||||
|
||||
bool hp_mute;
|
||||
bool asrc_en;
|
||||
};
|
||||
|
||||
int rt5640_dmic_enable(struct snd_soc_codec *codec,
|
||||
bool dmic1_data_pin, bool dmic2_data_pin);
|
||||
int rt5640_sel_asrc_clk_src(struct snd_soc_codec *codec,
|
||||
unsigned int filter_mask, unsigned int clk_src);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -222,12 +222,15 @@ static int fsl_asoc_card_set_bias_level(struct snd_soc_card *card,
|
||||
enum snd_soc_bias_level level)
|
||||
{
|
||||
struct fsl_asoc_card_priv *priv = snd_soc_card_get_drvdata(card);
|
||||
struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
|
||||
struct snd_soc_pcm_runtime *rtd;
|
||||
struct snd_soc_dai *codec_dai;
|
||||
struct codec_priv *codec_priv = &priv->codec_priv;
|
||||
struct device *dev = card->dev;
|
||||
unsigned int pll_out;
|
||||
int ret;
|
||||
|
||||
rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
|
||||
codec_dai = rtd->codec_dai;
|
||||
if (dapm->dev != codec_dai->dev)
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -69,13 +69,16 @@ static int imx_wm8962_set_bias_level(struct snd_soc_card *card,
|
||||
struct snd_soc_dapm_context *dapm,
|
||||
enum snd_soc_bias_level level)
|
||||
{
|
||||
struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
|
||||
struct snd_soc_pcm_runtime *rtd;
|
||||
struct snd_soc_dai *codec_dai;
|
||||
struct imx_priv *priv = &card_priv;
|
||||
struct imx_wm8962_data *data = snd_soc_card_get_drvdata(card);
|
||||
struct device *dev = &priv->pdev->dev;
|
||||
unsigned int pll_out;
|
||||
int ret;
|
||||
|
||||
rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
|
||||
codec_dai = rtd->codec_dai;
|
||||
if (dapm->dev != codec_dai->dev)
|
||||
return 0;
|
||||
|
||||
@@ -135,12 +138,15 @@ static int imx_wm8962_set_bias_level(struct snd_soc_card *card,
|
||||
|
||||
static int imx_wm8962_late_probe(struct snd_soc_card *card)
|
||||
{
|
||||
struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
|
||||
struct snd_soc_pcm_runtime *rtd;
|
||||
struct snd_soc_dai *codec_dai;
|
||||
struct imx_priv *priv = &card_priv;
|
||||
struct imx_wm8962_data *data = snd_soc_card_get_drvdata(card);
|
||||
struct device *dev = &priv->pdev->dev;
|
||||
int ret;
|
||||
|
||||
rtd = snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
|
||||
codec_dai = rtd->codec_dai;
|
||||
ret = snd_soc_dai_set_sysclk(codec_dai, WM8962_SYSCLK_MCLK,
|
||||
data->clk_frequency, SND_SOC_CLOCK_IN);
|
||||
if (ret < 0)
|
||||
|
||||
@@ -45,7 +45,7 @@ static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct simple_dai_props *dai_props =
|
||||
&priv->dai_props[rtd - rtd->card->rtd];
|
||||
&priv->dai_props[rtd->num];
|
||||
int ret;
|
||||
|
||||
ret = clk_prepare_enable(dai_props->cpu_dai.clk);
|
||||
@@ -64,7 +64,7 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
|
||||
struct snd_soc_pcm_runtime *rtd = substream->private_data;
|
||||
struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct simple_dai_props *dai_props =
|
||||
&priv->dai_props[rtd - rtd->card->rtd];
|
||||
&priv->dai_props[rtd->num];
|
||||
|
||||
clk_disable_unprepare(dai_props->cpu_dai.clk);
|
||||
|
||||
@@ -78,8 +78,7 @@ static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
|
||||
struct snd_soc_dai *codec_dai = rtd->codec_dai;
|
||||
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
|
||||
struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
|
||||
struct simple_dai_props *dai_props =
|
||||
&priv->dai_props[rtd - rtd->card->rtd];
|
||||
struct simple_dai_props *dai_props = &priv->dai_props[rtd->num];
|
||||
unsigned int mclk, mclk_fs = 0;
|
||||
int ret = 0;
|
||||
|
||||
@@ -174,10 +173,9 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
|
||||
struct snd_soc_dai *codec = rtd->codec_dai;
|
||||
struct snd_soc_dai *cpu = rtd->cpu_dai;
|
||||
struct simple_dai_props *dai_props;
|
||||
int num, ret;
|
||||
int ret;
|
||||
|
||||
num = rtd - rtd->card->rtd;
|
||||
dai_props = &priv->dai_props[num];
|
||||
dai_props = &priv->dai_props[rtd->num];
|
||||
ret = __asoc_simple_card_dai_init(codec, &dai_props->codec_dai);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
+50
-8
@@ -24,6 +24,7 @@ config SND_SST_IPC_PCI
|
||||
config SND_SST_IPC_ACPI
|
||||
tristate
|
||||
select SND_SST_IPC
|
||||
select SND_SOC_INTEL_SST
|
||||
depends on ACPI
|
||||
|
||||
config SND_SOC_INTEL_SST
|
||||
@@ -43,7 +44,7 @@ config SND_SOC_INTEL_BAYTRAIL
|
||||
config SND_SOC_INTEL_HASWELL_MACH
|
||||
tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint"
|
||||
depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM
|
||||
depends on DW_DMAC_CORE
|
||||
depends on DW_DMAC_CORE=y
|
||||
select SND_SOC_INTEL_SST
|
||||
select SND_SOC_INTEL_HASWELL
|
||||
select SND_SOC_RT5640
|
||||
@@ -56,18 +57,19 @@ config SND_SOC_INTEL_HASWELL_MACH
|
||||
config SND_SOC_INTEL_BYT_RT5640_MACH
|
||||
tristate "ASoC Audio driver for Intel Baytrail with RT5640 codec"
|
||||
depends on X86_INTEL_LPSS && I2C
|
||||
depends on DW_DMAC_CORE
|
||||
depends on DW_DMAC_CORE=y && (SND_SOC_INTEL_BYTCR_RT5640_MACH = n)
|
||||
select SND_SOC_INTEL_SST
|
||||
select SND_SOC_INTEL_BAYTRAIL
|
||||
select SND_SOC_RT5640
|
||||
help
|
||||
This adds audio driver for Intel Baytrail platform based boards
|
||||
with the RT5640 audio codec.
|
||||
with the RT5640 audio codec. This driver is deprecated, use
|
||||
SND_SOC_INTEL_BYTCR_RT5640_MACH instead for better functionality
|
||||
|
||||
config SND_SOC_INTEL_BYT_MAX98090_MACH
|
||||
tristate "ASoC Audio driver for Intel Baytrail with MAX98090 codec"
|
||||
depends on X86_INTEL_LPSS && I2C
|
||||
depends on DW_DMAC_CORE
|
||||
depends on DW_DMAC_CORE=y
|
||||
select SND_SOC_INTEL_SST
|
||||
select SND_SOC_INTEL_BAYTRAIL
|
||||
select SND_SOC_MAX98090
|
||||
@@ -79,7 +81,7 @@ config SND_SOC_INTEL_BROADWELL_MACH
|
||||
tristate "ASoC Audio DSP support for Intel Broadwell Wildcatpoint"
|
||||
depends on X86_INTEL_LPSS && I2C && DW_DMAC && \
|
||||
I2C_DESIGNWARE_PLATFORM
|
||||
depends on DW_DMAC_CORE
|
||||
depends on DW_DMAC_CORE=y
|
||||
select SND_SOC_INTEL_SST
|
||||
select SND_SOC_INTEL_HASWELL
|
||||
select SND_SOC_RT286
|
||||
@@ -90,14 +92,26 @@ config SND_SOC_INTEL_BROADWELL_MACH
|
||||
If unsure select "N".
|
||||
|
||||
config SND_SOC_INTEL_BYTCR_RT5640_MACH
|
||||
tristate "ASoC Audio DSP Support for MID BYT Platform"
|
||||
tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5640 codec"
|
||||
depends on X86 && I2C
|
||||
select SND_SOC_RT5640
|
||||
select SND_SST_MFLD_PLATFORM
|
||||
select SND_SST_IPC_ACPI
|
||||
help
|
||||
This adds support for ASoC machine driver for Intel(R) MID Baytrail platform
|
||||
used as alsa device in audio substem in Intel(R) MID devices
|
||||
This adds support for ASoC machine driver for Intel(R) Baytrail and Baytrail-CR
|
||||
platforms with RT5640 audio codec.
|
||||
Say Y if you have such a device
|
||||
If unsure select "N".
|
||||
|
||||
config SND_SOC_INTEL_BYTCR_RT5651_MACH
|
||||
tristate "ASoC Audio driver for Intel Baytrail and Baytrail-CR with RT5651 codec"
|
||||
depends on X86 && I2C
|
||||
select SND_SOC_RT5651
|
||||
select SND_SST_MFLD_PLATFORM
|
||||
select SND_SST_IPC_ACPI
|
||||
help
|
||||
This adds support for ASoC machine driver for Intel(R) Baytrail and Baytrail-CR
|
||||
platforms with RT5651 audio codec.
|
||||
Say Y if you have such a device
|
||||
If unsure select "N".
|
||||
|
||||
@@ -154,3 +168,31 @@ config SND_SOC_INTEL_SKL_RT286_MACH
|
||||
with RT286 I2S audio codec.
|
||||
Say Y if you have such a device
|
||||
If unsure select "N".
|
||||
|
||||
config SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH
|
||||
tristate "ASoC Audio driver for SKL with NAU88L25 and SSM4567 in I2S Mode"
|
||||
depends on X86_INTEL_LPSS && I2C
|
||||
select SND_SOC_INTEL_SST
|
||||
select SND_SOC_INTEL_SKYLAKE
|
||||
select SND_SOC_NAU8825
|
||||
select SND_SOC_SSM4567
|
||||
select SND_SOC_DMIC
|
||||
help
|
||||
This adds support for ASoC Onboard Codec I2S machine driver. This will
|
||||
create an alsa sound card for NAU88L25 + SSM4567.
|
||||
Say Y if you have such a device
|
||||
If unsure select "N".
|
||||
|
||||
config SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH
|
||||
tristate "ASoC Audio driver for SKL with NAU88L25 and MAX98357A in I2S Mode"
|
||||
depends on X86_INTEL_LPSS && I2C
|
||||
select SND_SOC_INTEL_SST
|
||||
select SND_SOC_INTEL_SKYLAKE
|
||||
select SND_SOC_NAU8825
|
||||
select SND_SOC_MAX98357A
|
||||
select SND_SOC_DMIC
|
||||
help
|
||||
This adds support for ASoC Onboard Codec I2S machine driver. This will
|
||||
create an alsa sound card for NAU88L25 + MAX98357A.
|
||||
Say Y if you have such a device
|
||||
If unsure select "N".
|
||||
|
||||
@@ -443,7 +443,7 @@ static int sst_gain_get(struct snd_kcontrol *kcontrol,
|
||||
break;
|
||||
|
||||
case SST_GAIN_MUTE:
|
||||
ucontrol->value.integer.value[0] = gv->mute ? 1 : 0;
|
||||
ucontrol->value.integer.value[0] = gv->mute ? 0 : 1;
|
||||
break;
|
||||
|
||||
case SST_GAIN_RAMP_DURATION:
|
||||
@@ -479,7 +479,7 @@ static int sst_gain_put(struct snd_kcontrol *kcontrol,
|
||||
break;
|
||||
|
||||
case SST_GAIN_MUTE:
|
||||
gv->mute = !!ucontrol->value.integer.value[0];
|
||||
gv->mute = !ucontrol->value.integer.value[0];
|
||||
dev_dbg(cmpnt->dev, "%s: Mute %d\n", mc->pname, gv->mute);
|
||||
break;
|
||||
|
||||
@@ -1109,6 +1109,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
||||
{"media0_in", NULL, "Compress Playback"},
|
||||
{"media1_in", NULL, "Headset Playback"},
|
||||
{"media2_in", NULL, "pcm0_out"},
|
||||
{"media3_in", NULL, "Deepbuffer Playback"},
|
||||
|
||||
{"media0_out mix 0", "media0_in Switch", "media0_in"},
|
||||
{"media0_out mix 0", "media1_in Switch", "media1_in"},
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
|
||||
enum {
|
||||
MERR_DPCM_AUDIO = 0,
|
||||
MERR_DPCM_DEEP_BUFFER,
|
||||
MERR_DPCM_COMPR,
|
||||
};
|
||||
|
||||
|
||||
@@ -98,6 +98,7 @@ static struct sst_dev_stream_map dpcm_strm_map[] = {
|
||||
{MERR_DPCM_AUDIO, 0, SNDRV_PCM_STREAM_PLAYBACK, PIPE_MEDIA1_IN, SST_TASK_ID_MEDIA, 0},
|
||||
{MERR_DPCM_COMPR, 0, SNDRV_PCM_STREAM_PLAYBACK, PIPE_MEDIA0_IN, SST_TASK_ID_MEDIA, 0},
|
||||
{MERR_DPCM_AUDIO, 0, SNDRV_PCM_STREAM_CAPTURE, PIPE_PCM1_OUT, SST_TASK_ID_MEDIA, 0},
|
||||
{MERR_DPCM_DEEP_BUFFER, 0, SNDRV_PCM_STREAM_PLAYBACK, PIPE_MEDIA3_IN, SST_TASK_ID_MEDIA, 0},
|
||||
};
|
||||
|
||||
static int sst_media_digital_mute(struct snd_soc_dai *dai, int mute, int stream)
|
||||
@@ -500,14 +501,25 @@ static struct snd_soc_dai_driver sst_platform_dai[] = {
|
||||
.channels_min = SST_STEREO,
|
||||
.channels_max = SST_STEREO,
|
||||
.rates = SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000,
|
||||
.formats = SNDRV_PCM_FMTBIT_S16_LE,
|
||||
.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
|
||||
},
|
||||
.capture = {
|
||||
.stream_name = "Headset Capture",
|
||||
.channels_min = 1,
|
||||
.channels_max = 2,
|
||||
.rates = SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000,
|
||||
.formats = SNDRV_PCM_FMTBIT_S16_LE,
|
||||
.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
|
||||
},
|
||||
},
|
||||
{
|
||||
.name = "deepbuffer-cpu-dai",
|
||||
.ops = &sst_media_dai_ops,
|
||||
.playback = {
|
||||
.stream_name = "Deepbuffer Playback",
|
||||
.channels_min = SST_STEREO,
|
||||
.channels_max = SST_STEREO,
|
||||
.rates = SNDRV_PCM_RATE_44100|SNDRV_PCM_RATE_48000,
|
||||
.formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE,
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -516,10 +528,6 @@ static struct snd_soc_dai_driver sst_platform_dai[] = {
|
||||
.ops = &sst_compr_dai_ops,
|
||||
.playback = {
|
||||
.stream_name = "Compress Playback",
|
||||
.channels_min = SST_STEREO,
|
||||
.channels_max = SST_STEREO,
|
||||
.rates = SNDRV_PCM_RATE_48000,
|
||||
.formats = SNDRV_PCM_FMTBIT_S16_LE,
|
||||
},
|
||||
},
|
||||
/* BE CPU Dais */
|
||||
@@ -760,15 +768,15 @@ static int sst_platform_remove(struct platform_device *pdev)
|
||||
static int sst_soc_prepare(struct device *dev)
|
||||
{
|
||||
struct sst_data *drv = dev_get_drvdata(dev);
|
||||
int i;
|
||||
struct snd_soc_pcm_runtime *rtd;
|
||||
|
||||
/* suspend all pcms first */
|
||||
snd_soc_suspend(drv->soc_card->dev);
|
||||
snd_soc_poweroff(drv->soc_card->dev);
|
||||
|
||||
/* set the SSPs to idle */
|
||||
for (i = 0; i < drv->soc_card->num_rtd; i++) {
|
||||
struct snd_soc_dai *dai = drv->soc_card->rtd[i].cpu_dai;
|
||||
list_for_each_entry(rtd, &drv->soc_card->rtd_list, list) {
|
||||
struct snd_soc_dai *dai = rtd->cpu_dai;
|
||||
|
||||
if (dai->active) {
|
||||
send_ssp_cmd(dai, dai->name, 0);
|
||||
@@ -782,11 +790,11 @@ static int sst_soc_prepare(struct device *dev)
|
||||
static void sst_soc_complete(struct device *dev)
|
||||
{
|
||||
struct sst_data *drv = dev_get_drvdata(dev);
|
||||
int i;
|
||||
struct snd_soc_pcm_runtime *rtd;
|
||||
|
||||
/* restart SSPs */
|
||||
for (i = 0; i < drv->soc_card->num_rtd; i++) {
|
||||
struct snd_soc_dai *dai = drv->soc_card->rtd[i].cpu_dai;
|
||||
list_for_each_entry(rtd, &drv->soc_card->rtd_list, list) {
|
||||
struct snd_soc_dai *dai = rtd->cpu_dai;
|
||||
|
||||
if (dai->active) {
|
||||
sst_handle_vb_timer(dai, true);
|
||||
|
||||
@@ -40,18 +40,9 @@
|
||||
#include <acpi/acpi_bus.h>
|
||||
#include "../sst-mfld-platform.h"
|
||||
#include "../../common/sst-dsp.h"
|
||||
#include "../../common/sst-acpi.h"
|
||||
#include "sst.h"
|
||||
|
||||
struct sst_machines {
|
||||
char *codec_id;
|
||||
char board[32];
|
||||
char machine[32];
|
||||
void (*machine_quirk)(void);
|
||||
char firmware[FW_NAME_SIZE];
|
||||
struct sst_platform_info *pdata;
|
||||
|
||||
};
|
||||
|
||||
/* LPE viewpoint addresses */
|
||||
#define SST_BYT_IRAM_PHY_START 0xff2c0000
|
||||
#define SST_BYT_IRAM_PHY_END 0xff2d4000
|
||||
@@ -223,37 +214,16 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static acpi_status sst_acpi_mach_match(acpi_handle handle, u32 level,
|
||||
void *context, void **ret)
|
||||
{
|
||||
*(bool *)context = true;
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
static struct sst_machines *sst_acpi_find_machine(
|
||||
struct sst_machines *machines)
|
||||
{
|
||||
struct sst_machines *mach;
|
||||
bool found = false;
|
||||
|
||||
for (mach = machines; mach->codec_id; mach++)
|
||||
if (ACPI_SUCCESS(acpi_get_devices(mach->codec_id,
|
||||
sst_acpi_mach_match,
|
||||
&found, NULL)) && found)
|
||||
return mach;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int sst_acpi_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
int ret = 0;
|
||||
struct intel_sst_drv *ctx;
|
||||
const struct acpi_device_id *id;
|
||||
struct sst_machines *mach;
|
||||
struct sst_acpi_mach *mach;
|
||||
struct platform_device *mdev;
|
||||
struct platform_device *plat_dev;
|
||||
struct sst_platform_info *pdata;
|
||||
unsigned int dev_id;
|
||||
|
||||
id = acpi_match_device(dev->driver->acpi_match_table, dev);
|
||||
@@ -261,12 +231,13 @@ static int sst_acpi_probe(struct platform_device *pdev)
|
||||
return -ENODEV;
|
||||
dev_dbg(dev, "for %s", id->id);
|
||||
|
||||
mach = (struct sst_machines *)id->driver_data;
|
||||
mach = (struct sst_acpi_mach *)id->driver_data;
|
||||
mach = sst_acpi_find_machine(mach);
|
||||
if (mach == NULL) {
|
||||
dev_err(dev, "No matching machine driver found\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
pdata = mach->pdata;
|
||||
|
||||
ret = kstrtouint(id->id, 16, &dev_id);
|
||||
if (ret < 0) {
|
||||
@@ -276,16 +247,23 @@ static int sst_acpi_probe(struct platform_device *pdev)
|
||||
|
||||
dev_dbg(dev, "ACPI device id: %x\n", dev_id);
|
||||
|
||||
plat_dev = platform_device_register_data(dev, mach->pdata->platform, -1, NULL, 0);
|
||||
plat_dev = platform_device_register_data(dev, pdata->platform, -1,
|
||||
NULL, 0);
|
||||
if (IS_ERR(plat_dev)) {
|
||||
dev_err(dev, "Failed to create machine device: %s\n", mach->pdata->platform);
|
||||
dev_err(dev, "Failed to create machine device: %s\n",
|
||||
pdata->platform);
|
||||
return PTR_ERR(plat_dev);
|
||||
}
|
||||
|
||||
/* Create platform device for sst machine driver */
|
||||
mdev = platform_device_register_data(dev, mach->machine, -1, NULL, 0);
|
||||
/*
|
||||
* Create platform device for sst machine driver,
|
||||
* pass machine info as pdata
|
||||
*/
|
||||
mdev = platform_device_register_data(dev, mach->drv_name, -1,
|
||||
(const void *)mach, sizeof(*mach));
|
||||
if (IS_ERR(mdev)) {
|
||||
dev_err(dev, "Failed to create machine device: %s\n", mach->machine);
|
||||
dev_err(dev, "Failed to create machine device: %s\n",
|
||||
mach->drv_name);
|
||||
return PTR_ERR(mdev);
|
||||
}
|
||||
|
||||
@@ -294,8 +272,8 @@ static int sst_acpi_probe(struct platform_device *pdev)
|
||||
return ret;
|
||||
|
||||
/* Fill sst platform data */
|
||||
ctx->pdata = mach->pdata;
|
||||
strcpy(ctx->firmware_name, mach->firmware);
|
||||
ctx->pdata = pdata;
|
||||
strcpy(ctx->firmware_name, mach->fw_filename);
|
||||
|
||||
ret = sst_platform_get_resources(ctx);
|
||||
if (ret)
|
||||
@@ -342,22 +320,28 @@ static int sst_acpi_remove(struct platform_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct sst_machines sst_acpi_bytcr[] = {
|
||||
{"10EC5640", "T100", "bytt100_rt5640", NULL, "intel/fw_sst_0f28.bin",
|
||||
static struct sst_acpi_mach sst_acpi_bytcr[] = {
|
||||
{"10EC5640", "bytcr_rt5640", "intel/fw_sst_0f28.bin", "bytcr_rt5640", NULL,
|
||||
&byt_rvp_platform_data },
|
||||
{"10EC5642", "bytcr_rt5640", "intel/fw_sst_0f28.bin", "bytcr_rt5640", NULL,
|
||||
&byt_rvp_platform_data },
|
||||
{"INTCCFFD", "bytcr_rt5640", "intel/fw_sst_0f28.bin", "bytcr_rt5640", NULL,
|
||||
&byt_rvp_platform_data },
|
||||
{"10EC5651", "bytcr_rt5651", "intel/fw_sst_0f28.bin", "bytcr_rt5651", NULL,
|
||||
&byt_rvp_platform_data },
|
||||
{},
|
||||
};
|
||||
|
||||
/* Cherryview-based platforms: CherryTrail and Braswell */
|
||||
static struct sst_machines sst_acpi_chv[] = {
|
||||
{"10EC5670", "cht-bsw", "cht-bsw-rt5672", NULL, "intel/fw_sst_22a8.bin",
|
||||
static struct sst_acpi_mach sst_acpi_chv[] = {
|
||||
{"10EC5670", "cht-bsw-rt5672", "intel/fw_sst_22a8.bin", "cht-bsw", NULL,
|
||||
&chv_platform_data },
|
||||
{"10EC5645", "cht-bsw", "cht-bsw-rt5645", NULL, "intel/fw_sst_22a8.bin",
|
||||
{"10EC5645", "cht-bsw-rt5645", "intel/fw_sst_22a8.bin", "cht-bsw", NULL,
|
||||
&chv_platform_data },
|
||||
{"10EC5650", "cht-bsw", "cht-bsw-rt5645", NULL, "intel/fw_sst_22a8.bin",
|
||||
{"10EC5650", "cht-bsw-rt5645", "intel/fw_sst_22a8.bin", "cht-bsw", NULL,
|
||||
&chv_platform_data },
|
||||
{"193C9890", "cht-bsw-max98090", "intel/fw_sst_22a8.bin", "cht-bsw", NULL,
|
||||
&chv_platform_data },
|
||||
{"193C9890", "cht-bsw", "cht-bsw-max98090", NULL,
|
||||
"intel/fw_sst_22a8.bin", &chv_platform_data },
|
||||
{},
|
||||
};
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user