ASoC: sti: fix channel status update after playback start
authorArnaud Pouliquen <arnaud.pouliquen@st.com>
Mon, 24 Oct 2016 14:42:52 +0000 (16:42 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 26 Oct 2016 10:41:28 +0000 (11:41 +0100)
If 'IEC958 Playback Default' control is updated during playback,
Channel status needs to be set according to the runtime structure.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sti/uniperif_player.c

index 1bc8ebc2528eb1bdf0c1df6832e943d8eebaa29f..ad54d4cf58ada992f6f279cc0e6a00386e8e273e 100644 (file)
@@ -614,7 +614,11 @@ static int uni_player_ctl_iec958_put(struct snd_kcontrol *kcontrol,
        iec958->status[3] = ucontrol->value.iec958.status[3];
        mutex_unlock(&player->ctrl_lock);
 
-       uni_player_set_channel_status(player, NULL);
+       if (player->substream && player->substream->runtime)
+               uni_player_set_channel_status(player,
+                                             player->substream->runtime);
+       else
+               uni_player_set_channel_status(player, NULL);
 
        return 0;
 }