blob: e127919cb36b3334aac843abb7cd4391b092ed74 [file] [log] [blame]
Oder Chioubc08f962015-06-12 17:06:29 +08001/*
2 * rl6347a.h - RL6347A class device shared support
3 *
4 * Copyright 2015 Realtek Semiconductor Corp.
5 *
6 * Author: Oder Chiou <oder_chiou@realtek.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12#ifndef __RL6347A_H__
13#define __RL6347A_H__
14
Axel Lin0f7e1772015-09-24 23:34:01 +080015#include <sound/hda_verbs.h>
16
Oder Chioubc08f962015-06-12 17:06:29 +080017#define VERB_CMD(V, N, D) ((N << 20) | (V << 8) | D)
18
19#define RL6347A_VENDOR_REGISTERS 0x20
20
21#define RL6347A_COEF_INDEX\
22 VERB_CMD(AC_VERB_SET_COEF_INDEX, RL6347A_VENDOR_REGISTERS, 0)
23#define RL6347A_PROC_COEF\
24 VERB_CMD(AC_VERB_SET_PROC_COEF, RL6347A_VENDOR_REGISTERS, 0)
25
26struct rl6347a_priv {
27 struct reg_default *index_cache;
28 int index_cache_size;
29};
30
31int rl6347a_hw_write(void *context, unsigned int reg, unsigned int value);
32int rl6347a_hw_read(void *context, unsigned int reg, unsigned int *value);
33
34#endif /* __RL6347A_H__ */