__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright(c) 2023-2024 Intel Corporation
 *
 * Authors: Cezary Rojewski <[email protected]>
 *          Amadeusz Slawinski <[email protected]>
 */

#ifndef __ACPI_NHLT_H__
#define __ACPI_NHLT_H__

#include <linux/acpi.h>
#include <linux/kconfig.h>
#include <linux/overflow.h>
#include <linux/types.h>

#define __acpi_nhlt_endpoint_config(ep)		((void *)((ep) + 1))
#define __acpi_nhlt_config_caps(cfg)		((void *)((cfg) + 1))

/**
 * acpi_nhlt_endpoint_fmtscfg - Get the formats configuration space.
 * @ep:		the endpoint to retrieve the space for.
 *
 * Return: A pointer to the formats configuration space.
 */
static inline struct acpi_nhlt_formats_config *
acpi_nhlt_endpoint_fmtscfg(const struct acpi_nhlt_endpoint *ep)
{
	struct acpi_nhlt_config *cfg = __acpi_nhlt_endpoint_config(ep);

	return (struct acpi_nhlt_formats_config *)((u8 *)(cfg + 1) + cfg->capabilities_size);
}

#define __acpi_nhlt_first_endpoint(tb) \
	((void *)(tb + 1))

#define __acpi_nhlt_next_endpoint(ep) \
	((void *)((u8 *)(ep) + (ep)->length))

#define __acpi_nhlt_get_endpoint(tb, ep, i) \
	((i) ? __acpi_nhlt_next_endpoint(ep) : __acpi_nhlt_first_endpoint(tb))

#define __acpi_nhlt_first_fmtcfg(fmts) \
	((void *)(fmts + 1))

#define __acpi_nhlt_next_fmtcfg(fmt) \
	((void *)((u8 *)((fmt) + 1) + (fmt)->config.capabilities_size))

#define __acpi_nhlt_get_fmtcfg(fmts, fmt, i) \
	((i) ? __acpi_nhlt_next_fmtcfg(fmt) : __acpi_nhlt_first_fmtcfg(fmts))

/*
 * The for_each_nhlt_*() macros rely on an iterator to deal with the
 * variable length of each endpoint structure and the possible presence
 * of an OED-Config used by Windows only.
 */

/**
 * for_each_nhlt_endpoint - Iterate over endpoints in a NHLT table.
 * @tb:		the pointer to a NHLT table.
 * @ep:		the pointer to endpoint to use as loop cursor.
 */
#define for_each_nhlt_endpoint(tb, ep)					\
	for (unsigned int __i = 0;					\
	     __i < (tb)->endpoints_count &&				\
		(ep = __acpi_nhlt_get_endpoint(tb, ep, __i));		\
	     __i++)

/**
 * for_each_nhlt_fmtcfg - Iterate over format configurations.
 * @fmts:	the pointer to formats configuration space.
 * @fmt:	the pointer to format to use as loop cursor.
 */
#define for_each_nhlt_fmtcfg(fmts, fmt)					\
	for (unsigned int __i = 0;					\
	     __i < (fmts)->formats_count &&				\
		(fmt = __acpi_nhlt_get_fmtcfg(fmts, fmt, __i));	\
	     __i++)

/**
 * for_each_nhlt_endpoint_fmtcfg - Iterate over format configurations in an endpoint.
 * @ep:		the pointer to an endpoint.
 * @fmt:	the pointer to format to use as loop cursor.
 */
#define for_each_nhlt_endpoint_fmtcfg(ep, fmt) \
	for_each_nhlt_fmtcfg(acpi_nhlt_endpoint_fmtscfg(ep), fmt)

#if IS_ENABLED(CONFIG_ACPI_NHLT)

/*
 * System-wide pointer to the first NHLT table.
 *
 * A sound driver may utilize acpi_nhlt_get/put_gbl_table() on its
 * initialization and removal respectively to avoid excessive mapping
 * and unmapping of the memory occupied by the table between streaming
 * operations.
 */

acpi_status acpi_nhlt_get_gbl_table(void);
void acpi_nhlt_put_gbl_table(void);

bool acpi_nhlt_endpoint_match(const struct acpi_nhlt_endpoint *ep,
			      int link_type, int dev_type, int dir, int bus_id);
struct acpi_nhlt_endpoint *
acpi_nhlt_tb_find_endpoint(const struct acpi_table_nhlt *tb,
			   int link_type, int dev_type, int dir, int bus_id);
