Title: [7719] trunk/sound/soc: task[5516]add firmware loading support
Revision
7719
Author
cliff
Date
2009-10-27 05:57:14 -0400 (Tue, 27 Oct 2009)

Log Message

task[5516]add firmware loading support

Modified Paths

Removed Paths

Diff

Modified: trunk/sound/soc/blackfin/bf5xx-adau1761.c (7718 => 7719)


--- trunk/sound/soc/blackfin/bf5xx-adau1761.c	2009-10-27 08:02:49 UTC (rev 7718)
+++ trunk/sound/soc/blackfin/bf5xx-adau1761.c	2009-10-27 09:57:14 UTC (rev 7719)
@@ -32,7 +32,6 @@
 	struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;
 	unsigned int pll_in = 0, pll_out = 0;
 	int ret = 0;
-	unsigned int bitsPerFrame = 0;
 
 	switch (params_rate(params)) {
 	case 11025:

Modified: trunk/sound/soc/codecs/adau1761.c (7718 => 7719)


--- trunk/sound/soc/codecs/adau1761.c	2009-10-27 08:02:49 UTC (rev 7718)
+++ trunk/sound/soc/codecs/adau1761.c	2009-10-27 09:57:14 UTC (rev 7719)
@@ -14,6 +14,8 @@
 #include <linux/i2c.h>
 #include <linux/workqueue.h>
 #include <linux/platform_device.h>
+#include <linux/sigma.h>
+#include <linux/sysfs.h>
 #include <sound/core.h>
 #include <sound/pcm.h>
 #include <sound/pcm_params.h>
@@ -22,10 +24,10 @@
 #include <sound/initval.h>
 
 #include "adau1761.h"
-#include "adau1761_fw.h"
 
 #define AUDIO_NAME "adau1761"
 #define ADAU1761_VERSION "0.20"
+#define ADAU1761_FIRMWARE "adau1761.bin"
 
 #define CAP_MIC  1
 #define CAP_LINE 2
@@ -569,44 +571,18 @@
 
 }
 
-static void adau1761_setprogram(struct snd_soc_codec *codec, int mode)
+static int adau1761_setprogram(struct snd_soc_codec *codec)
 {
-	int i = 0;
-	unsigned int address = 0;
+	int ret = 0;
 
-	/* Set dsp enable bit before programming */
-	if (0 < adau1761_mode_programs[mode].size) {
-		adau1761_write_reg_byte(codec, ADAU_DSP_ENA, 0x01);
-		adau1761_read_reg_byte(codec, ADAU_DSP_ENA);
+	adau1761_write_reg_byte(codec, ADAU_DSP_ENA, 0x01);
+	adau1761_read_reg_byte(codec, ADAU_DSP_ENA);
+	/* don't waste time writing program for adau1361 */
+	if (adau1761_read_reg_cache(codec, ADAU_DSP_ENA) != 0x01)
+		return -ENODEV;
+	ret = process_sigma_firmware(codec->control_data, ADAU1761_FIRMWARE);
 
-		/* don't waste time writing program for adau1361 */
-		if (0x01 != adau1761_read_reg_cache(codec, ADAU_DSP_ENA))
-			return;
-	}
-
-	/* Load Program - program memory is 5Bytes wide*/
-	if (0 < adau1761_mode_programs[mode].size) {
-		/* Write one address at a time */
-		address = ADAU_PROGRAM;
-		for (i = 0; i < adau1761_mode_programs[mode].size; i += 5) {
-			adau1761_write_reg_block(codec, address++, 5,
-				adau1761_mode_programs[mode].data+i);
-		}
-	}
-
-	/* Load Parameters */
-	if (0 < adau1761_mode_params[mode].size) {
-
-		/* Write one address at a time */
-		address = ADAU_PARAMS;
-		for (i = 0; i < adau1761_mode_params[mode].size; i += 4) {
-			adau1761_write_reg_block(codec, address++, 4,
-				adau1761_mode_params[mode].data+i);
-		}
-	}
-	/* Set dsp Run bit */
-	if (0 < adau1761_mode_programs[mode].size)
-		adau1761_write_reg_byte(codec, ADAU_DSP_RUN, 0x01);
+	return ret;
 }
 
 static int adau1761_reg_init(struct snd_soc_codec *codec)
