Change in RAVENNA ALSA driver to avoid channels consistency check when operating in mmap interleaved mode

This commit is contained in:
Andrea Bondavalli 2020-08-02 15:54:02 +02:00
parent b24ba6ef6b
commit 2a2d536284

View File

@ -84,16 +84,7 @@ diff --git a/driver/audio_driver.c b/driver/audio_driver.c
index 3d9debd..0ff2dfc 100644
--- a/driver/audio_driver.c
+++ b/driver/audio_driver.c
@@ -1312,7 +1312,7 @@ static int mr_alsa_audio_pcm_playback_copy_internal( struct snd_pcm_substream *s
if (channel > 0 && channel >= runtime->channels)
{
- printk(KERN_WARNING "Channel %d copy ignored because it does not fit the available runtime channels (%d)", channel, runtime->channels);
+ //printk(KERN_WARNING "Channel %d copy ignored because it does not fit the available runtime channels (%d)", channel, runtime->channels);
return 0;
}
@@ -1292,8 +1290,7 @@ static int mr_alsa_audio_pcm_playback_copy_internal( struct snd_pcm_substream *s
@@ -1292,8 +1292,7 @@ static int mr_alsa_audio_pcm_playback_copy_internal( struct snd_pcm_substream *s
struct mr_alsa_audio_chip *chip = snd_pcm_substream_chip(substream);
struct snd_pcm_runtime *runtime = substream->runtime;
int chn = 0;
@ -103,4 +94,12 @@ index 3d9debd..0ff2dfc 100644
unsigned int nb_logical_bits = snd_pcm_format_width(runtime->format);
unsigned int strideIn = snd_pcm_format_physical_width(runtime->format) >> 3;
unsigned int strideOut = snd_pcm_format_physical_width(SNDRV_PCM_FORMAT_S32_LE) >> 3;
@@ -1310,7 +1309,7 @@ static int mr_alsa_audio_pcm_playback_copy_internal( struct snd_pcm_substream *s
memset(testblock, 0, sizeof(testblock));
#endif
- if (channel > 0 && channel >= runtime->channels)
+ if (!interleaved && channel >= runtime->channels)
{
printk(KERN_WARNING "Channel %d copy ignored because it does not fit the available runtime channels (%d)", channel, runtime->channels);
return 0;