sound fixes for 4.9-rc5
Subsystems (12)
Linus,
please pull sound fixes for v4.9-rc5 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-4.9-rc5
The topmost commit is 6809cd682b82dfff47943850d1a8c714f971b5ca
----------------------------------------------------------------
sound fixes for 4.9-rc5
this became a largish pull-request, as we've got a bunch of pending ASoC fixes at this time. One noticeable change is the removal of error directive from uapi/sound/asoc.h. We found that the API has been already used on Chromebooks, so we need to support it even now.
A slight big LOC is found in Qualcomm lpass driver, but the rest are all small and easy fixes for ASoC drivers (sti, sun4i, Realtek codecs, Intel, tas571x, etc) in addition to the patches to harden the ALSA core proc file accesses.
----------------------------------------------------------------
Arnaud Pouliquen (2):
ASoC: sti: fix channel status update after playback start
ASoC: sti-sas: enable fast io for regmap
Arnd Bergmann (2):
ASoC: Intel: haswell depends on sst-firmware
ASoC: PXA: Brownstone needs I2C
Bard Liao (1):
ASoC: rt298: fix jack type detect error
Chen-Yu Tsai (2):
ASoC: sun4i-codec: return error code instead of NULL when create_card fails
ASoC: sun4i-codec: Enable bus clock after getting GPIO
Dan Carpenter (1):
ASoC: rt5663: fix a debug statement
Jon Medhurst (Tixy) (1):
ASoC: hdmi-codec: Fix hdmi_of_xlate_dai_name when #sound-dai-cells = <0>
Lukas Wunner (1):
ASoC: Intel: Skylake: Always acquire runtime pm ref on unload
Marek Szyprowski (1):
ASoC: samsung: get access to DMA engine early to defer probe properly
Mark Brown (1):
ASoC: topology: Reenable use from userspace
Petr Kulhavy (4):
ASoC: tas571x: wait 50ms after oscillator trim
ASoC: tas571x: move mixer volume controls from TAS5711 to TAS5717
ASoC: tas571x: extend the t_i2c time to comply with TAS5721
ASoC: tas571x: remove improper PDN signal usage in set_bias_level
Sathyanarayana Nujella (1):
ASoC: Intel: report JACK_LINEOUT event
Sodhi, VunnyX (1):
ASoC: Intel: Skylake: Fix to turn off hdmi power on probe failure
Srinivas Kandagatla (2):
ASoC: lpass-platform: Fix broken pcm data usage
ASoC: lpass-cpu: add module licence and description
Stephen Barber (1):
ASoC: da7219: Connect output enable register to DAIOUT
Sylwester Nawrocki (1):
ASoC: samsung: spdif: Fix DMA filter initialization
Takashi Iwai (2):
ALSA: info: Limit the proc text input size
ALSA: info: Return error for invalid read/write
Wei Yongjun (1):
ASoC: Intel: Atom: add terminate entry for dmi_system_id tables
murray foster (1):
ASoC: cs4270: fix DAPM stream name mismatch
--- include/uapi/sound/asoc.h | 6 - sound/core/info.c | 9 +- sound/soc/codecs/cs4270.c | 8 +- sound/soc/codecs/da7219.c | 3 +- sound/soc/codecs/hdmi-codec.c | 7 +- sound/soc/codecs/rt298.c | 5 + sound/soc/codecs/rt5663.c | 4 +- sound/soc/codecs/sti-sas.c | 2 +- sound/soc/codecs/tas571x.c | 37 ++---- sound/soc/intel/Kconfig | 3 +- sound/soc/intel/atom/sst/sst_acpi.c | 1 + sound/soc/intel/boards/bxt_da7219_max98357a.c | 4 +- sound/soc/intel/skylake/skl.c | 8 +- sound/soc/pxa/Kconfig | 2 +- sound/soc/qcom/lpass-cpu.c | 3 + sound/soc/qcom/lpass-platform.c | 165 ++++++++++++-------------- sound/soc/qcom/lpass.h | 1 - sound/soc/samsung/ac97.c | 10 +- sound/soc/samsung/i2s.c | 19 +-- sound/soc/samsung/pcm.c | 19 +-- sound/soc/samsung/s3c2412-i2s.c | 16 +-- sound/soc/samsung/s3c24xx-i2s.c | 14 +-- sound/soc/samsung/spdif.c | 19 ++- sound/soc/sti/uniperif_player.c | 6 +- sound/soc/sunxi/sun4i-codec.c | 19 +-- 25 files changed, 196 insertions(+), 194 deletions(-)
include/uapi/sound/asoc.h +0 -6
@@ -18,12 +18,6 @@#include <linux/types.h> #include <sound/asound.h> -#ifndef __KERNEL__ -#error This API is an early revision and not enabled in the current -#error kernel release, it will be enabled in a future kernel version -#error with incompatible changes to what is here. -#endif -/* * Maximum number of channels topology kcontrol can represent. */
sound/core/info.c +8 -1
@@ -325,10 +325,15 @@ static ssize_t snd_info_text_entry_write(struct file *file,size_t next;int err =0 ; +if (!entry->c.text.write) +return -EIO ; pos = *offset;if (!valid_pos (pos, count))return -EIO ; next = pos + count; +/* don't handle too large text inputs */ +if (next >16 *1024 ) +return -EIO ;mutex_lock (&entry->access); buf = data->wbuffer;if (!buf) {
@@ -366,7 +371,9 @@ static int snd_info_seq_show(struct seq_file *seq, void *p)struct snd_info_private_data *data = seq->private;struct snd_info_entry *entry = data->entry; -if (entry->c.text.read) { +if (!entry->c.text.read) { +return -EIO ; + }else { data->rbuffer->buffer = (char *)seq;/* XXX hack! */ entry->c.text.read (entry, data->rbuffer); }
sound/soc/codecs/cs4270.c +4 -4
@@ -148,11 +148,11 @@ SND_SOC_DAPM_OUTPUT("AOUTR"), };static const struct snd_soc_dapm_route cs4270_dapm_routes[] = { - {"Capture" ,NULL ,"AINA" }, - {"Capture" ,NULL ,"AINB" }, + {"Capture" ,NULL ,"AINL" }, + {"Capture" ,NULL ,"AINR" }, - {"AOUTA" ,NULL ,"Playback" }, - {"AOUTB" ,NULL ,"Playback" }, + {"AOUTL" ,NULL ,"Playback" }, + {"AOUTR" ,NULL ,"Playback" }, };/**
sound/soc/codecs/da7219.c +2 -1
@@ -880,7 +880,8 @@ static const struct snd_soc_dapm_widget da7219_dapm_widgets[] = { SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD),/* DAI */ -SND_SOC_DAPM_AIF_OUT ("DAIOUT" ,"Capture" ,0 ,SND_SOC_NOPM ,0 ,0 ), +SND_SOC_DAPM_AIF_OUT ("DAIOUT" ,"Capture" ,0 ,DA7219_DAI_TDM_CTRL , +DA7219_DAI_OE_SHIFT ,DA7219_NO_INVERT ), SND_SOC_DAPM_AIF_IN("DAIIN", "Playback", 0, SND_SOC_NOPM, 0, 0),/* Output Muxes */
sound/soc/codecs/hdmi-codec.c +6 -1
@@ -364,7 +364,12 @@ static int hdmi_of_xlate_dai_name(struct snd_soc_component *component,struct of_phandle_args *args, const char **dai_name) { - int id = args->args[0]; + int id; + +if (args->args_count) + id = args->args[0 ]; +else + id =0 ;if (id <ARRAY_SIZE (hdmi_dai_name)) { *dai_name = hdmi_dai_name[id];
sound/soc/codecs/rt298.c +5 -0
@@ -249,6 +249,11 @@ static int rt298_jack_detect(struct rt298_priv *rt298, bool *hp, bool *mic)snd_soc_dapm_force_enable_pin (dapm,"LDO1" );snd_soc_dapm_sync (dapm); +regmap_update_bits (rt298->regmap, +RT298_POWER_CTRL1 ,0x1001 ,0 ); +regmap_update_bits (rt298->regmap, +RT298_POWER_CTRL2 ,0x4 ,0x4 ); +regmap_write (rt298->regmap,RT298_SET_MIC1 ,0x24 );msleep (50 );
sound/soc/codecs/rt5663.c +2 -2
@@ -1547,11 +1547,11 @@ static int rt5663_jack_detect(struct snd_soc_codec *codec, int jack_insert)msleep (sleep_time[i]); val =snd_soc_read (codec,RT5663_EM_JACK_TYPE_2 ) &0x0003 ; +dev_dbg (codec->dev,"%s: MX-00e7 val=%x sleep %d\n" , + __func__, val, sleep_time[i]); i++;if (val ==0x1 || val ==0x2 || val ==0x3 )break ; -dev_dbg (codec->dev,"%s: MX-00e7 val=%x sleep %d\n" , - __func__, val, sleep_time[i]); }dev_dbg (codec->dev,"%s val = %d\n" , __func__, val);switch (val) {
sound/soc/codecs/sti-sas.c +1 -1
@@ -424,7 +424,7 @@ static const struct snd_soc_dai_ops stih407_dac_ops = {static const struct regmap_config stih407_sas_regmap = { .reg_bits =32 , .val_bits =32 , - + .fast_io = true, .max_register =STIH407_AUDIO_DAC_CTRL , .reg_defaults = stih407_sas_reg_defaults, .num_reg_defaults =ARRAY_SIZE (stih407_sas_reg_defaults),
sound/soc/codecs/tas571x.c +12 -25
@@ -341,20 +341,9 @@ static int tas571x_set_bias_level(struct snd_soc_codec *codec,return ret; } } - -gpiod_set_value (priv->pdn_gpio,0 ); -usleep_range (5000 ,6000 ); - -regcache_cache_only (priv->regmap, false); - ret =regcache_sync (priv->regmap); -if (ret) -return ret; }break ;case SND_SOC_BIAS_OFF : -regcache_cache_only (priv->regmap, true); -gpiod_set_value (priv->pdn_gpio,1 ); -if (!IS_ERR (priv->mclk))clk_disable_unprepare (priv->mclk);break ;
@@ -401,16 +390,6 @@ static const struct snd_kcontrol_new tas5711_controls[] = {TAS571X_SOFT_MUTE_REG ,TAS571X_SOFT_MUTE_CH1_SHIFT ,TAS571X_SOFT_MUTE_CH2_SHIFT , 1, 1), - -SOC_DOUBLE_R_RANGE ("CH1 Mixer Volume" , -TAS5717_CH1_LEFT_CH_MIX_REG , -TAS5717_CH1_RIGHT_CH_MIX_REG , -16 ,0 ,0x80 ,0 ), - -SOC_DOUBLE_R_RANGE ("CH2 Mixer Volume" , -TAS5717_CH2_LEFT_CH_MIX_REG , -TAS5717_CH2_RIGHT_CH_MIX_REG , - 16, 0, 0x80, 0), }; static const struct regmap_range tas571x_readonly_regs_range[] = {
@@ -488,6 +467,16 @@ static const struct snd_kcontrol_new tas5717_controls[] = { TAS571X_SOFT_MUTE_CH1_SHIFT, TAS571X_SOFT_MUTE_CH2_SHIFT, 1, 1), +SOC_DOUBLE_R_RANGE ("CH1 Mixer Volume" , +TAS5717_CH1_LEFT_CH_MIX_REG , +TAS5717_CH1_RIGHT_CH_MIX_REG , +16 ,0 ,0x80 ,0 ), + +SOC_DOUBLE_R_RANGE ("CH2 Mixer Volume" , +TAS5717_CH2_LEFT_CH_MIX_REG , +TAS5717_CH2_RIGHT_CH_MIX_REG , + 16, 0, 0x80, 0), +/* * The biquads are named according to the register names. * Please note that TI's TAS57xx Graphical Development Environment
@@ -747,13 +736,14 @@ static int tas571x_i2c_probe(struct i2c_client *client,/* pulse the active low reset line for ~100us */ usleep_range (100 ,200 );gpiod_set_value (priv->reset_gpio,0 ); -usleep_range (12000 ,20000 ); +usleep_range (13500 ,20000 ); } ret =regmap_write (priv->regmap,TAS571X_OSC_TRIM_REG ,0 );if (ret)return ret; +usleep_range (50000 ,60000 );memcpy (&priv->codec_driver, &tas571x_codec,sizeof (priv->codec_driver)); priv->codec_driver.component_driver.controls = priv->chip->controls;
@@ -770,9 +760,6 @@ static int tas571x_i2c_probe(struct i2c_client *client,return ret; } -regcache_cache_only (priv->regmap, true); -gpiod_set_value (priv->pdn_gpio,1 ); -return snd_soc_register_codec (&client->dev, &priv->codec_driver, &tas571x_dai,1 ); }
sound/soc/intel/Kconfig +1 -2
@@ -47,6 +47,7 @@ config SND_SOC_INTEL_SST_MATCH config SND_SOC_INTEL_HASWELL tristate + select SND_SOC_INTEL_SST_FIRMWARE config SND_SOC_INTEL_BAYTRAIL tristate
@@ -56,7 +57,6 @@ config SND_SOC_INTEL_HASWELL_MACH depends on X86_INTEL_LPSS && I2C && I2C_DESIGNWARE_PLATFORM depends on DW_DMAC_CORE select SND_SOC_INTEL_SST - select SND_SOC_INTEL_SST_FIRMWARE select SND_SOC_INTEL_HASWELL select SND_SOC_RT5640 help
@@ -138,7 +138,6 @@ config SND_SOC_INTEL_BROADWELL_MACH I2C_DESIGNWARE_PLATFORM depends on DW_DMAC_CORE select SND_SOC_INTEL_SST - select SND_SOC_INTEL_SST_FIRMWARE select SND_SOC_INTEL_HASWELL select SND_SOC_RT286 help
sound/soc/intel/atom/sst/sst_acpi.c +1 -0
@@ -416,6 +416,7 @@ static const struct dmi_system_id cht_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"), }, }, + { } };
sound/soc/intel/boards/bxt_da7219_max98357a.c +2 -2
@@ -130,8 +130,8 @@ static int broxton_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)*/ ret =snd_soc_card_jack_new (rtd->card,"Headset Jack" ,SND_JACK_HEADSET |SND_JACK_BTN_0 |SND_JACK_BTN_1 | -SND_JACK_BTN_2 |SND_JACK_BTN_3 , &broxton_headset, -NULL ,0 ); +SND_JACK_BTN_2 |SND_JACK_BTN_3 |SND_JACK_LINEOUT , + &broxton_headset,NULL ,0 );if (ret) {dev_err (rtd->dev,"Headset Jack creation failed: %d\n" , ret);return ret;
sound/soc/intel/skylake/skl.c +5 -3
@@ -674,7 +674,7 @@ static int skl_probe(struct pci_dev *pci,if (skl->nhlt ==NULL ) { err = -ENODEV ; - goto out_free; + goto out_display_power_off; }skl_nhlt_update_topology_bin (skl);
@@ -746,6 +746,9 @@ static int skl_probe(struct pci_dev *pci,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);
@@ -785,8 +788,7 @@ static void skl_remove(struct pci_dev *pci)release_firmware (skl->tplg); -if (pci_dev_run_wake (pci)) -pm_runtime_get_noresume (&pci->dev); +pm_runtime_get_noresume (&pci->dev);/* codec removal, invoke bus_device_remove */ snd_hdac_ext_bus_device_remove (ebus);
sound/soc/pxa/Kconfig +1 -1
@@ -208,7 +208,7 @@ config SND_PXA2XX_SOC_IMOTE2 config SND_MMP_SOC_BROWNSTONE tristate "SoC Audio support for Marvell Brownstone" - depends on SND_MMP_SOC && MACH_BROWNSTONE + depends on SND_MMP_SOC && MACH_BROWNSTONE && I2C select SND_MMP_SOC_SSPA select MFD_WM8994 select SND_SOC_WM8994
sound/soc/qcom/lpass-cpu.c +3 -0
@@ -586,3 +586,6 @@ int asoc_qcom_lpass_cpu_platform_remove(struct platform_device *pdev)return 0 ; }EXPORT_SYMBOL_GPL (asoc_qcom_lpass_cpu_platform_remove); + +MODULE_DESCRIPTION ("QTi LPASS CPU Driver" ); +MODULE_LICENSE ("GPL v2" );
sound/soc/qcom/lpass-platform.c +79 -86
250 lines not on this page · raw message
sound/soc/qcom/lpass.h +0 -1
@@ -59,7 +59,6 @@ struct lpass_data {struct clk *pcnoc_mport_clk;struct clk *pcnoc_sway_clk; -void *private_data; };/* Vairant data per each SOC */
sound/soc/samsung/ac97.c +5 -5
@@ -383,11 +383,6 @@ static int s3c_ac97_probe(struct platform_device *pdev) goto err4; } - ret =devm_snd_soc_register_component (&pdev->dev, &s3c_ac97_component, - s3c_ac97_dai,ARRAY_SIZE (s3c_ac97_dai)); -if (ret) - goto err5; - ret =samsung_asoc_dma_platform_register (&pdev->dev, ac97_pdata->dma_filter,NULL ,NULL );
@@ -396,6 +391,11 @@ static int s3c_ac97_probe(struct platform_device *pdev) goto err5; } + ret =devm_snd_soc_register_component (&pdev->dev, &s3c_ac97_component, + s3c_ac97_dai,ARRAY_SIZE (s3c_ac97_dai)); +if (ret) + goto err5; +return 0 ; err5:free_irq (irq_res->start,NULL );
sound/soc/samsung/i2s.c +10 -9
@@ -1237,14 +1237,14 @@ static int samsung_i2s_probe(struct platform_device *pdev)dev_err (&pdev->dev,"Unable to get drvdata\n" );return -EFAULT ; } - ret =devm_snd_soc_register_component (&sec_dai->pdev->dev, - &samsung_i2s_component, - &sec_dai->i2s_dai_drv,1 ); + ret =samsung_asoc_dma_platform_register (&pdev->dev, + sec_dai->filter,"tx-sec" ,NULL );if (ret !=0 )return ret; -return samsung_asoc_dma_platform_register (&pdev->dev, - sec_dai->filter,"tx-sec" ,NULL ); +return devm_snd_soc_register_component (&sec_dai->pdev->dev, + &samsung_i2s_component, + &sec_dai->i2s_dai_drv,1 ); } pri_dai =i2s_alloc_dai (pdev, false);
@@ -1314,6 +1314,11 @@ static int samsung_i2s_probe(struct platform_device *pdev)if (quirks &QUIRK_PRI_6CHAN ) pri_dai->i2s_dai_drv.playback.channels_max =6 ; + ret =samsung_asoc_dma_platform_register (&pdev->dev, pri_dai->filter, +NULL ,NULL ); +if (ret <0 ) + goto err_disable_clk; +if (quirks &QUIRK_SEC_DAI ) { sec_dai =i2s_alloc_dai (pdev, true);if (!sec_dai) {
@@ -1353,10 +1358,6 @@ static int samsung_i2s_probe(struct platform_device *pdev)if (ret <0 ) goto err_free_dai; - ret =samsung_asoc_dma_platform_register (&pdev->dev, pri_dai->filter, -NULL ,NULL ); -if (ret <0 ) - goto err_free_dai;pm_runtime_enable (&pdev->dev);
sound/soc/samsung/pcm.c +10 -9
@@ -565,24 +565,25 @@ static int s3c_pcm_dev_probe(struct platform_device *pdev) pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id]; pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id]; + ret =samsung_asoc_dma_platform_register (&pdev->dev, filter, +NULL ,NULL ); +if (ret) { +dev_err (&pdev->dev,"failed to get register DMA: %d\n" , ret); + goto err5; + } +pm_runtime_enable (&pdev->dev); ret =devm_snd_soc_register_component (&pdev->dev, &s3c_pcm_component, &s3c_pcm_dai[pdev->id],1 );if (ret !=0 ) {dev_err (&pdev->dev,"failed to get register DAI: %d\n" , ret); - goto err5; - } - - ret =samsung_asoc_dma_platform_register (&pdev->dev, filter, -NULL ,NULL ); -if (ret) { -dev_err (&pdev->dev,"failed to get register DMA: %d\n" , ret); - goto err5; + goto err6; }return 0 ; - +err6: +pm_runtime_disable (&pdev->dev); err5:clk_disable_unprepare (pcm->pclk); err4:
sound/soc/samsung/s3c2412-i2s.c +8 -8
@@ -168,19 +168,19 @@ static int s3c2412_iis_dev_probe(struct platform_device *pdev) s3c2412_i2s_pcm_stereo_in.addr = res->start +S3C2412_IISRXD ; s3c2412_i2s_pcm_stereo_in.filter_data = pdata->dma_capture; - ret =s3c_i2sv2_register_component (&pdev->dev,-1 , - &s3c2412_i2s_component, - &s3c2412_i2s_dai); + ret =samsung_asoc_dma_platform_register (&pdev->dev, + pdata->dma_filter, +NULL ,NULL );if (ret) { -pr_err ("failed to register the dai\n" ); +pr_err ("failed to register the DMA: %d\n" , ret);return ret; } - ret =samsung_asoc_dma_platform_register (&pdev->dev, - pdata->dma_filter, -NULL ,NULL ); + ret =s3c_i2sv2_register_component (&pdev->dev,-1 , + &s3c2412_i2s_component, + &s3c2412_i2s_dai);if (ret) -pr_err ("failed to register the DMA: %d\n" , ret); +pr_err ("failed to register the dai\n" );return ret; }
sound/soc/samsung/s3c24xx-i2s.c +7 -7
@@ -474,18 +474,18 @@ static int s3c24xx_iis_dev_probe(struct platform_device *pdev) s3c24xx_i2s_pcm_stereo_in.addr = res->start +S3C2410_IISFIFO ; s3c24xx_i2s_pcm_stereo_in.filter_data = pdata->dma_capture; - ret =devm_snd_soc_register_component (&pdev->dev, - &s3c24xx_i2s_component, &s3c24xx_i2s_dai,1 ); + ret =samsung_asoc_dma_platform_register (&pdev->dev, + pdata->dma_filter, +NULL ,NULL );if (ret) { -pr_err ("failed to register the dai\n" ); +pr_err ("failed to register the dma: %d\n" , ret);return ret; } - ret =samsung_asoc_dma_platform_register (&pdev->dev, - pdata->dma_filter, -NULL ,NULL ); + ret =devm_snd_soc_register_component (&pdev->dev, + &s3c24xx_i2s_component, &s3c24xx_i2s_dai,1 );if (ret) -pr_err ("failed to register the dma: %d\n" , ret); +pr_err ("failed to register the dai\n" );return ret; }
sound/soc/samsung/spdif.c +9 -10
@@ -416,15 +416,6 @@ static int spdif_probe(struct platform_device *pdev) goto err3; } -dev_set_drvdata (&pdev->dev, spdif); - - ret =devm_snd_soc_register_component (&pdev->dev, - &samsung_spdif_component, &samsung_spdif_dai,1 ); -if (ret !=0 ) { -dev_err (&pdev->dev,"fail to register dai\n" ); - goto err4; - } - spdif_stereo_out.addr_width =2 ; spdif_stereo_out.addr = mem_res->start +DATA_OUTBUF ; filter =NULL ;
@@ -432,7 +423,6 @@ static int spdif_probe(struct platform_device *pdev) spdif_stereo_out.filter_data = spdif_pdata->dma_playback; filter = spdif_pdata->dma_filter; } - spdif->dma_playback = &spdif_stereo_out; ret = samsung_asoc_dma_platform_register(&pdev->dev, filter,
@@ -442,6 +432,15 @@ static int spdif_probe(struct platform_device *pdev) goto err4; } +dev_set_drvdata (&pdev->dev, spdif); + + ret =devm_snd_soc_register_component (&pdev->dev, + &samsung_spdif_component, &samsung_spdif_dai,1 ); +if (ret !=0 ) { +dev_err (&pdev->dev,"fail to register dai\n" ); + goto err4; + } +return 0 ; err4:iounmap (spdif->regs);
sound/soc/sti/uniperif_player.c +5 -1
@@ -614,7 +614,11 @@ static int uni_player_ctl_iec958_put(struct snd_kcontrol *kcontrol, iec958->status[3 ] = ucontrol->value.iec958.status[3 ];mutex_unlock (&player->ctrl_lock); -uni_player_set_channel_status (player,NULL ); +if (player->substream && player->substream->runtime) +uni_player_set_channel_status (player, + player->substream->runtime); +else +uni_player_set_channel_status (player,NULL );return 0 ; }
sound/soc/sunxi/sun4i-codec.c +10 -9
@@ -765,11 +765,11 @@ static struct snd_soc_card *sun4i_codec_create_card(struct device *dev) card =devm_kzalloc (dev,sizeof (*card),GFP_KERNEL );if (!card) -return NULL ; +return ERR_PTR (-ENOMEM ); card->dai_link =sun4i_codec_create_link (dev, &card->num_links);if (!card->dai_link) -return NULL ; +return ERR_PTR (-ENOMEM ); card->dev = dev; card->name ="sun4i-codec" ;
@@ -829,12 +829,6 @@ static int sun4i_codec_probe(struct platform_device *pdev)return PTR_ERR (scodec->clk_module); } -/* Enable the bus clock */ -if (clk_prepare_enable (scodec->clk_apb)) { -dev_err (&pdev->dev,"Failed to enable the APB clock\n" ); -return -EINVAL ; - } - scodec->gpio_pa =devm_gpiod_get_optional (&pdev->dev,"allwinner,pa" ,GPIOD_OUT_LOW );if (IS_ERR (scodec->gpio_pa)) {
@@ -844,6 +838,12 @@ static int sun4i_codec_probe(struct platform_device *pdev)return ret; } +/* Enable the bus clock */ +if (clk_prepare_enable (scodec->clk_apb)) { +dev_err (&pdev->dev,"Failed to enable the APB clock\n" ); +return -EINVAL ; + } +/* DMA configuration for TX FIFO */ scodec->playback_dma_data.addr = res->start +SUN4I_CODEC_DAC_TXDATA ; scodec->playback_dma_data.maxburst =4 ;
@@ -876,7 +876,8 @@ static int sun4i_codec_probe(struct platform_device *pdev) } card =sun4i_codec_create_card (&pdev->dev); -if (!card) { +if (IS_ERR (card)) { + ret =PTR_ERR (card);dev_err (&pdev->dev,"Failed to create our card\n" ); goto err_unregister_codec; }