@@ -631,9 +607,8 @@
 		regdata = registers[i];
 		adau1761_write_reg_byte(codec, regdata.regaddress, regdata.regvalue);
 	}
-
 	/* Load default program */
-	adau1761_setprogram(codec, mode);
+	adau1761_setprogram(codec);
 	adau1761_write_reg_byte(codec, ADAU_SPRTCT1, 0x00);
 	/* unmute outputs */
 	adau1761_write_reg_byte(codec, ADAU_PLBHPVL, DAPM_HP_DEF);
@@ -906,11 +881,7 @@
 	adau1761_pll_init(codec);
 	adau1761_pll_enable(codec, 1);
 	/* Load program */
-#ifdef ADAU1761_DIG_MIC
-	adau1761_setprogram(codec, 1);
-#else
-	adau1761_setprogram(codec, 0);
-#endif
+	adau1761_setprogram(codec);
 
 	/* sync reg_cache with the hardware */
 	for (i = ADAU_FIRSTREG; i <= ADAU_LASTREG; ++i) {
@@ -999,6 +970,22 @@
 	adau1761_codec = NULL;
 }
 
+static ssize_t adau1371_dsp_load(struct device *dev,
+				  struct device_attribute *attr,
+				  const char *buf, size_t count)
+{
+	struct snd_soc_device *socdev = dev_get_drvdata(dev);
+	struct snd_soc_codec *codec = socdev->card->codec;
+	int ret = 0;
+
+	ret = adau1761_setprogram(codec);
+	if (ret)
+		return ret;
+	else
+		return count;
+}
+static DEVICE_ATTR(dsp, 0644, NULL, adau1371_dsp_load);
+
 static int adau1761_probe(struct platform_device *pdev)
 {
 	struct snd_soc_device *socdev = platform_get_drvdata(pdev);
@@ -1021,6 +1008,10 @@
 	ret = adau1761_reg_init(codec);
 	if (ret < 0)
 		dev_err(codec->dev, "failed to initialize\n");
+
+	ret = device_create_file(codec->dev, &dev_attr_dsp);
+	if (ret)
+		dev_err(socdev->dev, "device_create_file() failed\n");
 	/* register pcms */
 	ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
 	if (ret < 0) {
@@ -1043,7 +1034,7 @@
 	snd_soc_free_pcms(socdev);
 	snd_soc_dapm_free(socdev);
 pcm_err:
-
+	device_remove_file(codec->dev, &dev_attr_dsp);
 	return ret;
 }
 

Modified: trunk/sound/soc/codecs/adau1761.h (7718 => 7719)


--- trunk/sound/soc/codecs/adau1761.h	2009-10-27 08:02:49 UTC (rev 7718)
+++ trunk/sound/soc/codecs/adau1761.h	2009-10-27 09:57:14 UTC (rev 7719)
@@ -10,6 +10,30 @@
 #ifndef __ADAU1761_H__
 #define __ADAU1761_H__
 
+struct adau1761_setup_data {
+	unsigned short i2c_bus;
+	unsigned short i2c_address;
+};
+
+struct adau1761_mode_register {
+	u16  regaddress;
+	u16  regvalue;
+};
+
+#define RESET_REGISTER_COUNT 54
+#define MODE_REGISTER_COUNT 10
+
+/* DSP program patch for ADAU1761 ADC IIS 16bit mode */
+#define ADAU1716_ADC_SOFT_PATCH 1
+#define MASTER_MODE 1
+#ifdef MASTER_MODE
+/* IIS mater mode*/
+#define ADAU_SRPT_CTRL0		0x01
+#else
+/* IIS slave mode*/
+#define ADAU_SRPT_CTRL0 	0x00
+#endif
+
 /* adau1761_set_dai_sysclk clk_id */
 #define ADAU1761_MCLK_ID	0
 #define ADAU1761_BCLK_ID	0x33
@@ -174,12 +198,122 @@
 #define ADAU1761_MUTE_BITS 0x1
 #define ADAU1761_ADVOL_MASK 0xff
 
+/*
+ * Reset Mode - ADC capture/DAC playback, dsp core disabled
+ * (AInput mixers 0db, AOuput mixers 0db, HP out ON, DSP core OFF)
+*/
+static struct adau1761_mode_register adau1761_reset[RESET_REGISTER_COUNT] = {
+	/* mute outputs */
+	{ADAU_PLBMNOC, 0xE5},
+	{ADAU_PLBHPVL, 0x01},
+	{ADAU_PLBHPVR, 0x01},
+	{ADAU_PLBLOVL, 0x00},
+	{ADAU_PLBLOVR, 0x00},
 
-struct adau1761_setup_data {
-	unsigned short i2c_bus;
-	unsigned short i2c_address;
+	{ADAU_DSP_RUN, 0x00},
+	{ADAU_DSP_ENA, 0x00},
+	{ADAU_MICCTRL, 0x00},
+	{ADAU_RECPWRM, 0x00},
+	{ADAU_RECMLC0, 0x01},
+	{ADAU_RECMLC1, RECMLC_MIC_0DB},
+	{ADAU_RECMRC0, 0x01},
+	{ADAU_RECMRC1, RECMLC_MIC_0DB},
+	{ADAU_RECVLCL, 0x82},
+	{ADAU_RECVLCR, 0x82},
+	{ADAU_RECMBIA, RECMBIA_DISABLE},
+	{ADAU_ALCCTR0, 0x00},
+	{ADAU_ALCCTR1, 0x00},
+	{ADAU_ALCCTR2, 0x00},
+	{ADAU_ALCCTR3, 0x1F},
+	{ADAU_SPRTCT0, ADAU_SRPT_CTRL0},
+	{ADAU_SPRTCT1, 0x21}, /*0x21 = 32bclocks frame, 0x41 = 48*/
+	{ADAU_CONVCT0, 0x00},
+	{ADAU_CONVCT1, 0x00},
+	{ADAU_ADCCTL0, 0x00},
+	{ADAU_ADCCTL1, 0x00},
+	{ADAU_ADCCTL2, 0x00},
+	{ADAU_PLBMLC0, 0x21},
+	{ADAU_PLBMLC1, 0x00},
+	{ADAU_PLBMRC0, 0x41},
+	{ADAU_PLBMRC1, 0x00},
+	{ADAU_PLBMLLO, 0x03},
+	{ADAU_PLBMRLO, 0x09},
+	{ADAU_PLBLRMC, 0x01},
+	{ADAU_PLBCTRL, 0x00},
+	{ADAU_PLBPWRM, 0x00},
+	{ADAU_DACCTL0, 0x03},
+	{ADAU_DACCTL1, 0x00},
+	{ADAU_DACCTL2, 0x00},
+	{ADAU_DSP_CRC, 0x00},
+	{ADAU_DSP_GPI, 0x00},
+	{ADAU_DSP_SR1, 0x07},
+	{ADAU_SERPAD0, 0xAA},
+	{ADAU_SERPAD1, 0x00},
+	{ADAU_COMPAD0, 0xAA},
+	{ADAU_COMPAD1, 0x00},
+	{ADAU_MCLKPAD, 0x0A},
+	{ADAU_INP_ROT, 0x01},
+#ifdef ADAU1716_ADC_SOFT_PATCH
+	{ADAU_OUT_ROT, 0x00},
+#else
+	{ADAU_OUT_ROT, 0x01},
+#endif
+	{ADAU_SER_SRT, 0x00},
+	{ADAU_DSP_SLW, 0x00},
+	{ADAU_SER_DAT, 0x00},
+	{ADAU_CLK_EN0, 0x5F},
+	{ADAU_CLK_EN1, 0x01},
 };
 
+/*
+ * Default Mode
+ * Analog microphones, ADC capture/DAC playback, dsp core disabled
+ * (AInput mixers ON, AOuput mixers ON, HP out ON)
+*/
+static struct adau1761_mode_register adau1761_mode0[MODE_REGISTER_COUNT] = {
+	/* mute outputs */
+	{ADAU_PLBHPVL, 0x03},
+	{ADAU_PLBHPVR, 0x03},
+	{ADAU_PLBLOVL, 0x02},
+	{ADAU_PLBLOVR, 0x02},
+	{ADAU_PLBMNOC, 0xE5},
+
+	{ADAU_CLK_EN0, 0x5F},
+	{ADAU_CLK_EN1, 0x01},
+
+	/*analog mic*/
+	{ADAU_RECVLCL, 0x82},
+	{ADAU_RECVLCR, 0x82},
+	{ADAU_MICCTRL, 0x00},
+};
+
+/*
+ * Digital Microphone mode,
+ * IIS Master, ADC capture/DAC playback, dsp core disabled
+ * (AInput mixers OFF, AOuput mixers ON, HP out ON)
+ */
+static struct adau1761_mode_register adau1761_mode1[MODE_REGISTER_COUNT] = {
+	/* mute outputs */
+	{ADAU_PLBHPVL, 0x03},
+	{ADAU_PLBHPVR, 0x03},
+	{ADAU_PLBLOVL, 0x02},
+	{ADAU_PLBLOVR, 0x02},
+	{ADAU_PLBMNOC, 0xE5},
+
+	{ADAU_CLK_EN0, 0x5F},
+	{ADAU_CLK_EN1, 0x03},
+
+	/*digital mic*/
+	{ADAU_RECVLCL, 0x00},
+	{ADAU_RECVLCR, 0x00},
+	{ADAU_MICCTRL, 0x20},
+};
+
+static struct adau1761_mode_register *adau1761_mode_registers[] = {
+	adau1761_mode0,
+	adau1761_mode1,
+};
+
 extern struct snd_soc_dai adau1761_dai;
 extern struct snd_soc_codec_device soc_codec_dev_adau1761;
 

Deleted: trunk/sound/soc/codecs/adau1761_fw.h (7718 => 7719)


--- trunk/sound/soc/codecs/adau1761_fw.h	2009-10-27 08:02:49 UTC (rev 7718)
+++ trunk/sound/soc/codecs/adau1761_fw.h	2009-10-27 09:57:14 UTC (rev 7719)
@@ -1,337 +0,0 @@
-/*
- * File:		sound/blackfin/adau1761_fw.h
- * Author:       	John McCarty <[email protected]>
- *
- * Created:      Thr Jun 5 2008
- * Description:  register and program definitions for adau1761 signal-flow modes
- *
- * Bugs:         Enter bugs at http://blackfin.uclinux.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see the file COPYING, or write
- * to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#ifndef __ADAU1761_MODES_H__
-#define __ADAU1761_MODES_H__
-
-#include "adau1761.h"
-
-#define RESET_REGISTER_COUNT 54
-#define MODE_REGISTER_COUNT 10
-
-/* DSP program patch for ADAU1761 ADC IIS 16bit mode */
-#define ADAU1716_ADC_SOFT_PATCH 1
-
-#ifdef CONFIG_SND_ADAU1761_IIS_MASTER
-/*digital mic mode - IIS mater mode*/
-#define ADAU_SRPT_CTRL0		0x01
-#else
-/* analog mic - IIS slave mode*/
-#define ADAU_SRPT_CTRL0 	0x00
-#endif
-
-struct adau1761_mode_register {
-	u16  regaddress;
-	u16  regvalue;
-};
-
-struct adau1761_mode_data {
-	u16  size;
-	u8 *data;
-};
-
-/*
- * Reset Mode - ADC capture/DAC playback, dsp core disabled
- * (AInput mixers 0db, AOuput mixers 0db, HP out ON, DSP core OFF)
-*/
-static struct adau1761_mode_register adau1761_reset[RESET_REGISTER_COUNT] = {
-	/* mute outputs */
-	{ADAU_PLBMNOC, 0xE5},
-	{ADAU_PLBHPVL, 0x01},
-	{ADAU_PLBHPVR, 0x01},
-	{ADAU_PLBLOVL, 0x00},
-	{ADAU_PLBLOVR, 0x00},
-
-	{ADAU_DSP_RUN, 0x00},
-	{ADAU_DSP_ENA, 0x00},
-	{ADAU_MICCTRL, 0x00},
-	{ADAU_RECPWRM, 0x00},
-	{ADAU_RECMLC0, 0x01},
-	{ADAU_RECMLC1, RECMLC_MIC_0DB},
-	{ADAU_RECMRC0, 0x01},
-	{ADAU_RECMRC1, RECMLC_MIC_0DB},
-	{ADAU_RECVLCL, 0x82},
-	{ADAU_RECVLCR, 0x82},
-	{ADAU_RECMBIA, RECMBIA_DISABLE},
-	{ADAU_ALCCTR0, 0x00},
-	{ADAU_ALCCTR1, 0x00},
-	{ADAU_ALCCTR2, 0x00},
-	{ADAU_ALCCTR3, 0x1F},
-	{ADAU_SPRTCT0, ADAU_SRPT_CTRL0},
-	{ADAU_SPRTCT1, 0x21}, /*0x21 = 32bclocks frame, 0x41 = 48*/
-	{ADAU_CONVCT0, 0x00},
-	{ADAU_CONVCT1, 0x00},
-	{ADAU_ADCCTL0, 0x00},
-	{ADAU_ADCCTL1, 0x00},
-	{ADAU_ADCCTL2, 0x00},
-	{ADAU_PLBMLC0, 0x21},
-	{ADAU_PLBMLC1, 0x00},
-	{ADAU_PLBMRC0, 0x41},
-	{ADAU_PLBMRC1, 0x00},
-	{ADAU_PLBMLLO, 0x03},
-	{ADAU_PLBMRLO, 0x09},
-	{ADAU_PLBLRMC, 0x01},
-	{ADAU_PLBCTRL, 0x00},
-	{ADAU_PLBPWRM, 0x00},
-	{ADAU_DACCTL0, 0x03},
-	{ADAU_DACCTL1, 0x00},
-	{ADAU_DACCTL2, 0x00},
-	{ADAU_DSP_CRC, 0x00},
-	{ADAU_DSP_GPI, 0x00},
-	{ADAU_DSP_SR1, 0x07},
-	{ADAU_SERPAD0, 0xAA},
-	{ADAU_SERPAD1, 0x00},
-	{ADAU_COMPAD0, 0xAA},
-	{ADAU_COMPAD1, 0x00},
-	{ADAU_MCLKPAD, 0x0A},
-	{ADAU_INP_ROT, 0x01},
-#ifdef ADAU1716_ADC_SOFT_PATCH
-	{ADAU_OUT_ROT, 0x00},
-#else
-	{ADAU_OUT_ROT, 0x01},
-#endif
-	{ADAU_SER_SRT, 0x00},
-	{ADAU_DSP_SLW, 0x00},
-	{ADAU_SER_DAT, 0x00},
-	{ADAU_CLK_EN0, 0x5F},
-	{ADAU_CLK_EN1, 0x01},
-};
-
-/*
- * Default Mode
- * Analog microphones, ADC capture/DAC playback, dsp core disabled
- * (AInput mixers ON, AOuput mixers ON, HP out ON)
-*/
-static struct adau1761_mode_register adau1761_mode0[MODE_REGISTER_COUNT] = {
-	/* mute outputs */
-	{ADAU_PLBHPVL, 0x03},
-	{ADAU_PLBHPVR, 0x03},
-	{ADAU_PLBLOVL, 0x02},
-	{ADAU_PLBLOVR, 0x02},
-	{ADAU_PLBMNOC, 0xE5},
-
-	{ADAU_CLK_EN0, 0x5F},
-	{ADAU_CLK_EN1, 0x01},
-
-	/*analog mic*/
-	{ADAU_RECVLCL, 0x82},
-	{ADAU_RECVLCR, 0x82},
-	{ADAU_MICCTRL, 0x00},
-};
-
-#ifdef ADAU1716_ADC_SOFT_PATCH
-#define ADAU1761_PROGRAM_SIZE_MODE0 575
-static u8 adau1761_mode0_prog[ADAU1761_PROGRAM_SIZE_MODE0] = {
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFE, 0xE0, 0x00, 0x00, 0x00,
-0xFF, 0xF5, 0x08, 0x20, 0x00,
-0xFF, 0x38, 0x00, 0x00, 0x00,
-0xFF, 0x80, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFE, 0xE8, 0x08, 0x00, 0x00,
-0xFE, 0x30, 0x00, 0xE2, 0x00,
-0xFF, 0x34, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0x2C, 0x00, 0x00, 0x00,
-0xFF, 0x54, 0x00, 0x00, 0x00,
-0xFF, 0x5C, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xE8, 0x07, 0x20, 0x08,
-0x00, 0x00, 0x06, 0xA0, 0x00,
-0xFF, 0xE0, 0x00, 0xC0, 0x00,
-0xFF, 0x80, 0x07, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0x00, 0x00, 0x00, 0x00,
-0xFE, 0xC0, 0x22, 0x00, 0x27,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFE, 0xE8, 0x1E, 0x00, 0x00,
-0xFF, 0xE8, 0x01, 0x20, 0x00,
-0xFF, 0xD8, 0x01, 0x03, 0x00,
-0x00, 0x07, 0xC6, 0x00, 0x00,
-0xFF, 0x08, 0x00, 0x00, 0x00,
-0xFF, 0xF4, 0x00, 0x20, 0x00,
-0xFF, 0xD8, 0x07, 0x02, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFD, 0xA5, 0x08, 0x20, 0x00,
-0xFF, 0xD8, 0x0D, 0x02, 0x00,
-0xFD, 0xAD, 0x08, 0x20, 0x00,
-0xFF, 0xD8, 0x0E, 0x02, 0x00,
-0xFD, 0xA5, 0x08, 0x20, 0x00,
-0x00, 0x00, 0x08, 0xA0, 0x00,
-0xFF, 0xD8, 0x11, 0x0A, 0x00,
-0x00, 0x20, 0x00, 0xEA, 0x00,
-0x00, 0x25, 0x08, 0x20, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xF5, 0x08, 0x20, 0x00,
-0xFF, 0xED, 0x17, 0x20, 0x26,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xD8, 0x12, 0x02, 0x00,
-0xFD, 0xA5, 0x08, 0x20, 0x00,
-0x00, 0x00, 0x0C, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x48, 0x00, 0xEA, 0x00,
-0xFF, 0xD8, 0x16, 0x0A, 0x00,
-0x00, 0x4D, 0x07, 0x40, 0x00,
-0x00, 0x15, 0x08, 0x20, 0x00,
-0x00, 0x18, 0x00, 0xE4, 0x00,
-0x00, 0x00, 0x09, 0xA0, 0x00,
-0xFF, 0xD8, 0x10, 0x0A, 0x00,
-0xFD, 0xAD, 0x08, 0x20, 0x00,
-0x00, 0x00, 0x08, 0xA0, 0x00,
-0xFF, 0xD8, 0x14, 0x0A, 0x00,
-0x00, 0x20, 0x00, 0xEA, 0x00,
-0x00, 0x25, 0x08, 0x20, 0x08,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFF, 0xF5, 0x08, 0x20, 0x00,
-0xFF, 0xED, 0x17, 0x20, 0x26,
-0xFF, 0xD8, 0x15, 0x02, 0x00,
-0xFD, 0xAD, 0x08, 0x20, 0x00,
-0x00, 0x00, 0x0C, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x50, 0x00, 0xEA, 0x00,
-0x00, 0x55, 0x07, 0x20, 0x00,
-0x00, 0x00, 0x09, 0xA0, 0x00,
-0xFF, 0xD8, 0x13, 0x0A, 0x00,
-0xFF, 0xE8, 0x15, 0x40, 0x00,
-0xFF, 0xE8, 0x10, 0x44, 0x00,
-0xFF, 0xED, 0x08, 0x24, 0x48,
-0xFF, 0xF5, 0x08, 0x24, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x58, 0x00, 0xEC, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x60, 0x00, 0xE2, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x65, 0x08, 0x20, 0x00,
-0x00, 0x5D, 0x08, 0x20, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFD, 0x60, 0x00, 0xE2, 0x00,
-0xFF, 0xE8, 0x12, 0x40, 0x00,
-0xFF, 0xE8, 0x13, 0x44, 0x00,
-0xFF, 0xED, 0x08, 0x24, 0x48,
-0xFF, 0xF5, 0x08, 0x24, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x0A, 0xA0, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x68, 0x00, 0xEC, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x70, 0x00, 0xE2, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0x00, 0x75, 0x08, 0x20, 0x00,
-0x00, 0x6D, 0x08, 0x20, 0x30,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFD, 0x68, 0x00, 0xE2, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFE, 0x30, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00,
-0xFE, 0xC0, 0x0F, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00, 0x00
-};
-#else
-#define ADAU1761_PROGRAM_SIZE_MODE0 0
-static u8 adau1761_mode0_prog[ADAU1761_PROGRAM_SIZE_MODE0] = {};
-#endif
-
-#if ADAU1716_ADC_SOFT_PATCH
-#define ADAU1761_PARAM_SIZE_MODE0 92
-static u8 adau1761_mode0_param[ADAU1761_PARAM_SIZE_MODE0] = {
-0x00, 0x00, 0x10, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x0F, 0x80, 0x00, 0x00,
-0x0F, 0xFF, 0xFE, 0x00,
-0x0F, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x7F, 0xFE, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00,
-0x00, 0x00, 0x00, 0x00
-};
-#else
-#define ADAU1761_PARAM_SIZE_MODE0 0
-static u8 adau1761_mode0_param[ADAU1761_PARAM_SIZE_MODE0] = {};
-#endif
-
-/*
- * Digital Microphone mode,
- * IIS Master, ADC capture/DAC playback, dsp core disabled
- * (AInput mixers OFF, AOuput mixers ON, HP out ON)
- */
-static struct adau1761_mode_register adau1761_mode1[MODE_REGISTER_COUNT] = {
-	/* mute outputs */
-	{ADAU_PLBHPVL, 0x03},
-	{ADAU_PLBHPVR, 0x03},
-	{ADAU_PLBLOVL, 0x02},
-	{ADAU_PLBLOVR, 0x02},
-	{ADAU_PLBMNOC, 0xE5},
-
-	{ADAU_CLK_EN0, 0x5F},
-	{ADAU_CLK_EN1, 0x03},
-
-	/*digital mic*/
-	{ADAU_RECVLCL, 0x00},
-	{ADAU_RECVLCR, 0x00},
-	{ADAU_MICCTRL, 0x20},
-};
-
-static struct adau1761_mode_register *adau1761_mode_registers[] = {
-	adau1761_mode0,
-	adau1761_mode1,
-};
-
-static struct adau1761_mode_data adau1761_mode_programs[] = {
-	{ADAU1761_PROGRAM_SIZE_MODE0, adau1761_mode0_prog},
-	{ADAU1761_PROGRAM_SIZE_MODE0, adau1761_mode0_prog},
-};
-
-static struct adau1761_mode_data adau1761_mode_params[] = {
-	{ADAU1761_PARAM_SIZE_MODE0, adau1761_mode0_param},
-	{ADAU1761_PARAM_SIZE_MODE0, adau1761_mode0_param},
-};
-
-#endif
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to