• Home
  • Raw
  • Download

Lines Matching refs:buf

135 #define GRAB_BITS(buf, byte, lowbit, bits) 		\  argument
141 (buf[byte] >> (lowbit)) & ((1 << (bits)) - 1); \
146 const unsigned char *buf) in hdmi_update_short_audio_desc() argument
151 val = GRAB_BITS(buf, 1, 0, 7); in hdmi_update_short_audio_desc()
157 a->channels = GRAB_BITS(buf, 0, 0, 3); in hdmi_update_short_audio_desc()
163 a->format = GRAB_BITS(buf, 0, 3, 4); in hdmi_update_short_audio_desc()
170 val = GRAB_BITS(buf, 2, 0, 3); in hdmi_update_short_audio_desc()
183 a->max_bitrate = GRAB_BITS(buf, 2, 0, 8); in hdmi_update_short_audio_desc()
203 a->profile = GRAB_BITS(buf, 2, 0, 3); in hdmi_update_short_audio_desc()
207 a->format = GRAB_BITS(buf, 2, 3, 5); in hdmi_update_short_audio_desc()
225 const unsigned char *buf, int size) in snd_hdmi_parse_eld() argument
231 e->eld_ver = GRAB_BITS(buf, 0, 3, 5); in snd_hdmi_parse_eld()
238 e->baseline_len = GRAB_BITS(buf, 2, 0, 8); in snd_hdmi_parse_eld()
239 mnl = GRAB_BITS(buf, 4, 0, 5); in snd_hdmi_parse_eld()
240 e->cea_edid_ver = GRAB_BITS(buf, 4, 5, 3); in snd_hdmi_parse_eld()
242 e->support_hdcp = GRAB_BITS(buf, 5, 0, 1); in snd_hdmi_parse_eld()
243 e->support_ai = GRAB_BITS(buf, 5, 1, 1); in snd_hdmi_parse_eld()
244 e->conn_type = GRAB_BITS(buf, 5, 2, 2); in snd_hdmi_parse_eld()
245 e->sad_count = GRAB_BITS(buf, 5, 4, 4); in snd_hdmi_parse_eld()
247 e->aud_synch_delay = GRAB_BITS(buf, 6, 0, 8) * 2; in snd_hdmi_parse_eld()
248 e->spk_alloc = GRAB_BITS(buf, 7, 0, 7); in snd_hdmi_parse_eld()
250 e->port_id = get_unaligned_le64(buf + 8); in snd_hdmi_parse_eld()
253 e->manufacture_id = get_unaligned_le16(buf + 16); in snd_hdmi_parse_eld()
254 e->product_id = get_unaligned_le16(buf + 18); in snd_hdmi_parse_eld()
263 strlcpy(e->monitor_name, buf + ELD_FIXED_BYTES, mnl + 1); in snd_hdmi_parse_eld()
271 buf + ELD_FIXED_BYTES + mnl + 3 * i); in snd_hdmi_parse_eld()
295 unsigned char *buf, int *eld_size) in snd_hdmi_get_eld() argument
341 buf[i] = val; in snd_hdmi_get_eld()
353 static void hdmi_print_pcm_rates(int pcm, char *buf, int buflen) in hdmi_print_pcm_rates() argument
363 j += snprintf(buf + j, buflen - j, " %d", in hdmi_print_pcm_rates()
366 buf[j] = '\0'; /* necessary when j == 0 */ in hdmi_print_pcm_rates()
374 char buf[SND_PRINT_RATES_ADVISED_BUFSIZE]; in hdmi_show_short_audio_desc() local
380 hdmi_print_pcm_rates(a->rates, buf, sizeof(buf)); in hdmi_show_short_audio_desc()
393 a->channels, buf, buf2); in hdmi_show_short_audio_desc()
405 char buf[SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE]; in snd_hdmi_show_eld() local
406 snd_hdac_print_channel_allocation(e->spk_alloc, buf, sizeof(buf)); in snd_hdmi_show_eld()
407 codec_dbg(codec, "HDMI: available speakers:%s\n", buf); in snd_hdmi_show_eld()
419 char buf[SND_PRINT_RATES_ADVISED_BUFSIZE]; in hdmi_print_sad_info() local
425 hdmi_print_pcm_rates(a->rates, buf, sizeof(buf)); in hdmi_print_sad_info()
426 snd_iprintf(buffer, "sad%d_rates\t\t[0x%x]%s\n", i, a->rates, buf); in hdmi_print_sad_info()
429 snd_print_pcm_bits(a->sample_bits, buf, sizeof(buf)); in hdmi_print_sad_info()
431 i, a->sample_bits, buf); in hdmi_print_sad_info()
446 char buf[SND_PRINT_CHANNEL_ALLOCATION_ADVISED_BUFSIZE]; in snd_hdmi_print_eld_info() local
481 snd_hdac_print_channel_allocation(e->spk_alloc, buf, sizeof(buf)); in snd_hdmi_print_eld_info()
482 snd_iprintf(buffer, "speakers\t\t[0x%x]%s\n", e->spk_alloc, buf); in snd_hdmi_print_eld_info()
633 unsigned char *buf, int *eld_size, bool rev3_or_later) in snd_hdmi_get_eld_ati() argument
648 memset(buf, 0, ELD_FIXED_BYTES + ELD_MAX_MNL + ELD_MAX_SAD * 3); in snd_hdmi_get_eld_ati()
651 buf[0] = ELD_VER_CEA_861D << 3; in snd_hdmi_get_eld_ati()
654 buf[7] = spkalloc & ATI_SPKALLOC_SPKALLOC; in snd_hdmi_get_eld_ati()
658 buf[5] |= 0x04; in snd_hdmi_get_eld_ati()
667 put_unaligned_le32(sink_info, buf + 8); in snd_hdmi_get_eld_ati()
671 put_unaligned_le32(sink_info, buf + 12); in snd_hdmi_get_eld_ati()
675 put_unaligned_le16(sink_info, buf + 16); in snd_hdmi_get_eld_ati()
679 put_unaligned_le16(sink_info, buf + 18); in snd_hdmi_get_eld_ati()
690 buf[4] |= sink_desc_len; in snd_hdmi_get_eld_ati()
694 buf[pos++] = snd_hda_codec_read(codec, nid, 0, ATI_VERB_GET_SINK_INFO_DATA, 0); in snd_hdmi_get_eld_ati()
710 buf[pos++] = (ati_sad & 0x0000ff) >> 0; in snd_hdmi_get_eld_ati()
711 buf[pos++] = (ati_sad & 0x00ff00) >> 8; in snd_hdmi_get_eld_ati()
712 buf[pos++] = (ati_sad & 0xff0000) >> 16; in snd_hdmi_get_eld_ati()
719 buf[pos++] = ((ati_sad & 0x000000ff) & ~ATI_AUDIODESC_CHANNELS) | 0x1; in snd_hdmi_get_eld_ati()
721 buf[pos++] = (ati_sad & 0xff000000) >> 24; in snd_hdmi_get_eld_ati()
722 buf[pos++] = (ati_sad & 0x00ff0000) >> 16; in snd_hdmi_get_eld_ati()
751 buf[6] = video_latency_hdmi - audio_latency_hdmi; in snd_hdmi_get_eld_ati()
756 buf[5] |= ((pos - ELD_FIXED_BYTES - sink_desc_len) / 3) << 4; in snd_hdmi_get_eld_ati()
762 buf[2] = (pos - 4) / 4; in snd_hdmi_get_eld_ati()