Skip to contentSkip to conversation

snd-ac97-codec: Use complete ID when the codec is not known

PATCH RESEND In review Ondrej Zary 2 participants 3 messages Sep 27, 2013 – Sep 30, 2013 Sound

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 2/2 snd-ac97-codec: Use complete ID when the codec is not known

Currently, if the codec ID is not known, the last byte of the ID is used as name. It's not helpful at all, use full codec ID instead.

---
 sound/pci/ac97/ac97_codec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/pci/ac97/ac97_codec.c +1 -1
index bf578ba2..30a40a8 100644
@@ -1830,7 +1830,7 @@ void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int m
 				pid->patch(ac97);
 		}
 	} else
-		sprintf(name + strlen(name), " id %x", id & 0xff);
+		sprintf(name + strlen(name), " id %x", id);
 }
 
 /**
Signature · 1 line
Ondrej Zary
#1 lore raw

At Fri, 27 Sep 2013 20:28:03 +0200,

Quoted 3 lines · Ondrej Zary

Currently, if the codec ID is not known, the last byte of the ID is used as name. It's not helpful at all, use full codec ID instead.

The full bytes are already shown at the beginning, no?
It's masked because the upper three bytes are shown in printable form, and the last byte is usually a model number.

Takashi

Quoted 26 lines
---
 sound/pci/ac97/ac97_codec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/pci/ac97/ac97_codec.c +1 -1
index bf578ba2..30a40a8 100644
@@ -1830,7 +1830,7 @@ void snd_ac97_get_name(struct snd_ac97 *ac97, unsigned int id, char *name, int m
 				pid->patch(ac97);
 		}
 	} else
-		sprintf(name + strlen(name), " id %x", id & 0xff);
+		sprintf(name + strlen(name), " id %x", id);
 }
 
 /**
Signature · 5 lines
Ondrej Zary
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#2 lore raw
Quoted 9 lines · On Monday 30 September 2013 11:08:50 Takashi Iwai wrote:

At Fri, 27 Sep 2013 20:28:03 +0200,

Quoted 2 lines · Ondrej Zary

Currently, if the codec ID is not known, the last byte of the ID is used as name. It's not helpful at all, use full codec ID instead.

The full bytes are already shown at the beginning, no?
It's masked because the upper three bytes are shown in printable form, and the last byte is usually a model number.

Thanks, I see now. So this patch is not needed.

Quoted 32 lines

Takashi

Quoted 19 lines
---
 sound/pci/ac97/ac97_codec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
sound/pci/ac97/ac97_codec.c +1 -2
index bf578ba2..30a40a8 100644
@@ -1830,7 +1830,7 @@ void snd_ac97_get_name(struct snd_ac97 *ac97,
 unsigned int id, char *name, int m pid->patch(ac97);
 		}
 	} else
-		sprintf(name + strlen(name), " id %x", id & 0xff);
+		sprintf(name + strlen(name), " id %x", id);
 }
 
 /**
--
Quoted 5 lines

Ondrej Zary
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Signature · 1 line
Ondrej Zary