Skip to content

Commit

Permalink
ASoC: sti: set player private data
Browse files Browse the repository at this point in the history
Set substream player private data.
substream player private data is used in uni_player_irq_handler to lock,
stop & unlock the stream when interrupt indicates underflow/overflow.
If not set, then segmentation fault occurs.

Signed-off-by: Moise Gergaud <moise.gergaud@st.com>
Acked-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Moise Gergaud authored and Mark Brown committed Nov 19, 2015
1 parent f9f5197 commit 36a65e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/sti/uniperif_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ static int uni_player_startup(struct snd_pcm_substream *substream,
{
struct sti_uniperiph_data *priv = snd_soc_dai_get_drvdata(dai);
struct uniperif *player = priv->dai_data.uni;
player->substream = substream;

player->clk_adj = 0;

Expand Down Expand Up @@ -950,6 +951,8 @@ static void uni_player_shutdown(struct snd_pcm_substream *substream,
if (player->state != UNIPERIF_STATE_STOPPED)
/* Stop the player */
uni_player_stop(player);

player->substream = NULL;
}

static int uni_player_parse_dt_clk_glue(struct platform_device *pdev,
Expand Down

0 comments on commit 36a65e2

Please sign in to comment.