ASoC: Intel: Check Haswell IPC process_reply/notification return value.
Subsystems (3)
Liam Girdwood
maintainerPATCH 1/1 ASoC: Intel: Check Haswell IPC process_reply/notification return value.
Check the return value for error when processing replies and notifications.
The patch 22981243589c: "ASoC: Intel: Add Haswell/Broadwell IPC" from
Quoted 11 lines
Feb 20, 2014, leads to the following imaginary static checker warning:
sound/soc/intel/sst-haswell-ipc.c:898 hsw_irq_thread() warn: this is always true.
sound/soc/intel/sst-haswell-ipc.c
895 /* Handle Immediate reply from DSP Core */896 handled = hsw_process_reply(hsw, ipcx); ^^^^^^^^^^^^^^^^^Returns 1 on success/error and
-EIOon error.
Quoted 11 lines
897
898 if (handled) {
899 /* clear DONE bit - tell DSP we have completed */
900 sst_dsp_shim_update_bits_unlocked(sst, SST_IPCX,
901 SST_IPCX_DONE, 0);
902
903 /* unmask Done interrupt */
904 sst_dsp_shim_update_bits_unlocked(sst, SST_IMRX,
905 SST_IMRX_DONE, 0);
906 }--- sound/soc/intel/sst-haswell-ipc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/intel/sst-haswell-ipc.c +2 -2
@@ -895,7 +895,7 @@ static irqreturn_t hsw_irq_thread(int irq, void *context)/* Handle Immediate reply from DSP Core */ handled =hsw_process_reply (hsw, ipcx); -if (handled) { +if (handled >0 ) {/* clear DONE bit - tell DSP we have completed */ sst_dsp_shim_update_bits_unlocked (sst,SST_IPCX ,SST_IPCX_DONE ,0 );
@@ -913,7 +913,7 @@ static irqreturn_t hsw_irq_thread(int irq, void *context) handled =hsw_process_notification (hsw);/* clear BUSY bit and set DONE bit - accept new messages */ -if (handled) { +if (handled >0 ) {sst_dsp_shim_update_bits_unlocked (sst,SST_IPCD ,SST_IPCD_BUSY |SST_IPCD_DONE ,SST_IPCD_DONE );
Signature · 1 line
1.8.3.2
Liam Girdwood
maintainerPATCH 1/1 ASoC: Intel: Use .dai_fmt for setting Haswell BE format.
Update the Haswell driver to use .dai_fmt in DAI link to set the format.
--- sound/soc/intel/haswell.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
sound/soc/intel/haswell.c +2 -8
@@ -69,14 +69,6 @@ static int haswell_rt5640_hw_params(struct snd_pcm_substream *substream,struct snd_soc_dai *codec_dai = rtd->codec_dai;int ret; -/* Set codec DAI configuration */ - ret =snd_soc_dai_set_fmt (codec_dai,SND_SOC_DAIFMT_I2S | -SND_SOC_DAIFMT_NB_NF |SND_SOC_DAIFMT_CBS_CFS ); -if (ret <0 ) { -dev_err (rtd->dev,"can't set codec DAI configuration\n" ); -return ret; - } - ret =snd_soc_dai_set_sysclk (codec_dai,RT5640_SCLK_S_MCLK ,12288000 ,SND_SOC_CLOCK_IN );
@@ -188,6 +180,8 @@ static struct snd_soc_dai_link haswell_rt5640_dais[] = { .no_pcm = 1, .codec_name = "i2c-INT33CA:00", .codec_dai_name = "rt5640-aif1", + .dai_fmt =SND_SOC_DAIFMT_I2S |SND_SOC_DAIFMT_NB_NF | + SND_SOC_DAIFMT_CBS_CFS, .ignore_suspend = 1, .ignore_pmdown_time = 1, .be_hw_params_fixup = haswell_ssp0_fixup,
Signature · 1 line
1.8.3.2
Re: [PATCH] ASoC: Intel: Use .dai_fmt for setting Haswell BE format.
Quoted 2 lines · Liam Girdwood
Update the Haswell driver to use .dai_fmt in DAI link to set the format.
Applied, thanks.
Liam Girdwood
maintainerPATCH 1/1 ASoC: Intel: Clean up indentation for Haswell machine driver/Kconfig
In reply to Liam GirdwoodClean up some indentation.
--- sound/soc/intel/Kconfig | 10 +++++----- sound/soc/intel/sst-haswell-dsp.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
sound/soc/intel/Kconfig +5 -5
@@ -31,15 +31,15 @@ config SND_SOC_INTEL_BAYTRAIL tristate config SND_SOC_INTEL_HASWELL_MACH - tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint" - depends on SND_SOC_INTEL_SST && X86_INTEL_LPSS + tristate "ASoC Audio DSP support for Intel Haswell Lynxpoint" + depends on SND_SOC_INTEL_SST && X86_INTEL_LPSS select SND_SOC_INTEL_HASWELL select SND_SOC_RT5640 help - This adds support for the Lynxpoint Audio DSP on Intel(R) Haswell + This adds support for the Lynxpoint Audio DSP on Intel(R) Haswell Ultrabook platforms. - Say Y if you have such a device - If unsure select "N". + Say Y if you have such a device + If unsure select "N". config SND_SOC_INTEL_BYT_RT5640_MACH tristate "ASoC Audio driver for Intel Baytrail with RT5640 codec"
sound/soc/intel/sst-haswell-dsp.c +1 -1
@@ -503,7 +503,7 @@ static void hsw_free(struct sst_dsp *sst)struct sst_ops haswell_ops = { .reset = hsw_reset, - .boot = hsw_boot, + .boot = hsw_boot, .write = sst_shim32_write, .read = sst_shim32_read, .write64 = sst_shim32_write64,
Signature · 1 line
1.8.3.2
Re: [PATCH] ASoC: Intel: Clean up indentation for Haswell machine driver/Kconfig
Quoted 1 line · Liam Girdwood
Clean up some indentation.
Applied, thanks.
Quoted 1 line · Liam Girdwood
Check the return value for error when processing replies and notifications.
Applied, thanks.