Files
kernel_common_drivers/include/linux/amlogic/aml_tuner.h
T
chuangcheng.peng 42d20d6224 demux: remove dvb-core to common_drivers [1/2]
PD#SWPL-208124

Problem:
remove dvb-core to common_drivers

Solution:
remove dvb-core to common_drivers

Verify:
verified at adt4

Change-Id: I04343953f26eaf614d3009e1079c9daeb345a6ee
Signed-off-by: chuangcheng.peng <chuangcheng.peng@amlogic.com>
2025-04-07 02:05:15 -08:00

79 lines
2.2 KiB
C

/* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
/*
* Copyright (c) 2019 Amlogic, Inc. All rights reserved.
*/
#ifndef __AML_TUNER_H__
#define __AML_TUNER_H__
#include <linux/amlogic/aml_demod_common.h>
#include <linux/amlogic/media/dvb-core/dvb_frontend.h>
struct tuner_module {
char *name;
u8 id;
u8 delsys[AML_MAX_DELSYS]; /* Delivery system supported by tuner. */
u8 type[AML_MAX_FE]; /* FE type supported by tuner. */
void *attach_symbol; /* The actual attach function symbolic address. */
struct dvb_frontend *(*attach)(const struct tuner_module *module,
struct dvb_frontend *fe, const struct tuner_config *cfg);
int (*detach)(const struct tuner_module *module);
int (*match)(const struct tuner_module *module, int std);
int (*detect)(const struct tuner_config *cfg);
};
typedef struct dvb_frontend *(*tn_attach_cb)(struct dvb_frontend *fe,
const struct tuner_config *cfg);
#if (defined CONFIG_AMLOGIC_DVB_EXTERN ||\
defined CONFIG_AMLOGIC_DVB_EXTERN_MODULE)
enum tuner_type aml_get_tuner_type(const char *name);
int aml_get_dts_tuner_config(struct device_node *node,
struct tuner_config *cfg, int index);
void aml_show_tuner_config(const char *title, const struct tuner_config *cfg);
const struct tuner_module *aml_get_tuner_module(enum tuner_type type);
int tuner_attach_register_cb(const enum tuner_type type, tn_attach_cb funcb);
void aml_set_tuner_attach_cb(const enum tuner_type type, tn_attach_cb funcb);
#else
static inline __maybe_unused enum tuner_type aml_get_tuner_type(
const char *name)
{
return AM_TUNER_NONE;
}
static inline __maybe_unused int aml_get_dts_tuner_config(
struct device_node *node, struct tuner_config *cfg, int index)
{
return -ENODEV;
}
static inline __maybe_unused void aml_show_tuner_config(const char *title,
const struct tuner_config *cfg)
{
}
static inline __maybe_unused int tuner_attach_register_cb(const enum tuner_type type,
tn_attach_cb funcb)
{
return -ENODEV;
}
static inline __maybe_unused void aml_set_tuner_attach_cb(const enum tuner_type type,
tn_attach_cb funcb)
{
}
static inline __maybe_unused const struct tuner_module *aml_get_tuner_module(
enum tuner_type type)
{
return NULL;
}
#endif
#endif /* __AML_TUNER_H__ */