mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ASoC: Fixes for v4.12
This is the usual collection of device specific fixes, all accumilated since the merge window, plus one fix from Takashi for a nasty use after free bug that bit some things with deferred probe and an update to the maintainer address for the former Wolfson parts. -----BEGIN PGP SIGNATURE----- iQFHBAABCAAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlk22AsTHGJyb29uaWVA a2VybmVsLm9yZwAKCRAk1otyXVSH0EjxB/9V2zJkKWppCYHGSChnEvjhuvZDimmr NUK51jgXDt83AmFU7UpgYvmBy5EQIgAqg+bgBgYB64UZrfde56Rx5JxV/WuiWzTI w/VceKBajvptI9Hq5sbUoYYWAQsjuvuh5baGnUwuMAxXd9vQtnzds1O6ysx7Nb5Y 3XYo68HHssU5YhWnhYejyRABZxkW3LTEfedCA92XJmi5fzYV6ZFO0uofQ1UpRRXu 6MK7o+fRuNEOG/koQk2IV4gLVBZGIqAVVHzvs7YIjRBk0trxBw+a5CgVLPmxkBgX uTzMT35QbLCPIc/mUEUzQxusX6DazN2ieOF5Hc1sNeoI5r7qTaAkMKUt =P0nM -----END PGP SIGNATURE----- Merge tag 'asoc-fix-v4.12-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.12 This is the usual collection of device specific fixes, all accumilated since the merge window, plus one fix from Takashi for a nasty use after free bug that bit some things with deferred probe and an update to the maintainer address for the former Wolfson parts.
This commit is contained in:
commit
dd8038ec56
424 changed files with 3663 additions and 1634 deletions
|
|
@ -301,6 +301,14 @@ static int atmel_classd_codec_probe(struct snd_soc_codec *codec)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int atmel_classd_codec_resume(struct snd_soc_codec *codec)
|
||||
{
|
||||
struct snd_soc_card *card = snd_soc_codec_get_drvdata(codec);
|
||||
struct atmel_classd *dd = snd_soc_card_get_drvdata(card);
|
||||
|
||||
return regcache_sync(dd->regmap);
|
||||
}
|
||||
|
||||
static struct regmap *atmel_classd_codec_get_remap(struct device *dev)
|
||||
{
|
||||
return dev_get_regmap(dev, NULL);
|
||||
|
|
@ -308,6 +316,7 @@ static struct regmap *atmel_classd_codec_get_remap(struct device *dev)
|
|||
|
||||
static struct snd_soc_codec_driver soc_codec_dev_classd = {
|
||||
.probe = atmel_classd_codec_probe,
|
||||
.resume = atmel_classd_codec_resume,
|
||||
.get_regmap = atmel_classd_codec_get_remap,
|
||||
.component_driver = {
|
||||
.controls = atmel_classd_snd_controls,
|
||||
|
|
|
|||
|
|
@ -772,7 +772,7 @@ static int da7213_dai_event(struct snd_soc_dapm_widget *w,
|
|||
++i;
|
||||
msleep(50);
|
||||
}
|
||||
} while ((i < DA7213_SRM_CHECK_RETRIES) & (!srm_lock));
|
||||
} while ((i < DA7213_SRM_CHECK_RETRIES) && (!srm_lock));
|
||||
|
||||
if (!srm_lock)
|
||||
dev_warn(codec->dev, "SRM failed to lock\n");
|
||||
|
|
|
|||
|
|
@ -1108,6 +1108,13 @@ static const struct dmi_system_id force_combo_jack_table[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "Kabylake Client platform")
|
||||
}
|
||||
},
|
||||
{
|
||||
.ident = "Thinkpad Helix 2nd",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
|
||||
DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Helix 2nd")
|
||||
}
|
||||
},
|
||||
|
||||
{ }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = asoc_simple_card_init_mic(rtd->card, &priv->hp_jack, PREFIX);
|
||||
ret = asoc_simple_card_init_mic(rtd->card, &priv->mic_jack, PREFIX);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
|
|
@ -413,8 +413,11 @@ static void skl_ipc_process_reply(struct sst_generic_ipc *ipc,
|
|||
u32 reply = header.primary & IPC_GLB_REPLY_STATUS_MASK;
|
||||
u64 *ipc_header = (u64 *)(&header);
|
||||
struct skl_sst *skl = container_of(ipc, struct skl_sst, ipc);
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&ipc->dsp->spinlock, flags);
|
||||
msg = skl_ipc_reply_get_msg(ipc, *ipc_header);
|
||||
spin_unlock_irqrestore(&ipc->dsp->spinlock, flags);
|
||||
if (msg == NULL) {
|
||||
dev_dbg(ipc->dev, "ipc: rx list is empty\n");
|
||||
return;
|
||||
|
|
@ -456,8 +459,10 @@ static void skl_ipc_process_reply(struct sst_generic_ipc *ipc,
|
|||
}
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&ipc->dsp->spinlock, flags);
|
||||
list_del(&msg->list);
|
||||
sst_ipc_tx_msg_reply_complete(ipc, msg);
|
||||
spin_unlock_irqrestore(&ipc->dsp->spinlock, flags);
|
||||
}
|
||||
|
||||
irqreturn_t skl_dsp_irq_thread_handler(int irq, void *context)
|
||||
|
|
|
|||
|
|
@ -2502,7 +2502,7 @@ static int skl_tplg_get_manifest_tkn(struct device *dev,
|
|||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
tkn_count += ret;
|
||||
tkn_count = ret;
|
||||
|
||||
tuple_size += tkn_count *
|
||||
sizeof(struct snd_soc_tplg_vendor_string_elem);
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ static int skl_free(struct hdac_ext_bus *ebus)
|
|||
struct skl *skl = ebus_to_skl(ebus);
|
||||
struct hdac_bus *bus = ebus_to_hbus(ebus);
|
||||
|
||||
skl->init_failed = 1; /* to be sure */
|
||||
skl->init_done = 0; /* to be sure */
|
||||
|
||||
snd_hdac_ext_stop_streams(ebus);
|
||||
|
||||
|
|
@ -428,8 +428,10 @@ static int skl_free(struct hdac_ext_bus *ebus)
|
|||
|
||||
snd_hdac_ext_bus_exit(ebus);
|
||||
|
||||
cancel_work_sync(&skl->probe_work);
|
||||
if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI))
|
||||
snd_hdac_i915_exit(&ebus->bus);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -566,6 +568,84 @@ static const struct hdac_bus_ops bus_core_ops = {
|
|||
.get_response = snd_hdac_bus_get_response,
|
||||
};
|
||||
|
||||
static int skl_i915_init(struct hdac_bus *bus)
|
||||
{
|
||||
int err;
|
||||
|
||||
/*
|
||||
* The HDMI codec is in GPU so we need to ensure that it is powered
|
||||
* up and ready for probe
|
||||
*/
|
||||
err = snd_hdac_i915_init(bus);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = snd_hdac_display_power(bus, true);
|
||||
if (err < 0)
|
||||
dev_err(bus->dev, "Cannot turn on display power on i915\n");
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static void skl_probe_work(struct work_struct *work)
|
||||
{
|
||||
struct skl *skl = container_of(work, struct skl, probe_work);
|
||||
struct hdac_ext_bus *ebus = &skl->ebus;
|
||||
struct hdac_bus *bus = ebus_to_hbus(ebus);
|
||||
struct hdac_ext_link *hlink = NULL;
|
||||
int err;
|
||||
|
||||
if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) {
|
||||
err = skl_i915_init(bus);
|
||||
if (err < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
err = skl_init_chip(bus, true);
|
||||
if (err < 0) {
|
||||
dev_err(bus->dev, "Init chip failed with err: %d\n", err);
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
/* codec detection */
|
||||
if (!bus->codec_mask)
|
||||
dev_info(bus->dev, "no hda codecs found!\n");
|
||||
|
||||
/* create codec instances */
|
||||
err = skl_codec_create(ebus);
|
||||
if (err < 0)
|
||||
goto out_err;
|
||||
|
||||
if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) {
|
||||
err = snd_hdac_display_power(bus, false);
|
||||
if (err < 0) {
|
||||
dev_err(bus->dev, "Cannot turn off display power on i915\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* register platform dai and controls */
|
||||
err = skl_platform_register(bus->dev);
|
||||
if (err < 0)
|
||||
return;
|
||||
/*
|
||||
* we are done probing so decrement link counts
|
||||
*/
|
||||
list_for_each_entry(hlink, &ebus->hlink_list, list)
|
||||
snd_hdac_ext_bus_link_put(ebus, hlink);
|
||||
|
||||
/* configure PM */
|
||||
pm_runtime_put_noidle(bus->dev);
|
||||
pm_runtime_allow(bus->dev);
|
||||
skl->init_done = 1;
|
||||
|
||||
return;
|
||||
|
||||
out_err:
|
||||
if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI))
|
||||
err = snd_hdac_display_power(bus, false);
|
||||
}
|
||||
|
||||
/*
|
||||
* constructor
|
||||
*/
|
||||
|
|
@ -593,6 +673,7 @@ static int skl_create(struct pci_dev *pci,
|
|||
snd_hdac_ext_bus_init(ebus, &pci->dev, &bus_core_ops, io_ops);
|
||||
ebus->bus.use_posbuf = 1;
|
||||
skl->pci = pci;
|
||||
INIT_WORK(&skl->probe_work, skl_probe_work);
|
||||
|
||||
ebus->bus.bdl_pos_adj = 0;
|
||||
|
||||
|
|
@ -601,27 +682,6 @@ static int skl_create(struct pci_dev *pci,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int skl_i915_init(struct hdac_bus *bus)
|
||||
{
|
||||
int err;
|
||||
|
||||
/*
|
||||
* The HDMI codec is in GPU so we need to ensure that it is powered
|
||||
* up and ready for probe
|
||||
*/
|
||||
err = snd_hdac_i915_init(bus);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
err = snd_hdac_display_power(bus, true);
|
||||
if (err < 0) {
|
||||
dev_err(bus->dev, "Cannot turn on display power on i915\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int skl_first_init(struct hdac_ext_bus *ebus)
|
||||
{
|
||||
struct skl *skl = ebus_to_skl(ebus);
|
||||
|
|
@ -684,20 +744,7 @@ static int skl_first_init(struct hdac_ext_bus *ebus)
|
|||
/* initialize chip */
|
||||
skl_init_pci(skl);
|
||||
|
||||
if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) {
|
||||
err = skl_i915_init(bus);
|
||||
if (err < 0)
|
||||
return err;
|
||||
}
|
||||
|
||||
skl_init_chip(bus, true);
|
||||
|
||||
/* codec detection */
|
||||
if (!bus->codec_mask) {
|
||||
dev_info(bus->dev, "no hda codecs found!\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
return skl_init_chip(bus, true);
|
||||
}
|
||||
|
||||
static int skl_probe(struct pci_dev *pci,
|
||||
|
|
@ -706,7 +753,6 @@ static int skl_probe(struct pci_dev *pci,
|
|||
struct skl *skl;
|
||||
struct hdac_ext_bus *ebus = NULL;
|
||||
struct hdac_bus *bus = NULL;
|
||||
struct hdac_ext_link *hlink = NULL;
|
||||
int err;
|
||||
|
||||
/* we use ext core ops, so provide NULL for ops here */
|
||||
|
|
@ -729,7 +775,7 @@ static int skl_probe(struct pci_dev *pci,
|
|||
|
||||
if (skl->nhlt == NULL) {
|
||||
err = -ENODEV;
|
||||
goto out_display_power_off;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
err = skl_nhlt_create_sysfs(skl);
|
||||
|
|
@ -760,56 +806,24 @@ static int skl_probe(struct pci_dev *pci,
|
|||
if (bus->mlcap)
|
||||
snd_hdac_ext_bus_get_ml_capabilities(ebus);
|
||||
|
||||
snd_hdac_bus_stop_chip(bus);
|
||||
|
||||
/* create device for soc dmic */
|
||||
err = skl_dmic_device_register(skl);
|
||||
if (err < 0)
|
||||
goto out_dsp_free;
|
||||
|
||||
/* register platform dai and controls */
|
||||
err = skl_platform_register(bus->dev);
|
||||
if (err < 0)
|
||||
goto out_dmic_free;
|
||||
|
||||
/* create codec instances */
|
||||
err = skl_codec_create(ebus);
|
||||
if (err < 0)
|
||||
goto out_unregister;
|
||||
|
||||
if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) {
|
||||
err = snd_hdac_display_power(bus, false);
|
||||
if (err < 0) {
|
||||
dev_err(bus->dev, "Cannot turn off display power on i915\n");
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* we are done probling so decrement link counts
|
||||
*/
|
||||
list_for_each_entry(hlink, &ebus->hlink_list, list)
|
||||
snd_hdac_ext_bus_link_put(ebus, hlink);
|
||||
|
||||
/* configure PM */
|
||||
pm_runtime_put_noidle(bus->dev);
|
||||
pm_runtime_allow(bus->dev);
|
||||
schedule_work(&skl->probe_work);
|
||||
|
||||
return 0;
|
||||
|
||||
out_unregister:
|
||||
skl_platform_unregister(bus->dev);
|
||||
out_dmic_free:
|
||||
skl_dmic_device_unregister(skl);
|
||||
out_dsp_free:
|
||||
skl_free_dsp(skl);
|
||||
out_mach_free:
|
||||
skl_machine_device_unregister(skl);
|
||||
out_nhlt_free:
|
||||
skl_nhlt_free(skl->nhlt);
|
||||
out_display_power_off:
|
||||
if (IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI))
|
||||
snd_hdac_display_power(bus, false);
|
||||
out_free:
|
||||
skl->init_failed = 1;
|
||||
skl_free(ebus);
|
||||
|
||||
return err;
|
||||
|
|
@ -828,7 +842,7 @@ static void skl_shutdown(struct pci_dev *pci)
|
|||
|
||||
skl = ebus_to_skl(ebus);
|
||||
|
||||
if (skl->init_failed)
|
||||
if (!skl->init_done)
|
||||
return;
|
||||
|
||||
snd_hdac_ext_stop_streams(ebus);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ struct skl {
|
|||
struct hdac_ext_bus ebus;
|
||||
struct pci_dev *pci;
|
||||
|
||||
unsigned int init_failed:1; /* delayed init failed */
|
||||
unsigned int init_done:1; /* delayed init status */
|
||||
struct platform_device *dmic_dev;
|
||||
struct platform_device *i2s_dev;
|
||||
struct snd_soc_platform *platform;
|
||||
|
|
@ -64,6 +64,8 @@ struct skl {
|
|||
const struct firmware *tplg;
|
||||
|
||||
int supend_active;
|
||||
|
||||
struct work_struct probe_work;
|
||||
};
|
||||
|
||||
#define skl_to_ebus(s) (&(s)->ebus)
|
||||
|
|
|
|||
|
|
@ -507,7 +507,8 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
|
|||
rbga = rbgx;
|
||||
adg->rbga_rate_for_441khz = rate / div;
|
||||
ckr |= brg_table[i] << 20;
|
||||
if (req_441kHz_rate)
|
||||
if (req_441kHz_rate &&
|
||||
!(adg_mode_flags(adg) & AUDIO_OUT_48))
|
||||
parent_clk_name = __clk_get_name(clk);
|
||||
}
|
||||
}
|
||||
|
|
@ -522,7 +523,8 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
|
|||
rbgb = rbgx;
|
||||
adg->rbgb_rate_for_48khz = rate / div;
|
||||
ckr |= brg_table[i] << 16;
|
||||
if (req_48kHz_rate)
|
||||
if (req_48kHz_rate &&
|
||||
(adg_mode_flags(adg) & AUDIO_OUT_48))
|
||||
parent_clk_name = __clk_get_name(clk);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
|
|||
dev_dbg(dev, "ctu/mix path = 0x%08x", data);
|
||||
|
||||
rsnd_mod_write(mod, CMD_ROUTE_SLCT, data);
|
||||
rsnd_mod_write(mod, CMD_BUSIF_MODE, rsnd_get_busif_shift(io, mod) | 1);
|
||||
rsnd_mod_write(mod, CMD_BUSIF_DALIGN, rsnd_get_dalign(mod, io));
|
||||
|
||||
rsnd_adg_set_cmd_timsel_gen2(mod, io);
|
||||
|
|
|
|||
|
|
@ -343,6 +343,57 @@ u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
|
|||
return 0x76543210;
|
||||
}
|
||||
|
||||
u32 rsnd_get_busif_shift(struct rsnd_dai_stream *io, struct rsnd_mod *mod)
|
||||
{
|
||||
enum rsnd_mod_type playback_mods[] = {
|
||||
RSND_MOD_SRC,
|
||||
RSND_MOD_CMD,
|
||||
RSND_MOD_SSIU,
|
||||
};
|
||||
enum rsnd_mod_type capture_mods[] = {
|
||||
RSND_MOD_CMD,
|
||||
RSND_MOD_SRC,
|
||||
RSND_MOD_SSIU,
|
||||
};
|
||||
struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
|
||||
struct rsnd_mod *tmod = NULL;
|
||||
enum rsnd_mod_type *mods =
|
||||
rsnd_io_is_play(io) ?
|
||||
playback_mods : capture_mods;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* This is needed for 24bit data
|
||||
* We need to shift 8bit
|
||||
*
|
||||
* Linux 24bit data is located as 0x00******
|
||||
* HW 24bit data is located as 0x******00
|
||||
*
|
||||
*/
|
||||
switch (runtime->sample_bits) {
|
||||
case 16:
|
||||
return 0;
|
||||
case 32:
|
||||
break;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(playback_mods); i++) {
|
||||
tmod = rsnd_io_to_mod(io, mods[i]);
|
||||
if (tmod)
|
||||
break;
|
||||
}
|
||||
|
||||
if (tmod != mod)
|
||||
return 0;
|
||||
|
||||
if (rsnd_io_is_play(io))
|
||||
return (0 << 20) | /* shift to Left */
|
||||
(8 << 16); /* 8bit */
|
||||
else
|
||||
return (1 << 20) | /* shift to Right */
|
||||
(8 << 16); /* 8bit */
|
||||
}
|
||||
|
||||
/*
|
||||
* rsnd_dai functions
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -236,6 +236,7 @@ static int rsnd_gen2_probe(struct rsnd_priv *priv)
|
|||
RSND_GEN_M_REG(SRC_ROUTE_MODE0, 0xc, 0x20),
|
||||
RSND_GEN_M_REG(SRC_CTRL, 0x10, 0x20),
|
||||
RSND_GEN_M_REG(SRC_INT_ENABLE0, 0x18, 0x20),
|
||||
RSND_GEN_M_REG(CMD_BUSIF_MODE, 0x184, 0x20),
|
||||
RSND_GEN_M_REG(CMD_BUSIF_DALIGN,0x188, 0x20),
|
||||
RSND_GEN_M_REG(CMD_ROUTE_SLCT, 0x18c, 0x20),
|
||||
RSND_GEN_M_REG(CMD_CTRL, 0x190, 0x20),
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ enum rsnd_reg {
|
|||
RSND_REG_SCU_SYS_INT_EN0,
|
||||
RSND_REG_SCU_SYS_INT_EN1,
|
||||
RSND_REG_CMD_CTRL,
|
||||
RSND_REG_CMD_BUSIF_MODE,
|
||||
RSND_REG_CMD_BUSIF_DALIGN,
|
||||
RSND_REG_CMD_ROUTE_SLCT,
|
||||
RSND_REG_CMDOUT_TIMSEL,
|
||||
|
|
@ -204,6 +205,7 @@ void rsnd_bset(struct rsnd_priv *priv, struct rsnd_mod *mod, enum rsnd_reg reg,
|
|||
u32 mask, u32 data);
|
||||
u32 rsnd_get_adinr_bit(struct rsnd_mod *mod, struct rsnd_dai_stream *io);
|
||||
u32 rsnd_get_dalign(struct rsnd_mod *mod, struct rsnd_dai_stream *io);
|
||||
u32 rsnd_get_busif_shift(struct rsnd_dai_stream *io, struct rsnd_mod *mod);
|
||||
|
||||
/*
|
||||
* R-Car DMA
|
||||
|
|
|
|||
|
|
@ -190,11 +190,13 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
|
|||
struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
|
||||
struct device *dev = rsnd_priv_to_dev(priv);
|
||||
struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
|
||||
int is_play = rsnd_io_is_play(io);
|
||||
int use_src = 0;
|
||||
u32 fin, fout;
|
||||
u32 ifscr, fsrate, adinr;
|
||||
u32 cr, route;
|
||||
u32 bsdsr, bsisr;
|
||||
u32 i_busif, o_busif, tmp;
|
||||
uint ratio;
|
||||
|
||||
if (!runtime)
|
||||
|
|
@ -270,6 +272,11 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
|
|||
break;
|
||||
}
|
||||
|
||||
/* BUSIF_MODE */
|
||||
tmp = rsnd_get_busif_shift(io, mod);
|
||||
i_busif = ( is_play ? tmp : 0) | 1;
|
||||
o_busif = (!is_play ? tmp : 0) | 1;
|
||||
|
||||
rsnd_mod_write(mod, SRC_ROUTE_MODE0, route);
|
||||
|
||||
rsnd_mod_write(mod, SRC_SRCIR, 1); /* initialize */
|
||||
|
|
@ -281,8 +288,9 @@ static void rsnd_src_set_convert_rate(struct rsnd_dai_stream *io,
|
|||
rsnd_mod_write(mod, SRC_BSISR, bsisr);
|
||||
rsnd_mod_write(mod, SRC_SRCIR, 0); /* cancel initialize */
|
||||
|
||||
rsnd_mod_write(mod, SRC_I_BUSIF_MODE, 1);
|
||||
rsnd_mod_write(mod, SRC_O_BUSIF_MODE, 1);
|
||||
rsnd_mod_write(mod, SRC_I_BUSIF_MODE, i_busif);
|
||||
rsnd_mod_write(mod, SRC_O_BUSIF_MODE, o_busif);
|
||||
|
||||
rsnd_mod_write(mod, SRC_BUSIF_DALIGN, rsnd_get_dalign(mod, io));
|
||||
|
||||
rsnd_adg_set_src_timesel_gen2(mod, io, fin, fout);
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ static void rsnd_ssi_config_init(struct rsnd_mod *mod,
|
|||
* always use 32bit system word.
|
||||
* see also rsnd_ssi_master_clk_enable()
|
||||
*/
|
||||
cr_own = FORCE | SWL_32 | PDTA;
|
||||
cr_own = FORCE | SWL_32;
|
||||
|
||||
if (rdai->bit_clk_inv)
|
||||
cr_own |= SCKP;
|
||||
|
|
@ -550,6 +550,13 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
|
|||
struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
|
||||
u32 *buf = (u32 *)(runtime->dma_area +
|
||||
rsnd_dai_pointer_offset(io, 0));
|
||||
int shift = 0;
|
||||
|
||||
switch (runtime->sample_bits) {
|
||||
case 32:
|
||||
shift = 8;
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* 8/16/32 data can be assesse to TDR/RDR register
|
||||
|
|
@ -557,9 +564,9 @@ static void __rsnd_ssi_interrupt(struct rsnd_mod *mod,
|
|||
* see rsnd_ssi_init()
|
||||
*/
|
||||
if (rsnd_io_is_play(io))
|
||||
rsnd_mod_write(mod, SSITDR, *buf);
|
||||
rsnd_mod_write(mod, SSITDR, (*buf) << shift);
|
||||
else
|
||||
*buf = rsnd_mod_read(mod, SSIRDR);
|
||||
*buf = (rsnd_mod_read(mod, SSIRDR) >> shift);
|
||||
|
||||
elapsed = rsnd_dai_pointer_update(io, sizeof(*buf));
|
||||
}
|
||||
|
|
@ -709,6 +716,11 @@ static int rsnd_ssi_dma_remove(struct rsnd_mod *mod,
|
|||
struct rsnd_priv *priv)
|
||||
{
|
||||
struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
|
||||
struct rsnd_mod *ssi_parent_mod = rsnd_io_to_mod_ssip(io);
|
||||
|
||||
/* Do nothing for SSI parent mod */
|
||||
if (ssi_parent_mod == mod)
|
||||
return 0;
|
||||
|
||||
/* PIO will request IRQ again */
|
||||
free_irq(ssi->irq, mod);
|
||||
|
|
|
|||
|
|
@ -144,7 +144,8 @@ static int rsnd_ssiu_init_gen2(struct rsnd_mod *mod,
|
|||
(rsnd_io_is_play(io) ?
|
||||
rsnd_runtime_channel_after_ctu(io) :
|
||||
rsnd_runtime_channel_original(io)));
|
||||
rsnd_mod_write(mod, SSI_BUSIF_MODE, 1);
|
||||
rsnd_mod_write(mod, SSI_BUSIF_MODE,
|
||||
rsnd_get_busif_shift(io, mod) | 1);
|
||||
rsnd_mod_write(mod, SSI_BUSIF_DALIGN,
|
||||
rsnd_get_dalign(mod, io));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2286,6 +2286,9 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card)
|
|||
list_for_each_entry(rtd, &card->rtd_list, list)
|
||||
flush_delayed_work(&rtd->delayed_work);
|
||||
|
||||
/* free the ALSA card at first; this syncs with pending operations */
|
||||
snd_card_free(card->snd_card);
|
||||
|
||||
/* remove and free each DAI */
|
||||
soc_remove_dai_links(card);
|
||||
soc_remove_pcm_runtimes(card);
|
||||
|
|
@ -2300,9 +2303,7 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card)
|
|||
if (card->remove)
|
||||
card->remove(card);
|
||||
|
||||
snd_card_free(card->snd_card);
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
/* removes a socdev */
|
||||
|
|
|
|||
|
|
@ -1809,10 +1809,6 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
|
|||
pdata->notify_pending = false;
|
||||
spin_unlock_irq(&pdata->lpe_audio_slock);
|
||||
|
||||
/* runtime PM isn't enabled as default, since it won't save much on
|
||||
* BYT/CHT devices; user who want the runtime PM should adjust the
|
||||
* power/ontrol and power/autosuspend_delay_ms sysfs entries instead
|
||||
*/
|
||||
pm_runtime_use_autosuspend(&pdev->dev);
|
||||
pm_runtime_mark_last_busy(&pdev->dev);
|
||||
pm_runtime_set_active(&pdev->dev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue