Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a961f9fe8c6b0f3138a97582e1ddf05c4560593b
Commit:     a961f9fe8c6b0f3138a97582e1ddf05c4560593b
Parent:     bc9f98a9815c452a74e5eb9cbd2ed61b337fdcd2
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Thu Apr 12 13:08:09 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Fri May 11 16:55:58 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/hda/hda_codec.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 2c2fcdc..59dcd97 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[] = {
        { 96000, SNDRV_PCM_RATE_96000, 0x0800 }, /* 2 x 48 */
        { 176400, SNDRV_PCM_RATE_176400, 0x5800 },/* 4 x 44 */
        { 192000, SNDRV_PCM_RATE_192000, 0x1800 }, /* 4 x 48 */
+#define AC_PAR_PCM_RATE_BITS   11
+       /* up to bits 10, 384kHZ isn't supported properly */
+
+       /* not autodetected value */
+       { 9600, SNDRV_PCM_RATE_KNOT, 0x0400 }, /* 1/5 x 48 */
 
        { 0 } /* terminator */
 };
@@ -1461,7 +1466,7 @@ int snd_hda_query_supported_pcm(struct hda_codec *codec, 
hda_nid_t nid,
 
        if (ratesp) {
                u32 rates = 0;
-               for (i = 0; rate_bits[i].hz; i++) {
+               for (i = 0; i < AC_PAR_PCM_RATE_BITS; i++) {
                        if (val & (1 << i))
                                rates |= rate_bits[i].alsa_bits;
                }
@@ -1555,13 +1560,13 @@ int snd_hda_is_supported_format(struct hda_codec 
*codec, hda_nid_t nid,
        }
 
        rate = format & 0xff00;
-       for (i = 0; rate_bits[i].hz; i++)
+       for (i = 0; i < AC_PAR_PCM_RATE_BITS; i++)
                if (rate_bits[i].hda_fmt == rate) {
                        if (val & (1 << i))
                                break;
                        return 0;
                }
-       if (! rate_bits[i].hz)
+       if (i >= AC_PAR_PCM_RATE_BITS)
                return 0;
 
        stream = snd_hda_param_read(codec, nid, AC_PAR_STREAM);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to