On Thu, 05 Sep 2019 07:32:59 +0200, Pawel Harlozinski wrote:
Set SDxFMT based only on given format, due to maxbps not always being set. Split cases for formats 20,24,32 bits. For format SNDRV_PCM_FORMAT_FLOAT_LE width is equal 32 so it will end up with same mask.
This function corresponds to snd_hdac_query_supported_pcm(), so this patch breaks.
Basically the cases of 20 and 24 are superfluous and can be dropped. It's there just to be sure.
Takashi
Signed-off-by: Pawel Harlozinski pawel.harlozinski@linux.intel.com
sound/hda/hdac_device.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c index b26cc93e7e10..add758e11b85 100644 --- a/sound/hda/hdac_device.c +++ b/sound/hda/hdac_device.c @@ -759,14 +759,13 @@ unsigned int snd_hdac_calc_stream_format(unsigned int rate, val |= AC_FMT_BITS_16; break; case 20:
val |= AC_FMT_BITS_20; case 24:break;val |= AC_FMT_BITS_24; case 32:break;
if (maxbps >= 32 || format == SNDRV_PCM_FORMAT_FLOAT_LE)val |= AC_FMT_BITS_32;else if (maxbps >= 24)val |= AC_FMT_BITS_24;elseval |= AC_FMT_BITS_20;
break; default: return 0;val |= AC_FMT_BITS_32;-- 2.17.1