aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2007-04-12 07:08:09 -0400
committerJaroslav Kysela <perex@suse.cz>2007-05-11 10:55:58 -0400
commita961f9fe8c6b0f3138a97582e1ddf05c4560593b (patch)
treee59c94ed7f8a436b6606218f4939834d19ea364b /sound/pci
parentbc9f98a9815c452a74e5eb9cbd2ed61b337fdcd2 (diff)
[ALSA] hda-codec - Add support of 96kHz back
Added the support of 96kHz sample rate back. Although the rate isn't listed in the ACC_PAR_PCM bits but si3054 codecs do support this rate explicitly. Now fixed the deteciton code not to check this extra bit. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_codec.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 2c2fcdc72fcf..59dcd97bf833 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1368,6 +1368,11 @@ static struct hda_rate_tbl rate_bits[] = {
1368 { 96000, SNDRV_PCM_RATE_96000, 0x0800 }, /* 2 x 48 */ 1368 { 96000, SNDRV_PCM_RATE_96000, 0x0800 }, /* 2 x 48 */
1369 { 176400, SNDRV_PCM_RATE_176400, 0x5800 },/* 4 x 44 */ 1369 { 176400, SNDRV_PCM_RATE_176400, 0x5800 },/* 4 x 44 */
1370 { 192000, SNDRV_PCM_RATE_192000, 0x1800 }, /* 4 x 48 */ 1370 { 192000, SNDRV_PCM_RATE_192000, 0x1800 }, /* 4 x 48 */
1371#define AC_PAR_PCM_RATE_BITS 11
1372 /* up to bits 10, 384kHZ isn't supported properly */
1373
1374 /* not autodetected value */
1375 { 9600, SNDRV_PCM_RATE_KNOT, 0x0400 }, /* 1/5 x 48 */
1371 1376
1372 { 0 } /* terminator */ 1377 { 0 } /* terminator */
1373}; 1378};
@@ -1461,7 +1466,7 @@ int snd_hda_query_supported_pcm(struct hda_codec *codec, hda_nid_t nid,
1461 1466
1462 if (ratesp) { 1467 if (ratesp) {
1463 u32 rates = 0; 1468 u32 rates = 0;
1464 for (i = 0; rate_bits[i].hz; i++) { 1469 for (i = 0; i < AC_PAR_PCM_RATE_BITS; i++) {
1465 if (val & (1 << i)) 1470 if (val & (1 << i))
1466 rates |= rate_bits[i].alsa_bits; 1471 rates |= rate_bits[i].alsa_bits;
1467 } 1472 }
@@ -1555,13 +1560,13 @@ int snd_hda_is_supported_format(struct hda_codec *codec, hda_nid_t nid,
1555 } 1560 }
1556 1561
1557 rate = format & 0xff00; 1562 rate = format & 0xff00;
1558 for (i = 0; rate_bits[i].hz; i++) 1563 for (i = 0; i < AC_PAR_PCM_RATE_BITS; i++)
1559 if (rate_bits[i].hda_fmt == rate) { 1564 if (rate_bits[i].hda_fmt == rate) {
1560 if (val & (1 << i)) 1565 if (val & (1 << i))
1561 break; 1566 break;
1562 return 0; 1567 return 0;
1563 } 1568 }
1564 if (! rate_bits[i].hz) 1569 if (i >= AC_PAR_PCM_RATE_BITS)
1565 return 0; 1570 return 0;
1566 1571
1567 stream = snd_hda_param_read(codec, nid, AC_PAR_STREAM); 1572 stream = snd_hda_param_read(codec, nid, AC_PAR_STREAM);