ALSA: oxfw: fix to handle correct stream for PCM playback

When userspace application calls ioctl(2) to configure hardware for PCM
playback substream, ALSA OXFW driver handles incoming AMDTP stream.
In this case, outgoing AMDTP stream should be handled.

This commit fixes the bug for v5.3-rc kernel.

Fixes: 4f380d0070 ("ALSA: oxfw: configure packet format in pcm.hw_params callback")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Sakamoto 2019-08-26 22:55:15 +09:00 committed by Takashi Iwai
parent 75545304eb
commit 2fd2329393

View File

@ -248,7 +248,7 @@ static int pcm_playback_hw_params(struct snd_pcm_substream *substream,
unsigned int channels = params_channels(hw_params); unsigned int channels = params_channels(hw_params);
mutex_lock(&oxfw->mutex); mutex_lock(&oxfw->mutex);
err = snd_oxfw_stream_reserve_duplex(oxfw, &oxfw->tx_stream, err = snd_oxfw_stream_reserve_duplex(oxfw, &oxfw->rx_stream,
rate, channels); rate, channels);
if (err >= 0) if (err >= 0)
++oxfw->substreams_count; ++oxfw->substreams_count;