struct acpi_nhlt_endpoint *
acpi_nhlt_find_endpoint(int link_type, int dev_type, int dir, int bus_id);
struct acpi_nhlt_format_config *
acpi_nhlt_endpoint_find_fmtcfg(const struct acpi_nhlt_endpoint *ep,
			       u16 ch, u32 rate, u16 vbps, u16 bps);
struct acpi_nhlt_format_config *
acpi_nhlt_tb_find_fmtcfg(const struct acpi_table_nhlt *tb,
			 int link_type, int dev_type, int dir, int bus_id,
			 u16 ch, u32 rate, u16 vpbs, u16 bps);
struct acpi_nhlt_format_config *
acpi_nhlt_find_fmtcfg(int link_type, int dev_type, int dir, int bus_id,
		      u16 ch, u32 rate, u16 vpbs, u16 bps);
int acpi_nhlt_endpoint_mic_count(const struct acpi_nhlt_endpoint *ep);

#else /* !CONFIG_ACPI_NHLT */

static inline acpi_status acpi_nhlt_get_gbl_table(void)
{
	return AE_NOT_FOUND;
}

static inline void acpi_nhlt_put_gbl_table(void)
{
}

static inline bool
acpi_nhlt_endpoint_match(const struct acpi_nhlt_endpoint *ep,
			 int link_type, int dev_type, int dir, int bus_id)
{
	return false;
}

static inline struct acpi_nhlt_endpoint *
acpi_nhlt_tb_find_endpoint(const struct acpi_table_nhlt *tb,
			   int link_type, int dev_type, int dir, int bus_id)
{
	return NULL;
}

static inline struct acpi_nhlt_format_config *
acpi_nhlt_endpoint_find_fmtcfg(const struct acpi_nhlt_endpoint *ep,
			       u16 ch, u32 rate, u16 vbps, u16 bps)
{
	return NULL;
}

static inline struct acpi_nhlt_format_config *
acpi_nhlt_tb_find_fmtcfg(const struct acpi_table_nhlt *tb,
			 int link_type, int dev_type, int dir, int bus_id,
			 u16 ch, u32 rate, u16 vpbs, u16 bps)
{
	return NULL;
}

static inline int acpi_nhlt_endpoint_mic_count(const struct acpi_nhlt_endpoint *ep)
{
	return 0;
}

static inline struct acpi_nhlt_endpoint *
acpi_nhlt_find_endpoint(int link_type, int dev_type, int dir, int bus_id)
{
	return NULL;
}

static inline struct acpi_nhlt_format_config *
acpi_nhlt_find_fmtcfg(int link_type, int dev_type, int dir, int bus_id,
		      u16 ch, u32 rate, u16 vpbs, u16 bps)
{
	return NULL;
}

#endif /* CONFIG_ACPI_NHLT */

#endif /* __ACPI_NHLT_H__ */

Filemanager

Name Type Size Permission Actions
platform Folder 0755
acbuffer.h File 8.92 KB 0644
acconfig.h File 7.4 KB 0644
acexcep.h File 16.94 KB 0644
acnames.h File 2.22 KB 0644
acoutput.h File 16.67 KB 0644
acpi.h File 1.33 KB 0644
acpi_bus.h File 29.52 KB 0644
acpi_drivers.h File 2.65 KB 0644
acpi_io.h File 723 B 0644
acpi_lpat.h File 1.16 KB 0644
acpi_numa.h File 1.03 KB 0644
acpiosxf.h File 11.35 KB 0644
acpixf.h File 31.27 KB 0644
acrestyp.h File 19.5 KB 0644
actbl.h File 18.41 KB 0644
actbl1.h File 48.34 KB 0644
actbl2.h File 80.7 KB 0644
actbl3.h File 22.61 KB 0644
actypes.h File 42.36 KB 0644
acuuid.h File 3.59 KB 0644
apei.h File 1.4 KB 0644
battery.h File 768 B 0644
button.h File 401 B 0644
cppc_acpi.h File 6.21 KB 0644
ghes.h File 3.56 KB 0644
hed.h File 370 B 0644
nfit.h File 351 B 0644
nhlt.h File 5.3 KB 0644
pcc.h File 1.44 KB 0644
proc_cap_intel.h File 1.35 KB 0644
processor.h File 12.04 KB 0644
reboot.h File 201 B 0644
video.h File 3.74 KB 0644
Filemanager