aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-07-03 17:25:37 -0400
committerTakashi Iwai <tiwai@suse.de>2009-07-03 17:25:37 -0400
commitb0bb3aa6233dccfccd040793d0d9ce838e4890e1 (patch)
treefcdb8af4b9fe4742d5387f46d5285fb41576976a /sound/pci/hda/hda_codec.c
parente488fca79fd0e864e993745ebda99e93dffebda8 (diff)
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>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 263d124de611..fb5760c64e74 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2563,7 +2563,7 @@ unsigned int snd_hda_calc_stream_format(unsigned int rate,
2563 case 20: 2563 case 20:
2564 case 24: 2564 case 24:
2565 case 32: 2565 case 32:
2566 if (maxbps >= 32) 2566 if (maxbps >= 32 || format == SNDRV_PCM_FORMAT_FLOAT_LE)
2567 val |= 0x40; 2567 val |= 0x40;
2568 else if (maxbps >= 24) 2568 else if (maxbps >= 24)
2569 val |= 0x30; 2569 val |= 0x30;
@@ -2692,7 +2692,8 @@ static int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid,
2692 } 2692 }
2693 if (streams & AC_SUPFMT_FLOAT32) { 2693 if (streams & AC_SUPFMT_FLOAT32) {
2694 formats |= SNDRV_PCM_FMTBIT_FLOAT_LE; 2694 formats |= SNDRV_PCM_FMTBIT_FLOAT_LE;
2695 bps = 32; 2695 if (!bps)
2696 bps = 32;
2696 } 2697 }
2697 if (streams == AC_SUPFMT_AC3) { 2698 if (streams == AC_SUPFMT_AC3) {
2698 /* should be exclusive */ 2699 /* should be exclusive */