2014-12-12 05:16:27 +00:00
|
|
|
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 and
|
|
|
|
* only version 2 as published by the Free Software Foundation
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _WSA881X_H
|
|
|
|
#define _WSA881X_H
|
|
|
|
|
|
|
|
#include <linux/regmap.h>
|
|
|
|
#include <sound/soc.h>
|
2015-06-29 07:30:56 +00:00
|
|
|
#include <sound/info.h>
|
2014-12-12 05:16:27 +00:00
|
|
|
#include "wsa881x-registers.h"
|
|
|
|
|
|
|
|
#define WSA881X_MAX_SWR_PORTS 4
|
|
|
|
|
2015-07-31 23:46:19 +00:00
|
|
|
enum {
|
|
|
|
WSA881X_1_X = 0,
|
|
|
|
WSA881X_2_0,
|
|
|
|
};
|
|
|
|
|
|
|
|
#define WSA881X_IS_2_0(ver) \
|
|
|
|
((ver == WSA881X_2_0) ? 1 : 0)
|
|
|
|
|
2014-12-12 05:16:27 +00:00
|
|
|
extern int wsa881x_set_channel_map(struct snd_soc_codec *codec, u8 *port,
|
|
|
|
u8 num_port, unsigned int *ch_mask,
|
|
|
|
unsigned int *ch_rate);
|
|
|
|
|
|
|
|
extern const u8 wsa881x_reg_readable[WSA881X_CACHE_SIZE];
|
|
|
|
extern struct regmap_config wsa881x_regmap_config;
|
2015-06-29 07:30:56 +00:00
|
|
|
extern int wsa881x_codec_info_create_codec_entry(
|
|
|
|
struct snd_info_entry *codec_root,
|
|
|
|
struct snd_soc_codec *codec);
|
2015-07-31 23:46:19 +00:00
|
|
|
void wsa881x_regmap_defaults(struct regmap *regmap, u8 version);
|
|
|
|
|
2014-12-12 05:16:27 +00:00
|
|
|
#endif /* _WSA881X_H */
|