Skip to content

Commit

Permalink
ASoC: Intel: sdw_rt711_rt1308_rt715: handle SoundWire stream creation…
Browse files Browse the repository at this point in the history
… in dailink

Use .startup and .shutdown callback to allocate/free stream

FIXME: Figure out how to add .ops?? Rander, need your help!!

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
  • Loading branch information
plbossart committed Feb 20, 2020
1 parent d82b2db commit b455dff
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions sound/soc/intel/boards/sdw_rt711_rt1308_rt715.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc-acpi.h>
#include <linux/soundwire/sdw.h>
#include "../../codecs/hdac_hdmi.h"
#include "../../codecs/rt1308.h"
#include "hda_dsp_common.h"
Expand Down Expand Up @@ -456,6 +457,22 @@ static struct snd_soc_ops rt1308_i2s_ops = {
.hw_params = rt1308_i2s_hw_params,
};

/* these wrappers are only needed to avoid typecast compilation errors */
static int sdw_startup(struct snd_pcm_substream *substream)
{
return sdw_startup_stream(substream);
}

static void sdw_shutdown(struct snd_pcm_substream *substream)
{
sdw_shutdown_stream(substream);
}

static const struct snd_soc_ops sdw_ops = {
.startup = sdw_startup,
.shutdown = sdw_shutdown,
};

static void rt711_init(const struct snd_soc_acpi_link_adr *link,
struct snd_soc_dai_link *dai_links,
struct codec_info *info,
Expand Down

0 comments on commit b455dff

Please sign in to comment.