Skip to contentSkip to conversation

hda-intel, correct a bug in detection of rate supported

PATCH Applied Nicolas GRAZIANO 3 participants 3 messages Aug 19, 2005 – Aug 22, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hda-intel, correct a bug in detection of rate supported

The insertion of the rate 9600 make a shift in detection of supported rate, put this rate at the end of the list.

Index: pci/hda/hda_codec.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/hda_codec.c,v retrieving revision 1.23

hda/hda_codec.c 19 Aug 2005 19:43:51 -0000 renamed from hda/hda_codec.c 11 Aug 2005 10:00:16 -0000 1.23 +5 -1
diff -u -r1.23 hda_codec.c
@@ -1165,8 +1165,9 @@
  */
 static unsigned int rate_bits[][3] = {
        /* rate in Hz, ALSA rate bitmask, HDA format value */
+
+       /* autodetected value used in snd_hda_query_supported_pcm */
        { 8000, SNDRV_PCM_RATE_8000, 0x0500 }, /* 1/6 x 48 */
-       { 9600, SNDRV_PCM_RATE_KNOT, 0x0400 }, /* 1/5 x 48 */
        { 11025, SNDRV_PCM_RATE_11025, 0x4300 }, /* 1/4 x 44 */
        { 16000, SNDRV_PCM_RATE_16000, 0x0200 }, /* 1/3 x 48 */
        { 22050, SNDRV_PCM_RATE_22050, 0x4100 }, /* 1/2 x 44 */
@@ -1177,6 +1178,9 @@
        { 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 */
+
+       /* not autodetected value */
+       { 9600, SNDRV_PCM_RATE_KNOT, 0x0400 }, /* 1/5 x 48 */
        { 0 }
 };
 

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

#1 lore raw
Quoted 2 lines · Nicolas GRAZIANO

The insertion of the rate 9600 make a shift in detection of supported rate, put this rate at the end of the list.

Good point. Thanks for fixing.

Sasha.

Quoted 36 lines

Index: pci/hda/hda_codec.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/hda/hda_codec.c,v retrieving revision 1.23
diff -u -r1.23 hda_codec.c

hda/hda_codec.c 19 Aug 2005 19:43:51 -0000 renamed from hda/hda_codec.c 11 Aug 2005 10:00:16 -0000 1.23 +5 -2
@@ -1165,8 +1165,9 @@
  */
 static unsigned int rate_bits[][3] = {
        /* rate in Hz, ALSA rate bitmask, HDA format value */
+
+       /* autodetected value used in snd_hda_query_supported_pcm */
        { 8000, SNDRV_PCM_RATE_8000, 0x0500 }, /* 1/6 x 48 */
-       { 9600, SNDRV_PCM_RATE_KNOT, 0x0400 }, /* 1/5 x 48 */
        { 11025, SNDRV_PCM_RATE_11025, 0x4300 }, /* 1/4 x 44 */
        { 16000, SNDRV_PCM_RATE_16000, 0x0200 }, /* 1/3 x 48 */
        { 22050, SNDRV_PCM_RATE_22050, 0x4100 }, /* 1/2 x 44 */
@@ -1177,6 +1178,9 @@
        { 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 */
+
+       /* not autodetected value */
+       { 9600, SNDRV_PCM_RATE_KNOT, 0x0400 }, /* 1/5 x 48 */
        { 0 }
 };
 
 
 
 
-------------------------------------------------------
Quoted 8 lines

SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Applied
#2 lore raw
In reply to Nicolas GRAZIANO

At Fri, 19 Aug 2005 21:59:58 +0200,

Quoted 5 lines · Nicolas GRAZIANO

The insertion of the rate 9600 make a shift in detection of supported rate, put this rate at the end of the list.

Applied to CVS. Thanks.

BTW, the patch was broken because of tab/space replacement by your mailer. Please use attachments at the next time in such a case.

Takashi

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf