mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
ASOC: rockchip: fix capture stream handling in rockchip_sai_xfer_stop
Correcting the capture stream handling which was incorrectly setting
playback=true for capture streams.
The original code mistakenly set playback=true for capture streams,
causing incorrect behavior.
Fixes: cc78d1eaab ("ASoC: rockchip: add Serial Audio Interface (SAI) driver")
Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Acked-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Link: https://patch.msgid.link/c374aae92c177aaf42c0f1371eccdbc7e9615786.1749201126.git.xiaopei01@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
19272b37aa
commit
5dc302d008
|
|
@ -378,19 +378,9 @@ static void rockchip_sai_xfer_start(struct rk_sai_dev *sai, int stream)
|
|||
static void rockchip_sai_xfer_stop(struct rk_sai_dev *sai, int stream)
|
||||
{
|
||||
unsigned int msk = 0, val = 0, clr = 0;
|
||||
bool playback;
|
||||
bool capture;
|
||||
|
||||
if (stream < 0) {
|
||||
playback = true;
|
||||
capture = true;
|
||||
} else if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
|
||||
playback = true;
|
||||
capture = false;
|
||||
} else {
|
||||
playback = true;
|
||||
capture = false;
|
||||
}
|
||||
bool capture = stream == SNDRV_PCM_STREAM_CAPTURE || stream < 0;
|
||||
bool playback = stream == SNDRV_PCM_STREAM_PLAYBACK || stream < 0;
|
||||
/* could be <= 0 but we don't want to depend on enum values */
|
||||
|
||||
if (playback) {
|
||||
msk |= SAI_XFER_TXS_MASK;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user