Loading Documentation/sound/codecs/cs35l56.rst +4 −5 Original line number Diff line number Diff line Loading @@ -105,10 +105,10 @@ In this example the SSID is 10280c63. The format of the firmware file names is: SoundWire (except CS35L56 Rev B0): SoundWire: cs35lxx-b0-dsp1-misc-SSID[-spkidX]-l?u? SoundWire CS35L56 Rev B0: SoundWire CS35L56 Rev B0 firmware released before kernel version 6.16: cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN Non-SoundWire (HDA and I2S): Loading @@ -127,9 +127,8 @@ Where: * spkidX is an optional part, used for laptops that have firmware configurations for different makes and models of internal speakers. The CS35L56 Rev B0 continues to use the old filename scheme because a large number of firmware files have already been published with these names. Early firmware for CS35L56 Rev B0 used the ALSA prefix (ampN) as the filename qualifier. Support for the l?u? qualifier was added in kernel 6.16. Sound Open Firmware and ALSA topology files ------------------------------------------- Loading sound/soc/codecs/cs4271.c +1 −0 Original line number Diff line number Diff line Loading @@ -603,6 +603,7 @@ static int cs4271_component_probe(struct snd_soc_component *component) CS4271_MODE2_PDN | CS4271_MODE2_CPEN); if (ret < 0) goto err_disable_clk; ret = regmap_update_bits(cs4271->regmap, CS4271_MODE2, CS4271_MODE2_PDN, 0); if (ret < 0) Loading sound/soc/codecs/da7213.c +44 −25 Original line number Diff line number Diff line Loading @@ -2124,11 +2124,50 @@ static int da7213_probe(struct snd_soc_component *component) return 0; } static int da7213_runtime_suspend(struct device *dev) { struct da7213_priv *da7213 = dev_get_drvdata(dev); regcache_cache_only(da7213->regmap, true); regcache_mark_dirty(da7213->regmap); regulator_bulk_disable(DA7213_NUM_SUPPLIES, da7213->supplies); return 0; } static int da7213_runtime_resume(struct device *dev) { struct da7213_priv *da7213 = dev_get_drvdata(dev); int ret; ret = regulator_bulk_enable(DA7213_NUM_SUPPLIES, da7213->supplies); if (ret < 0) return ret; regcache_cache_only(da7213->regmap, false); return regcache_sync(da7213->regmap); } static int da7213_suspend(struct snd_soc_component *component) { struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); return da7213_runtime_suspend(da7213->dev); } static int da7213_resume(struct snd_soc_component *component) { struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); return da7213_runtime_resume(da7213->dev); } static const struct snd_soc_component_driver soc_component_dev_da7213 = { .probe = da7213_probe, .set_bias_level = da7213_set_bias_level, .controls = da7213_snd_controls, .num_controls = ARRAY_SIZE(da7213_snd_controls), .suspend = da7213_suspend, .resume = da7213_resume, .dapm_widgets = da7213_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(da7213_dapm_widgets), .dapm_routes = da7213_audio_map, Loading Loading @@ -2175,6 +2214,8 @@ static int da7213_i2c_probe(struct i2c_client *i2c) if (!da7213->fin_min_rate) return -EINVAL; da7213->dev = &i2c->dev; i2c_set_clientdata(i2c, da7213); /* Get required supplies */ Loading Loading @@ -2224,31 +2265,9 @@ static void da7213_i2c_remove(struct i2c_client *i2c) pm_runtime_disable(&i2c->dev); } static int da7213_runtime_suspend(struct device *dev) { struct da7213_priv *da7213 = dev_get_drvdata(dev); regcache_cache_only(da7213->regmap, true); regcache_mark_dirty(da7213->regmap); regulator_bulk_disable(DA7213_NUM_SUPPLIES, da7213->supplies); return 0; } static int da7213_runtime_resume(struct device *dev) { struct da7213_priv *da7213 = dev_get_drvdata(dev); int ret; ret = regulator_bulk_enable(DA7213_NUM_SUPPLIES, da7213->supplies); if (ret < 0) return ret; regcache_cache_only(da7213->regmap, false); return regcache_sync(da7213->regmap); } static DEFINE_RUNTIME_DEV_PM_OPS(da7213_pm, da7213_runtime_suspend, da7213_runtime_resume, NULL); static const struct dev_pm_ops da7213_pm = { RUNTIME_PM_OPS(da7213_runtime_suspend, da7213_runtime_resume, NULL) }; static const struct i2c_device_id da7213_i2c_id[] = { { "da7213" }, Loading sound/soc/codecs/da7213.h +1 −0 Original line number Diff line number Diff line Loading @@ -595,6 +595,7 @@ enum da7213_supplies { /* Codec private data */ struct da7213_priv { struct regmap *regmap; struct device *dev; struct mutex ctrl_lock; struct regulator_bulk_data supplies[DA7213_NUM_SUPPLIES]; struct clk *mclk; Loading sound/soc/codecs/tas2783-sdw.c +18 −2 Original line number Diff line number Diff line Loading @@ -761,10 +761,17 @@ static void tas2783_fw_ready(const struct firmware *fmw, void *context) goto out; } mutex_lock(&tas_dev->pde_lock); img_sz = fmw->size; buf = fmw->data; offset += FW_DL_OFFSET; if (offset >= (img_sz - FW_FL_HDR)) { dev_err(tas_dev->dev, "firmware is too small"); ret = -EINVAL; goto out; } mutex_lock(&tas_dev->pde_lock); while (offset < (img_sz - FW_FL_HDR)) { memset(&hdr, 0, sizeof(hdr)); offset += read_header(&buf[offset], &hdr); Loading @@ -775,6 +782,14 @@ static void tas2783_fw_ready(const struct firmware *fmw, void *context) /* size also includes the header */ file_blk_size = hdr.length - FW_FL_HDR; /* make sure that enough data is there */ if (offset + file_blk_size > img_sz) { ret = -EINVAL; dev_err(tas_dev->dev, "corrupt firmware file"); break; } switch (hdr.file_id) { case 0: ret = sdw_nwrite_no_pm(tas_dev->sdw_peripheral, Loading Loading @@ -807,6 +822,7 @@ static void tas2783_fw_ready(const struct firmware *fmw, void *context) break; } mutex_unlock(&tas_dev->pde_lock); if (!ret) tas2783_update_calibdata(tas_dev); out: Loading Loading
Documentation/sound/codecs/cs35l56.rst +4 −5 Original line number Diff line number Diff line Loading @@ -105,10 +105,10 @@ In this example the SSID is 10280c63. The format of the firmware file names is: SoundWire (except CS35L56 Rev B0): SoundWire: cs35lxx-b0-dsp1-misc-SSID[-spkidX]-l?u? SoundWire CS35L56 Rev B0: SoundWire CS35L56 Rev B0 firmware released before kernel version 6.16: cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN Non-SoundWire (HDA and I2S): Loading @@ -127,9 +127,8 @@ Where: * spkidX is an optional part, used for laptops that have firmware configurations for different makes and models of internal speakers. The CS35L56 Rev B0 continues to use the old filename scheme because a large number of firmware files have already been published with these names. Early firmware for CS35L56 Rev B0 used the ALSA prefix (ampN) as the filename qualifier. Support for the l?u? qualifier was added in kernel 6.16. Sound Open Firmware and ALSA topology files ------------------------------------------- Loading
sound/soc/codecs/cs4271.c +1 −0 Original line number Diff line number Diff line Loading @@ -603,6 +603,7 @@ static int cs4271_component_probe(struct snd_soc_component *component) CS4271_MODE2_PDN | CS4271_MODE2_CPEN); if (ret < 0) goto err_disable_clk; ret = regmap_update_bits(cs4271->regmap, CS4271_MODE2, CS4271_MODE2_PDN, 0); if (ret < 0) Loading
sound/soc/codecs/da7213.c +44 −25 Original line number Diff line number Diff line Loading @@ -2124,11 +2124,50 @@ static int da7213_probe(struct snd_soc_component *component) return 0; } static int da7213_runtime_suspend(struct device *dev) { struct da7213_priv *da7213 = dev_get_drvdata(dev); regcache_cache_only(da7213->regmap, true); regcache_mark_dirty(da7213->regmap); regulator_bulk_disable(DA7213_NUM_SUPPLIES, da7213->supplies); return 0; } static int da7213_runtime_resume(struct device *dev) { struct da7213_priv *da7213 = dev_get_drvdata(dev); int ret; ret = regulator_bulk_enable(DA7213_NUM_SUPPLIES, da7213->supplies); if (ret < 0) return ret; regcache_cache_only(da7213->regmap, false); return regcache_sync(da7213->regmap); } static int da7213_suspend(struct snd_soc_component *component) { struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); return da7213_runtime_suspend(da7213->dev); } static int da7213_resume(struct snd_soc_component *component) { struct da7213_priv *da7213 = snd_soc_component_get_drvdata(component); return da7213_runtime_resume(da7213->dev); } static const struct snd_soc_component_driver soc_component_dev_da7213 = { .probe = da7213_probe, .set_bias_level = da7213_set_bias_level, .controls = da7213_snd_controls, .num_controls = ARRAY_SIZE(da7213_snd_controls), .suspend = da7213_suspend, .resume = da7213_resume, .dapm_widgets = da7213_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(da7213_dapm_widgets), .dapm_routes = da7213_audio_map, Loading Loading @@ -2175,6 +2214,8 @@ static int da7213_i2c_probe(struct i2c_client *i2c) if (!da7213->fin_min_rate) return -EINVAL; da7213->dev = &i2c->dev; i2c_set_clientdata(i2c, da7213); /* Get required supplies */ Loading Loading @@ -2224,31 +2265,9 @@ static void da7213_i2c_remove(struct i2c_client *i2c) pm_runtime_disable(&i2c->dev); } static int da7213_runtime_suspend(struct device *dev) { struct da7213_priv *da7213 = dev_get_drvdata(dev); regcache_cache_only(da7213->regmap, true); regcache_mark_dirty(da7213->regmap); regulator_bulk_disable(DA7213_NUM_SUPPLIES, da7213->supplies); return 0; } static int da7213_runtime_resume(struct device *dev) { struct da7213_priv *da7213 = dev_get_drvdata(dev); int ret; ret = regulator_bulk_enable(DA7213_NUM_SUPPLIES, da7213->supplies); if (ret < 0) return ret; regcache_cache_only(da7213->regmap, false); return regcache_sync(da7213->regmap); } static DEFINE_RUNTIME_DEV_PM_OPS(da7213_pm, da7213_runtime_suspend, da7213_runtime_resume, NULL); static const struct dev_pm_ops da7213_pm = { RUNTIME_PM_OPS(da7213_runtime_suspend, da7213_runtime_resume, NULL) }; static const struct i2c_device_id da7213_i2c_id[] = { { "da7213" }, Loading
sound/soc/codecs/da7213.h +1 −0 Original line number Diff line number Diff line Loading @@ -595,6 +595,7 @@ enum da7213_supplies { /* Codec private data */ struct da7213_priv { struct regmap *regmap; struct device *dev; struct mutex ctrl_lock; struct regulator_bulk_data supplies[DA7213_NUM_SUPPLIES]; struct clk *mclk; Loading
sound/soc/codecs/tas2783-sdw.c +18 −2 Original line number Diff line number Diff line Loading @@ -761,10 +761,17 @@ static void tas2783_fw_ready(const struct firmware *fmw, void *context) goto out; } mutex_lock(&tas_dev->pde_lock); img_sz = fmw->size; buf = fmw->data; offset += FW_DL_OFFSET; if (offset >= (img_sz - FW_FL_HDR)) { dev_err(tas_dev->dev, "firmware is too small"); ret = -EINVAL; goto out; } mutex_lock(&tas_dev->pde_lock); while (offset < (img_sz - FW_FL_HDR)) { memset(&hdr, 0, sizeof(hdr)); offset += read_header(&buf[offset], &hdr); Loading @@ -775,6 +782,14 @@ static void tas2783_fw_ready(const struct firmware *fmw, void *context) /* size also includes the header */ file_blk_size = hdr.length - FW_FL_HDR; /* make sure that enough data is there */ if (offset + file_blk_size > img_sz) { ret = -EINVAL; dev_err(tas_dev->dev, "corrupt firmware file"); break; } switch (hdr.file_id) { case 0: ret = sdw_nwrite_no_pm(tas_dev->sdw_peripheral, Loading Loading @@ -807,6 +822,7 @@ static void tas2783_fw_ready(const struct firmware *fmw, void *context) break; } mutex_unlock(&tas_dev->pde_lock); if (!ret) tas2783_update_calibdata(tas_dev); out: Loading