mirror of
https://github.com/adulau/aha.git
synced 2024-12-29 12:16:20 +00:00
ALSA: hda - Don't override maxbps for FLOAT sharing with linear formats
When FLOAT PCM format is available but together with other linear PCM formats, don't override maxbps value. For FLOAT format, it's always 32, thus it can be better checked in snd_hda_calc_stream_format(). Otherwise the maxbps 32 might be used wrongly even if the linear PCM doesn't support it. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
e488fca79f
commit
b0bb3aa623
1 changed files with 3 additions and 2 deletions
|
@ -2563,7 +2563,7 @@ unsigned int snd_hda_calc_stream_format(unsigned int rate,
|
|||
case 20:
|
||||
case 24:
|
||||
case 32:
|
||||
if (maxbps >= 32)
|
||||
if (maxbps >= 32 || format == SNDRV_PCM_FORMAT_FLOAT_LE)
|
||||
val |= 0x40;
|
||||
else if (maxbps >= 24)
|
||||
val |= 0x30;
|
||||
|
@ -2692,6 +2692,7 @@ static int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid,
|
|||
}
|
||||
if (streams & AC_SUPFMT_FLOAT32) {
|
||||
formats |= SNDRV_PCM_FMTBIT_FLOAT_LE;
|
||||
if (!bps)
|
||||
bps = 32;
|
||||
}
|
||||
if (streams == AC_SUPFMT_AC3) {
|
||||
|
|
Loading…
Reference in a new issue