• Home
  • Raw
  • Download

Lines Matching refs:buf

32 				  char *buf)  in power_on_acct_show()  argument
36 return sprintf(buf, "%u\n", jiffies_to_msecs(codec->power_on_acct)); in power_on_acct_show()
41 char *buf) in power_off_acct_show() argument
45 return sprintf(buf, "%u\n", jiffies_to_msecs(codec->power_off_acct)); in power_off_acct_show()
55 char *buf) \
58 return sprintf(buf, "0x%x\n", codec->field); \
64 char *buf) \
67 return sprintf(buf, "%s\n", \
82 char *buf) in pin_configs_show() argument
88 len += sprintf(buf + len, "0x%02x 0x%08x\n", in pin_configs_show()
97 char *buf) in init_pin_configs_show() argument
100 return pin_configs_show(codec, &codec->init_pins, buf); in init_pin_configs_show()
105 char *buf) in driver_pin_configs_show() argument
108 return pin_configs_show(codec, &codec->driver_pins, buf); in driver_pin_configs_show()
169 const char *buf, size_t count) \
173 int err = kstrtoul(buf, 0, &val); \
183 const char *buf, size_t count) \
186 char *s = kstrndup_noeol(buf, 64); \
204 const char *buf, size_t count) \
208 if (*buf) \
218 char *buf) in init_verbs_show() argument
225 len += snprintf(buf + len, PAGE_SIZE - len, in init_verbs_show()
233 static int parse_init_verbs(struct hda_codec *codec, const char *buf) in parse_init_verbs() argument
238 if (sscanf(buf, "%i %i %i", &nid, &verb, &param) != 3) in parse_init_verbs()
257 const char *buf, size_t count) in init_verbs_store() argument
260 int err = parse_init_verbs(codec, buf); in init_verbs_store()
268 char *buf) in hints_show() argument
275 len += snprintf(buf + len, PAGE_SIZE - len, in hints_show()
309 static int parse_hints(struct hda_codec *codec, const char *buf) in parse_hints() argument
315 buf = skip_spaces(buf); in parse_hints()
316 if (!*buf || *buf == '#' || *buf == '\n') in parse_hints()
318 if (*buf == '=') in parse_hints()
320 key = kstrndup_noeol(buf, 1024); in parse_hints()
362 const char *buf, size_t count) in hints_store() argument
365 int err = parse_hints(codec, buf); in hints_store()
373 char *buf) in user_pin_configs_show() argument
376 return pin_configs_show(codec, &codec->user_pins, buf); in user_pin_configs_show()
381 static int parse_user_pin_configs(struct hda_codec *codec, const char *buf) in parse_user_pin_configs() argument
385 if (sscanf(buf, "%i %i", &nid, &cfg) != 2) in parse_user_pin_configs()
397 const char *buf, size_t count) in user_pin_configs_store() argument
400 int err = parse_user_pin_configs(codec, buf); in user_pin_configs_store()
540 static void parse_codec_mode(char *buf, struct hda_bus *bus, in parse_codec_mode() argument
547 if (sscanf(buf, "%i %i %i", &vendorid, &subid, &caddr) == 3) { in parse_codec_mode()
563 static void parse_pincfg_mode(char *buf, struct hda_bus *bus, in parse_pincfg_mode() argument
566 parse_user_pin_configs(*codecp, buf); in parse_pincfg_mode()
569 static void parse_verb_mode(char *buf, struct hda_bus *bus, in parse_verb_mode() argument
572 parse_init_verbs(*codecp, buf); in parse_verb_mode()
575 static void parse_hint_mode(char *buf, struct hda_bus *bus, in parse_hint_mode() argument
578 parse_hints(*codecp, buf); in parse_hint_mode()
581 static void parse_model_mode(char *buf, struct hda_bus *bus, in parse_model_mode() argument
585 (*codecp)->modelname = kstrdup(buf, GFP_KERNEL); in parse_model_mode()
588 static void parse_chip_name_mode(char *buf, struct hda_bus *bus, in parse_chip_name_mode() argument
591 snd_hda_codec_set_name(*codecp, buf); in parse_chip_name_mode()
595 static void parse_##name##_mode(char *buf, struct hda_bus *bus, \
599 if (!kstrtoul(buf, 0, &val)) \
611 void (*parser)(char *buf, struct hda_bus *bus, struct hda_codec **retc);
657 static int parse_line_mode(char *buf, struct hda_bus *bus) in parse_line_mode() argument
663 if (strmatch(buf, patch_items[i].tag)) in parse_line_mode()
665 if (patch_items[i].alias && strmatch(buf, patch_items[i].alias)) in parse_line_mode()
677 static int get_line_from_fw(char *buf, int size, size_t *fw_size_p, in get_line_from_fw() argument
700 *buf++ = *p++; in get_line_from_fw()
702 *buf = 0; in get_line_from_fw()
705 remove_trail_spaces(buf); in get_line_from_fw()
717 char buf[128]; in snd_hda_load_patch() local
723 while (get_line_from_fw(buf, sizeof(buf) - 1, &fw_size, &fw_buf)) { in snd_hda_load_patch()
724 if (!*buf || *buf == '#' || *buf == '\n') in snd_hda_load_patch()
726 if (*buf == '[') in snd_hda_load_patch()
727 line_mode = parse_line_mode(buf, bus); in snd_hda_load_patch()
730 patch_items[line_mode].parser(buf, bus, &codec); in snd_hda_load_patch()