ASoC: SOF: Make creation of machine device from SOF core optional
[linux-2.6-microblaze.git] / sound / soc / sof / intel / cnl.c
index 0e1e265..6b44f6d 100644 (file)
@@ -18,6 +18,7 @@
 #include "../ops.h"
 #include "hda.h"
 #include "hda-ipc.h"
+#include "../sof-audio.h"
 
 static const struct snd_sof_debugfs_map cnl_dsp_debugfs[] = {
        {"hda", HDA_DSP_HDA_BAR, 0, 0x4000, SOF_DEBUGFS_ACCESS_ALWAYS},
@@ -106,10 +107,6 @@ static irqreturn_t cnl_ipc_irq_thread(int irq, void *context)
                                    "nothing to do in IPC IRQ thread\n");
        }
 
-       /* re-enable IPC interrupt */
-       snd_sof_dsp_update_bits(sdev, HDA_DSP_BAR, HDA_DSP_REG_ADSPIC,
-                               HDA_DSP_ADSPIC_IPC, HDA_DSP_ADSPIC_IPC);
-
        return IRQ_HANDLED;
 }
 
@@ -231,7 +228,6 @@ const struct snd_sof_dsp_ops sof_cnl_ops = {
        .block_write    = sof_block_write,
 
        /* doorbell */
-       .irq_handler    = hda_dsp_ipc_irq_handler,
        .irq_thread     = cnl_ipc_irq_thread,
 
        /* ipc */
@@ -243,6 +239,12 @@ const struct snd_sof_dsp_ops sof_cnl_ops = {
        .ipc_msg_data   = hda_ipc_msg_data,
        .ipc_pcm_params = hda_ipc_pcm_params,
 
+       /* machine driver */
+       .machine_select = hda_machine_select,
+       .machine_register = sof_machine_register,
+       .machine_unregister = sof_machine_unregister,
+       .set_mach_params = hda_set_mach_params,
+
        /* debug */
        .debug_map      = cnl_dsp_debugfs,
        .debug_map_count        = ARRAY_SIZE(cnl_dsp_debugfs),