|
@@ -643,14 +643,14 @@ static inline int strmatch(const char *a, const char *b)
|
|
|
static void parse_codec_mode(char *buf, struct hda_bus *bus,
|
|
|
struct hda_codec **codecp)
|
|
|
{
|
|
|
- unsigned int vendorid, subid, caddr;
|
|
|
+ int vendorid, subid, caddr;
|
|
|
struct hda_codec *codec;
|
|
|
|
|
|
*codecp = NULL;
|
|
|
if (sscanf(buf, "%i %i %i", &vendorid, &subid, &caddr) == 3) {
|
|
|
list_for_each_entry(codec, &bus->codec_list, list) {
|
|
|
- if (codec->vendor_id == vendorid &&
|
|
|
- codec->subsystem_id == subid &&
|
|
|
+ if ((vendorid <= 0 || codec->vendor_id == vendorid) &&
|
|
|
+ (subid <= 0 || codec->subsystem_id == subid) &&
|
|
|
codec->addr == caddr) {
|
|
|
*codecp = codec;
|
|
|
break;
|