MCPcopy Create free account
hub / github.com/F-Stack/f-stack / a10hdmi_detect_hdmi

Function a10hdmi_detect_hdmi

freebsd/arm/allwinner/a10_hdmi.c:453–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453static void
454a10hdmi_detect_hdmi(struct a10hdmi_softc *sc, int *phdmi, int *paudio)
455{
456 struct edid_info ei;
457 uint8_t edid[EDID_LENGTH];
458 int block;
459
460 *phdmi = *paudio = 0;
461
462 if (edid_parse(sc->edid, &ei) != 0)
463 return;
464
465 /* Scan through extension blocks, looking for a CEA-861 block. */
466 for (block = 1; block <= ei.edid_ext_block_count; block++) {
467 if (a10hdmi_ddc_read(sc, block, edid) != 0)
468 return;
469
470 if (a10hdmi_detect_hdmi_vsdb(edid) != 0) {
471 *phdmi = 1;
472 *paudio = ((edid[CEA_DTD] & DTD_BASIC_AUDIO) != 0);
473 return;
474 }
475 }
476}
477
478static int
479a10hdmi_get_edid(device_t dev, uint8_t **edid, uint32_t *edid_len)

Callers 1

a10hdmi_get_edidFunction · 0.85

Calls 2

a10hdmi_ddc_readFunction · 0.85
a10hdmi_detect_hdmi_vsdbFunction · 0.85

Tested by

no test coverage detected