/*
* alc5632.c -- ALC5632 ALSA SoC Audio Codec
*
* Copyright (C) 2011 The AC100 Kernel Team <ac100@lists.lauchpad.net>
*
* Authors: Leon Romanovsky <leon@leon.nu>
* Andrey Danin <danindrey@mail.ru>
* Ilya Petrov <ilya.muromec@gmail.com>
* Marc Dietrich <marvin24@gmx.de>
*
* Based on alc5623.c by Arnaud Patard
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/pm.h>
#include <linux/i2c.h>
#include <linux/slab.h>
#include <linux/regmap.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/tlv.h>
#include <sound/soc.h>
#include <sound/initval.h>
#include "alc5632.h"
/*
* ALC5632 register cache
*/
static struct reg_default alc5632_reg_defaults[] = {
{ 0, 0x59B4 },
{ 1, 0x0000 },
{ 2, 0x8080 },
{ 3, 0x0000 },
{ 4, 0x8080 },
{ 5, 0x0000 },
{ 6, 0x8080 },
{ 7, 0x0000 },
{ 8, 0xC800 },
{ 9, 0x0000 },
{ 10, 0xE808 },
{ 11, 0x0000 },
{ 12, 0x1010 },
{ 13, 0x0000 },
{ 14, 0x0808 },
{ 15, 0x0000 },
{ 16, 0xEE0F },
{ 17, 0x0000 },
{ 18, 0xCBCB },
{ 19, 0x0000 },
{ 20, 0x7F7F },
{ 21, 0x0000 },
{ 22, 0x0000 },
{ 23, 0x0000 },
{ 24, 0xE010 },
{ 25, 0x0000 },
{ 26, 0x0000 },
{ 27, 0x0000 },
{ 28, 0x8008 },
{ 29, 0x0000 },
{ 30, 0x0000 },
{ 31, 0x0000 },
{ 32, 0x0000 },
{ 33, 0x0000 },
{ 34, 0x0000 },
{ 35, 0x0000 },
{ 36, 0x00C0 },
{ 37, 0x0000 },
{ 38, 0xEF00 },
{ 39, 0x0000 },
{ 40, 0x0000 },
{ 41, 0x0000 },
{ 42, 0x0000 },
{ 43, 0x0000 },
{ 44, 0x0000 },
{ 45, 0x0000 },
{ 46, 0x0000 },
{ 47, 0x0000 },
{ 48, 0x0000 },
{ 49, 0x0000 },
{ 50, 0x0000 },
{ 51,