Re: [PATCH 2/2] ASoC: SOF: Intel: add trigger callback into sdw_callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> @@ -809,6 +814,10 @@ void hda_set_dai_drv_ops(struct snd_sof_dev *sdev, struct snd_sof_dsp_ops *ops)
>>  		if (!hda_use_tplg_nhlt)
>>  			ipc4_data->nhlt = intel_nhlt_init(sdev->dev);
>>  
>> +#if IS_ENABLED(CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE)
>> +		sdw_callback.trigger = ipc4_be_dai_common_trigger;
>> +#endif
> 
> #if should not be in .c files if at all possible.  Surely there's a
> better way here...

we could use

if (IS_ENABLED(CONFIG_SND_SOC_SOF_INTEL_SOUNDWIRE))
    sdw_callback.trigger = ipc4_be_dai_common_trigger;

would that work?

We try to keep this driver configurable, not all platforms require
SoundWire or HDaudio, and that 'sdw_callback' ops structure is
conditionally declared.



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux