[alsa-devel] [PATCH 8/8] ALSA: Change return value for load_dsp_prepare() to -ENOSYS

Takashi Iwai tiwai at suse.de
Fri Sep 14 11:01:29 CEST 2012


At Thu, 13 Sep 2012 18:15:58 -0700,
Ian Minett wrote:
> 
> From: Ian Minett <ian_minett at creativelabs.com>
> 
> Signed-off-by: Ian Minett <ian_minett at creativelabs.com>

This depends on what is the expected.  If the function call is
mandatory for both cases with and without DSP loader implementation,
just returning zero is more practical.

In this case... well, maybe ca0132 is the only user, so I think it's
OK to return an error like this.


Takashi


> diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
> index 159e07a..ac60300 100644
> --- a/sound/pci/hda/hda_codec.h
> +++ b/sound/pci/hda/hda_codec.h
> @@ -1164,7 +1164,7 @@ snd_hda_codec_load_dsp_prepare(struct hda_codec *codec, unsigned int format,
>  				unsigned int size,
>  				struct snd_dma_buffer *bufp)
>  {
> -	return 0;
> +	return -ENOSYS;
>  }
>  static inline void
>  snd_hda_codec_load_dsp_trigger(struct hda_codec *codec, bool start) {}
> -- 
> 1.7.4.1
> 


More information about the Alsa-devel mailing list