diff options
-rw-r--r-- | Documentation/sound/alsa/HD-Audio.txt | 5 | ||||
-rw-r--r-- | sound/pci/hda/hda_hwdep.c | 6 |
2 files changed, 7 insertions, 4 deletions
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt index 850b1b3956ae..caa3ec655eac 100644 --- a/Documentation/sound/alsa/HD-Audio.txt +++ b/Documentation/sound/alsa/HD-Audio.txt | |||
@@ -447,7 +447,10 @@ The file needs to have a line `[codec]`. The next line should contain | |||
447 | three numbers indicating the codec vendor-id (0x12345678 in the | 447 | three numbers indicating the codec vendor-id (0x12345678 in the |
448 | example), the codec subsystem-id (0xabcd1234) and the address (2) of | 448 | example), the codec subsystem-id (0xabcd1234) and the address (2) of |
449 | the codec. The rest patch entries are applied to this specified codec | 449 | the codec. The rest patch entries are applied to this specified codec |
450 | until another codec entry is given. | 450 | until another codec entry is given. Passing 0 or a negative number to |
451 | the first or the second value will make the check of the corresponding | ||
452 | field be skipped. It'll be useful for really broken devices that don't | ||
453 | initialize SSID properly. | ||
451 | 454 | ||
452 | The `[model]` line allows to change the model name of the each codec. | 455 | The `[model]` line allows to change the model name of the each codec. |
453 | In the example above, it will be changed to model=auto. | 456 | In the example above, it will be changed to model=auto. |
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index bf3ced51e0f8..72e5885007cc 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c | |||
@@ -643,14 +643,14 @@ static inline int strmatch(const char *a, const char *b) | |||
643 | static void parse_codec_mode(char *buf, struct hda_bus *bus, | 643 | static void parse_codec_mode(char *buf, struct hda_bus *bus, |
644 | struct hda_codec **codecp) | 644 | struct hda_codec **codecp) |
645 | { | 645 | { |
646 | unsigned int vendorid, subid, caddr; | 646 | int vendorid, subid, caddr; |
647 | struct hda_codec *codec; | 647 | struct hda_codec *codec; |
648 | 648 | ||
649 | *codecp = NULL; | 649 | *codecp = NULL; |
650 | if (sscanf(buf, "%i %i %i", &vendorid, &subid, &caddr) == 3) { | 650 | if (sscanf(buf, "%i %i %i", &vendorid, &subid, &caddr) == 3) { |
651 | list_for_each_entry(codec, &bus->codec_list, list) { | 651 | list_for_each_entry(codec, &bus->codec_list, list) { |
652 | if (codec->vendor_id == vendorid && | 652 | if ((vendorid <= 0 || codec->vendor_id == vendorid) && |
653 | codec->subsystem_id == subid && | 653 | (subid <= 0 || codec->subsystem_id == subid) && |
654 | codec->addr == caddr) { | 654 | codec->addr == caddr) { |
655 | *codecp = codec; | 655 | *codecp = codec; |
656 | break; | 656 | break; |