Alsa-devel
Threads by month
- ----- 2025 -----
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
September 2009
- 123 participants
- 225 discussions

[alsa-devel] Patch for au88x0 driver. Fix audacious issue and add auto reset in case of hardware ADB ctrl failure.
by Manuel Jander 04 Sep '09
by Manuel Jander 04 Sep '09
04 Sep '09
Hi,
does anybody still have a AU88x0 card ? I know they are quite ancient
now, but if anyone could give the attached patch a try ? Would be
nice.
I made the patch against linux-2.6.30.4
http://micro.homelinux.net/~mjander/au88x0.diff.gz
Best Regards,
Manuel
4
4
The AK4671 is a stereo CODEC with a built-in Microphone-Amplifier,
Receiver-Amplifier and Headphone-Amplifier.
The datasheet for the ak4671 can find at the following url:
http://www.asahi-kasei.co.jp/akm/en/product/ak4671/ak4671_f01e.pdf
Signed-off-by: Joonyoung Shim <jy0922.shim(a)samsung.com>
---
sound/soc/codecs/Kconfig | 4 +
sound/soc/codecs/Makefile | 2 +
sound/soc/codecs/ak4671.c | 898 +++++++++++++++++++++++++++++++++++++++++++++
sound/soc/codecs/ak4671.h | 156 ++++++++
4 files changed, 1060 insertions(+), 0 deletions(-)
create mode 100644 sound/soc/codecs/ak4671.c
create mode 100644 sound/soc/codecs/ak4671.h
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 0edca93..a2bb659 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -19,6 +19,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_AK4104 if SPI_MASTER
select SND_SOC_AK4535 if I2C
select SND_SOC_AK4642 if I2C
+ select SND_SOC_AK4671 if I2C
select SND_SOC_CS4270 if I2C
select SND_SOC_MAX9877 if I2C
select SND_SOC_PCM3008
@@ -96,6 +97,9 @@ config SND_SOC_AK4535
config SND_SOC_AK4642
tristate
+config SND_SOC_AK4671
+ tristate
+
# Cirrus Logic CS4270 Codec
config SND_SOC_CS4270
tristate
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
index fb4af28..13f7b4f 100644
--- a/sound/soc/codecs/Makefile
+++ b/sound/soc/codecs/Makefile
@@ -6,6 +6,7 @@ snd-soc-ad73311-objs := ad73311.o
snd-soc-ak4104-objs := ak4104.o
snd-soc-ak4535-objs := ak4535.o
snd-soc-ak4642-objs := ak4642.o
+snd-soc-ak4671-objs := ak4671.o
snd-soc-cs4270-objs := cs4270.o
snd-soc-cx20442-objs := cx20442.o
snd-soc-l3-objs := l3.o
@@ -56,6 +57,7 @@ obj-$(CONFIG_SND_SOC_AD73311) += snd-soc-ad73311.o
obj-$(CONFIG_SND_SOC_AK4104) += snd-soc-ak4104.o
obj-$(CONFIG_SND_SOC_AK4535) += snd-soc-ak4535.o
obj-$(CONFIG_SND_SOC_AK4642) += snd-soc-ak4642.o
+obj-$(CONFIG_SND_SOC_AK4671) += snd-soc-ak4671.o
obj-$(CONFIG_SND_SOC_CS4270) += snd-soc-cs4270.o
obj-$(CONFIG_SND_SOC_CX20442) += snd-soc-cx20442.o
obj-$(CONFIG_SND_SOC_L3) += snd-soc-l3.o
diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c
new file mode 100644
index 0000000..5b8ccee
--- /dev/null
+++ b/sound/soc/codecs/ak4671.c
@@ -0,0 +1,898 @@
+/*
+ * ak4671.c -- audio driver for AK4671
+ *
+ * Copyright (C) 2009 Samsung Electronics Co.Ltd
+ * Author: Joonyoung Shim <jy0922.shim(a)samsung.com>
+ *
+ * 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.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/i2c.h>
+#include <linux/delay.h>
+#include <sound/soc.h>
+#include <sound/soc-dapm.h>
+#include <sound/initval.h>
+#include <sound/tlv.h>
+
+#include "ak4671.h"
+
+static struct snd_soc_codec *ak4671_codec;
+
+/* codec private data */
+struct ak4671_priv {
+ struct snd_soc_codec codec;
+ u8 reg_cache[AK4671_CACHEREGNUM];
+
+ unsigned int pll_on:1;
+};
+
+/* ak4671 register cache & default register settings */
+static const u8 ak4671_reg[AK4671_CACHEREGNUM] = {
+ 0x00, /* AK4671_AD_DA_POWER_MANAGEMENT (0x00) */
+ 0xf6, /* AK4671_PLL_MODE_SELECT0 (0x01) */
+ 0x00, /* AK4671_PLL_MODE_SELECT1 (0x02) */
+ 0x02, /* AK4671_FORMAT_SELECT (0x03) */
+ 0x00, /* AK4671_MIC_SIGNAL_SELECT (0x04) */
+ 0x55, /* AK4671_MIC_AMP_GAIN (0x05) */
+ 0x00, /* AK4671_MIXING_POWER_MANAGEMENT0 (0x06) */
+ 0x00, /* AK4671_MIXING_POWER_MANAGEMENT1 (0x07) */
+ 0xb5, /* AK4671_OUTPUT_VOLUME_CONTROL (0x08) */
+ 0x00, /* AK4671_LOUT1_SIGNAL_SELECT (0x09) */
+ 0x00, /* AK4671_ROUT1_SIGNAL_SELECT (0x0a) */
+ 0x00, /* AK4671_LOUT2_SIGNAL_SELECT (0x0b) */
+ 0x00, /* AK4671_ROUT2_SIGNAL_SELECT (0x0c) */
+ 0x00, /* AK4671_LOUT3_SIGNAL_SELECT (0x0d) */
+ 0x00, /* AK4671_ROUT3_SIGNAL_SELECT (0x0e) */
+ 0x00, /* AK4671_LOUT1_POWER_MANAGERMENT (0x0f) */
+ 0x00, /* AK4671_LOUT2_POWER_MANAGERMENT (0x10) */
+ 0x80, /* AK4671_LOUT3_POWER_MANAGERMENT (0x11) */
+ 0x91, /* AK4671_LCH_INPUT_VOLUME_CONTROL (0x12) */
+ 0x91, /* AK4671_RCH_INPUT_VOLUME_CONTROL (0x13) */
+ 0xe1, /* AK4671_ALC_REFERENCE_SELECT (0x14) */
+ 0x00, /* AK4671_DIGITAL_MIXING_CONTROL (0x15) */
+ 0x00, /* AK4671_ALC_TIMER_SELECT (0x16) */
+ 0x00, /* AK4671_ALC_MODE_CONTROL (0x17) */
+ 0x02, /* AK4671_MODE_CONTROL1 (0x18) */
+ 0x01, /* AK4671_MODE_CONTROL2 (0x19) */
+ 0x18, /* AK4671_LCH_OUTPUT_VOLUME_CONTROL (0x1a) */
+ 0x18, /* AK4671_RCH_OUTPUT_VOLUME_CONTROL (0x1b) */
+ 0x00, /* AK4671_SIDETONE_A_CONTROL (0x1c) */
+ 0x02, /* AK4671_DIGITAL_FILTER_SELECT (0x1d) */
+ 0x00, /* AK4671_FIL3_COEFFICIENT0 (0x1e) */
+ 0x00, /* AK4671_FIL3_COEFFICIENT1 (0x1f) */
+ 0x00, /* AK4671_FIL3_COEFFICIENT2 (0x20) */
+ 0x00, /* AK4671_FIL3_COEFFICIENT3 (0x21) */
+ 0x00, /* AK4671_EQ_COEFFICIENT0 (0x22) */
+ 0x00, /* AK4671_EQ_COEFFICIENT1 (0x23) */
+ 0x00, /* AK4671_EQ_COEFFICIENT2 (0x24) */
+ 0x00, /* AK4671_EQ_COEFFICIENT3 (0x25) */
+ 0x00, /* AK4671_EQ_COEFFICIENT4 (0x26) */
+ 0x00, /* AK4671_EQ_COEFFICIENT5 (0x27) */
+ 0xa9, /* AK4671_FIL1_COEFFICIENT0 (0x28) */
+ 0x1f, /* AK4671_FIL1_COEFFICIENT1 (0x29) */
+ 0xad, /* AK4671_FIL1_COEFFICIENT2 (0x2a) */
+ 0x20, /* AK4671_FIL1_COEFFICIENT3 (0x2b) */
+ 0x00, /* AK4671_FIL2_COEFFICIENT0 (0x2c) */
+ 0x00, /* AK4671_FIL2_COEFFICIENT1 (0x2d) */
+ 0x00, /* AK4671_FIL2_COEFFICIENT2 (0x2e) */
+ 0x00, /* AK4671_FIL2_COEFFICIENT3 (0x2f) */
+ 0x00, /* AK4671_DIGITAL_FILTER_SELECT2 (0x30) */
+ 0x00, /* this register not used */
+ 0x00, /* AK4671_E1_COEFFICIENT0 (0x32) */
+ 0x00, /* AK4671_E1_COEFFICIENT1 (0x33) */
+ 0x00, /* AK4671_E1_COEFFICIENT2 (0x34) */
+ 0x00, /* AK4671_E1_COEFFICIENT3 (0x35) */
+ 0x00, /* AK4671_E1_COEFFICIENT4 (0x36) */
+ 0x00, /* AK4671_E1_COEFFICIENT5 (0x37) */
+ 0x00, /* AK4671_E2_COEFFICIENT0 (0x38) */
+ 0x00, /* AK4671_E2_COEFFICIENT1 (0x39) */
+ 0x00, /* AK4671_E2_COEFFICIENT2 (0x3a) */
+ 0x00, /* AK4671_E2_COEFFICIENT3 (0x3b) */
+ 0x00, /* AK4671_E2_COEFFICIENT4 (0x3c) */
+ 0x00, /* AK4671_E2_COEFFICIENT5 (0x3d) */
+ 0x00, /* AK4671_E3_COEFFICIENT0 (0x3e) */
+ 0x00, /* AK4671_E3_COEFFICIENT1 (0x3f) */
+ 0x00, /* AK4671_E3_COEFFICIENT2 (0x40) */
+ 0x00, /* AK4671_E3_COEFFICIENT3 (0x41) */
+ 0x00, /* AK4671_E3_COEFFICIENT4 (0x42) */
+ 0x00, /* AK4671_E3_COEFFICIENT5 (0x43) */
+ 0x00, /* AK4671_E4_COEFFICIENT0 (0x44) */
+ 0x00, /* AK4671_E4_COEFFICIENT1 (0x45) */
+ 0x00, /* AK4671_E4_COEFFICIENT2 (0x46) */
+ 0x00, /* AK4671_E4_COEFFICIENT3 (0x47) */
+ 0x00, /* AK4671_E4_COEFFICIENT4 (0x48) */
+ 0x00, /* AK4671_E4_COEFFICIENT5 (0x49) */
+ 0x00, /* AK4671_E5_COEFFICIENT0 (0x4a) */
+ 0x00, /* AK4671_E5_COEFFICIENT1 (0x4b) */
+ 0x00, /* AK4671_E5_COEFFICIENT2 (0x4c) */
+ 0x00, /* AK4671_E5_COEFFICIENT3 (0x4d) */
+ 0x00, /* AK4671_E5_COEFFICIENT4 (0x4e) */
+ 0x00, /* AK4671_E5_COEFFICIENT5 (0x4f) */
+ 0x88, /* AK4671_EQ_CONTROL_250HZ_100HZ (0x50) */
+ 0x88, /* AK4671_EQ_CONTROL_3500HZ_1KHZ (0x51) */
+ 0x08, /* AK4671_EQ_CONTRO_10KHZ (0x52) */
+ 0x00, /* AK4671_PCM_IF_CONTROL0 (0x53) */
+ 0x00, /* AK4671_PCM_IF_CONTROL1 (0x54) */
+ 0x00, /* AK4671_PCM_IF_CONTROL2 (0x55) */
+ 0x18, /* AK4671_DIGITAL_VOLUME_B_CONTROL (0x56) */
+ 0x18, /* AK4671_DIGITAL_VOLUME_C_CONTROL (0x57) */
+ 0x00, /* AK4671_SIDETONE_VOLUME_CONTROL (0x58) */
+ 0x00, /* AK4671_DIGITAL_MIXING_CONTROL2 (0x59) */
+ 0x00, /* AK4671_SAR_ADC_CONTROL (0x5a) */
+};
+
+/* read ak4671 register cache */
+static inline unsigned int ak4671_read_reg_cache(struct snd_soc_codec *codec,
+ unsigned int reg)
+{
+ u8 *cache = codec->reg_cache;
+
+ if (reg >= AK4671_CACHEREGNUM)
+ return -EIO;
+
+ return cache[reg];
+}
+
+/* write ak4671 register cache */
+static inline void ak4671_write_reg_cache(struct snd_soc_codec *codec,
+ unsigned int reg, unsigned int value)
+{
+ u8 *cache = codec->reg_cache;
+
+ if (reg >= AK4671_CACHEREGNUM)
+ return;
+
+ cache[reg] = value;
+}
+
+/* write to the ak4671 register space */
+static int ak4671_write(struct snd_soc_codec *codec, unsigned int reg,
+ unsigned int value)
+{
+ u8 data[2];
+
+ /* data is
+ * D15..D8 AK4671 register offset
+ * D7...D0 register data
+ */
+ data[0] = reg & 0xff;
+ data[1] = value & 0xff;
+
+ ak4671_write_reg_cache(codec, reg, value);
+ if (codec->hw_write(codec->control_data, data, 2) == 2)
+ return 0;
+ else
+ return -EIO;
+}
+
+/*
+ * LOUT1/ROUT1 output volume control:
+ * from -24 to 6 dB in 6 dB steps (mute instead of -30 dB)
+ */
+static DECLARE_TLV_DB_SCALE(out1_tlv, -3000, 600, 1);
+
+/*
+ * LOUT2/ROUT2 output volume control:
+ * from -33 to 6 dB in 3 dB steps (mute instead of -33 dB)
+ */
+static DECLARE_TLV_DB_SCALE(out2_tlv, -3300, 300, 1);
+
+/*
+ * LOUT3/ROUT3 output volume control:
+ * from -6 to 3 dB in 3 dB steps
+ */
+static DECLARE_TLV_DB_SCALE(out3_tlv, -600, 300, 0);
+
+/*
+ * Mic amp gain control:
+ * from -15 to 30 dB in 3 dB steps
+ * REVISIT: The actual min value(0x01) is -12 dB and the reg value 0x00 is not
+ * available
+ */
+static DECLARE_TLV_DB_SCALE(mic_amp_tlv, -1500, 300, 0);
+
+static const struct snd_kcontrol_new ak4671_snd_controls[] = {
+ /* Common playback gain controls */
+ SOC_SINGLE_TLV("Stereo Line Output1 Playback Volume",
+ AK4671_OUTPUT_VOLUME_CONTROL, 0, 0x6, 0, out1_tlv),
+ SOC_SINGLE_TLV("Headphone Output2 Playback Volume",
+ AK4671_OUTPUT_VOLUME_CONTROL, 4, 0xd, 0, out2_tlv),
+ SOC_SINGLE_TLV("Stereo Line Output3 Playback Volume",
+ AK4671_LOUT3_POWER_MANAGERMENT, 6, 0x3, 0, out3_tlv),
+
+ /* Common capture gain controls */
+ SOC_DOUBLE_TLV("Mic Amp Capture Volume",
+ AK4671_MIC_AMP_GAIN, 0, 4, 0xf, 0, mic_amp_tlv),
+};
+
+/* event handlers */
+static int ak4671_out2_event(struct snd_soc_dapm_widget *w,
+ struct snd_kcontrol *kcontrol, int event)
+{
+ struct snd_soc_codec *codec = w->codec;
+ u8 reg;
+
+ switch (event) {
+ case SND_SOC_DAPM_POST_PMU:
+ reg = ak4671_read_reg_cache(codec,
+ AK4671_LOUT2_POWER_MANAGERMENT);
+ reg |= AK4671_MUTEN;
+ ak4671_write(codec, AK4671_LOUT2_POWER_MANAGERMENT, reg);
+ break;
+ case SND_SOC_DAPM_PRE_PMD:
+ reg = ak4671_read_reg_cache(codec,
+ AK4671_LOUT2_POWER_MANAGERMENT);
+ reg &= ~AK4671_MUTEN;
+ ak4671_write(codec, AK4671_LOUT2_POWER_MANAGERMENT, reg);
+ break;
+ }
+
+ return 0;
+}
+
+/* Output Mixers */
+static const struct snd_kcontrol_new ak4671_lout1_mixer_controls[] = {
+ SOC_DAPM_SINGLE("DACL", AK4671_LOUT1_SIGNAL_SELECT, 0, 1, 0),
+ SOC_DAPM_SINGLE("LINL1", AK4671_LOUT1_SIGNAL_SELECT, 1, 1, 0),
+ SOC_DAPM_SINGLE("LINL2", AK4671_LOUT1_SIGNAL_SELECT, 2, 1, 0),
+ SOC_DAPM_SINGLE("LINL3", AK4671_LOUT1_SIGNAL_SELECT, 3, 1, 0),
+ SOC_DAPM_SINGLE("LINL4", AK4671_LOUT1_SIGNAL_SELECT, 4, 1, 0),
+ SOC_DAPM_SINGLE("LOOPL", AK4671_LOUT1_SIGNAL_SELECT, 5, 1, 0),
+};
+
+static const struct snd_kcontrol_new ak4671_rout1_mixer_controls[] = {
+ SOC_DAPM_SINGLE("DACR", AK4671_ROUT1_SIGNAL_SELECT, 0, 1, 0),
+ SOC_DAPM_SINGLE("RINR1", AK4671_ROUT1_SIGNAL_SELECT, 1, 1, 0),
+ SOC_DAPM_SINGLE("RINR2", AK4671_ROUT1_SIGNAL_SELECT, 2, 1, 0),
+ SOC_DAPM_SINGLE("RINR3", AK4671_ROUT1_SIGNAL_SELECT, 3, 1, 0),
+ SOC_DAPM_SINGLE("RINR4", AK4671_ROUT1_SIGNAL_SELECT, 4, 1, 0),
+ SOC_DAPM_SINGLE("LOOPR", AK4671_ROUT1_SIGNAL_SELECT, 5, 1, 0),
+};
+
+static const struct snd_kcontrol_new ak4671_lout2_mixer_controls[] = {
+ SOC_DAPM_SINGLE("DACHL", AK4671_LOUT2_SIGNAL_SELECT, 0, 1, 0),
+ SOC_DAPM_SINGLE("LINH1", AK4671_LOUT2_SIGNAL_SELECT, 1, 1, 0),
+ SOC_DAPM_SINGLE("LINH2", AK4671_LOUT2_SIGNAL_SELECT, 2, 1, 0),
+ SOC_DAPM_SINGLE("LINH3", AK4671_LOUT2_SIGNAL_SELECT, 3, 1, 0),
+ SOC_DAPM_SINGLE("LINH4", AK4671_LOUT2_SIGNAL_SELECT, 4, 1, 0),
+ SOC_DAPM_SINGLE("LOOPHL", AK4671_LOUT2_SIGNAL_SELECT, 5, 1, 0),
+};
+
+static const struct snd_kcontrol_new ak4671_rout2_mixer_controls[] = {
+ SOC_DAPM_SINGLE("DACHR", AK4671_ROUT2_SIGNAL_SELECT, 0, 1, 0),
+ SOC_DAPM_SINGLE("RINH1", AK4671_ROUT2_SIGNAL_SELECT, 1, 1, 0),
+ SOC_DAPM_SINGLE("RINH2", AK4671_ROUT2_SIGNAL_SELECT, 2, 1, 0),
+ SOC_DAPM_SINGLE("RINH3", AK4671_ROUT2_SIGNAL_SELECT, 3, 1, 0),
+ SOC_DAPM_SINGLE("RINH4", AK4671_ROUT2_SIGNAL_SELECT, 4, 1, 0),
+ SOC_DAPM_SINGLE("LOOPHR", AK4671_ROUT2_SIGNAL_SELECT, 5, 1, 0),
+};
+
+static const struct snd_kcontrol_new ak4671_lout3_mixer_controls[] = {
+ SOC_DAPM_SINGLE("DACSL", AK4671_LOUT3_SIGNAL_SELECT, 0, 1, 0),
+ SOC_DAPM_SINGLE("LINS1", AK4671_LOUT3_SIGNAL_SELECT, 1, 1, 0),
+ SOC_DAPM_SINGLE("LINS2", AK4671_LOUT3_SIGNAL_SELECT, 2, 1, 0),
+ SOC_DAPM_SINGLE("LINS3", AK4671_LOUT3_SIGNAL_SELECT, 3, 1, 0),
+ SOC_DAPM_SINGLE("LINS4", AK4671_LOUT3_SIGNAL_SELECT, 4, 1, 0),
+ SOC_DAPM_SINGLE("LOOPSL", AK4671_LOUT3_SIGNAL_SELECT, 5, 1, 0),
+};
+
+static const struct snd_kcontrol_new ak4671_rout3_mixer_controls[] = {
+ SOC_DAPM_SINGLE("DACSR", AK4671_ROUT3_SIGNAL_SELECT, 0, 1, 0),
+ SOC_DAPM_SINGLE("RINS1", AK4671_ROUT3_SIGNAL_SELECT, 1, 1, 0),
+ SOC_DAPM_SINGLE("RINS2", AK4671_ROUT3_SIGNAL_SELECT, 2, 1, 0),
+ SOC_DAPM_SINGLE("RINS3", AK4671_ROUT3_SIGNAL_SELECT, 3, 1, 0),
+ SOC_DAPM_SINGLE("RINS4", AK4671_ROUT3_SIGNAL_SELECT, 4, 1, 0),
+ SOC_DAPM_SINGLE("LOOPSR", AK4671_ROUT3_SIGNAL_SELECT, 5, 1, 0),
+};
+
+/* Input MUXs */
+static const char *ak4671_lin_mux_texts[] =
+ {"LIN1", "LIN2", "LIN3", "LIN4"};
+static const struct soc_enum ak4671_lin_mux_enum =
+ SOC_ENUM_SINGLE(AK4671_MIC_SIGNAL_SELECT, 0,
+ ARRAY_SIZE(ak4671_lin_mux_texts),
+ ak4671_lin_mux_texts);
+static const struct snd_kcontrol_new ak4671_lin_mux_control =
+ SOC_DAPM_ENUM("Route", ak4671_lin_mux_enum);
+
+static const char *ak4671_rin_mux_texts[] =
+ {"RIN1", "RIN2", "RIN3", "RIN4"};
+static const struct soc_enum ak4671_rin_mux_enum =
+ SOC_ENUM_SINGLE(AK4671_MIC_SIGNAL_SELECT, 2,
+ ARRAY_SIZE(ak4671_rin_mux_texts),
+ ak4671_rin_mux_texts);
+static const struct snd_kcontrol_new ak4671_rin_mux_control =
+ SOC_DAPM_ENUM("Route", ak4671_rin_mux_enum);
+
+static const struct snd_soc_dapm_widget ak4671_dapm_widgets[] = {
+ /* Inputs */
+ SND_SOC_DAPM_INPUT("LIN1"),
+ SND_SOC_DAPM_INPUT("RIN1"),
+ SND_SOC_DAPM_INPUT("LIN2"),
+ SND_SOC_DAPM_INPUT("RIN2"),
+ SND_SOC_DAPM_INPUT("LIN3"),
+ SND_SOC_DAPM_INPUT("RIN3"),
+ SND_SOC_DAPM_INPUT("LIN4"),
+ SND_SOC_DAPM_INPUT("RIN4"),
+
+ /* Outputs */
+ SND_SOC_DAPM_OUTPUT("LOUT1"),
+ SND_SOC_DAPM_OUTPUT("ROUT1"),
+ SND_SOC_DAPM_OUTPUT("LOUT2"),
+ SND_SOC_DAPM_OUTPUT("ROUT2"),
+ SND_SOC_DAPM_OUTPUT("LOUT3"),
+ SND_SOC_DAPM_OUTPUT("ROUT3"),
+
+ /* DAC */
+ SND_SOC_DAPM_DAC("DAC Left", "Left HiFi Playback",
+ AK4671_AD_DA_POWER_MANAGEMENT, 6, 0),
+ SND_SOC_DAPM_DAC("DAC Right", "Right HiFi Playback",
+ AK4671_AD_DA_POWER_MANAGEMENT, 7, 0),
+
+ /* ADC */
+ SND_SOC_DAPM_ADC("ADC Left", "Left HiFi Capture",
+ AK4671_AD_DA_POWER_MANAGEMENT, 4, 0),
+ SND_SOC_DAPM_ADC("ADC Right", "Right HiFi Capture",
+ AK4671_AD_DA_POWER_MANAGEMENT, 5, 0),
+
+ /* PGA */
+ SND_SOC_DAPM_PGA("LOUT2 Mix Amp",
+ AK4671_LOUT2_POWER_MANAGERMENT, 5, 0, NULL, 0),
+ SND_SOC_DAPM_PGA("ROUT2 Mix Amp",
+ AK4671_LOUT2_POWER_MANAGERMENT, 6, 0, NULL, 0),
+
+ SND_SOC_DAPM_PGA("LIN1 Mixing Circuit",
+ AK4671_MIXING_POWER_MANAGEMENT1, 0, 0, NULL, 0),
+ SND_SOC_DAPM_PGA("RIN1 Mixing Circuit",
+ AK4671_MIXING_POWER_MANAGEMENT1, 1, 0, NULL, 0),
+ SND_SOC_DAPM_PGA("LIN2 Mixing Circuit",
+ AK4671_MIXING_POWER_MANAGEMENT1, 2, 0, NULL, 0),
+ SND_SOC_DAPM_PGA("RIN2 Mixing Circuit",
+ AK4671_MIXING_POWER_MANAGEMENT1, 3, 0, NULL, 0),
+ SND_SOC_DAPM_PGA("LIN3 Mixing Circuit",
+ AK4671_MIXING_POWER_MANAGEMENT1, 4, 0, NULL, 0),
+ SND_SOC_DAPM_PGA("RIN3 Mixing Circuit",
+ AK4671_MIXING_POWER_MANAGEMENT1, 5, 0, NULL, 0),
+ SND_SOC_DAPM_PGA("LIN4 Mixing Circuit",
+ AK4671_MIXING_POWER_MANAGEMENT1, 6, 0, NULL, 0),
+ SND_SOC_DAPM_PGA("RIN4 Mixing Circuit",
+ AK4671_MIXING_POWER_MANAGEMENT1, 7, 0, NULL, 0),
+
+ /* Output Mixers */
+ SND_SOC_DAPM_MIXER("LOUT1 Mixer", AK4671_LOUT1_POWER_MANAGERMENT, 0, 0,
+ &ak4671_lout1_mixer_controls[0],
+ ARRAY_SIZE(ak4671_lout1_mixer_controls)),
+ SND_SOC_DAPM_MIXER("ROUT1 Mixer", AK4671_LOUT1_POWER_MANAGERMENT, 1, 0,
+ &ak4671_rout1_mixer_controls[0],
+ ARRAY_SIZE(ak4671_rout1_mixer_controls)),
+ SND_SOC_DAPM_MIXER_E("LOUT2 Mixer", AK4671_LOUT2_POWER_MANAGERMENT,
+ 0, 0, &ak4671_lout2_mixer_controls[0],
+ ARRAY_SIZE(ak4671_lout2_mixer_controls),
+ ak4671_out2_event,
+ SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_PRE_PMD),
+ SND_SOC_DAPM_MIXER_E("ROUT2 Mixer", AK4671_LOUT2_POWER_MANAGERMENT,
+ 1, 0, &ak4671_rout2_mixer_controls[0],
+ ARRAY_SIZE(ak4671_rout2_mixer_controls),
+ ak4671_out2_event,
+ SND_SOC_DAPM_POST_PMU|SND_SOC_DAPM_PRE_PMD),
+ SND_SOC_DAPM_MIXER("LOUT3 Mixer", AK4671_LOUT3_POWER_MANAGERMENT, 0, 0,
+ &ak4671_lout3_mixer_controls[0],
+ ARRAY_SIZE(ak4671_lout3_mixer_controls)),
+ SND_SOC_DAPM_MIXER("ROUT3 Mixer", AK4671_LOUT3_POWER_MANAGERMENT, 1, 0,
+ &ak4671_rout3_mixer_controls[0],
+ ARRAY_SIZE(ak4671_rout3_mixer_controls)),
+
+ /* Input MUXs */
+ SND_SOC_DAPM_MUX("LIN MUX", AK4671_AD_DA_POWER_MANAGEMENT, 2, 0,
+ &ak4671_lin_mux_control),
+ SND_SOC_DAPM_MUX("RIN MUX", AK4671_AD_DA_POWER_MANAGEMENT, 3, 0,
+ &ak4671_rin_mux_control),
+
+ /* Mic Power */
+ SND_SOC_DAPM_MICBIAS("Mic Bias", AK4671_AD_DA_POWER_MANAGEMENT, 1, 0),
+};
+
+static const struct snd_soc_dapm_route intercon[] = {
+ /* Outputs */
+ {"LOUT1", "NULL", "LOUT1 Mixer"},
+ {"ROUT1", "NULL", "ROUT1 Mixer"},
+ {"LOUT2", "NULL", "LOUT2 Mix Amp"},
+ {"ROUT2", "NULL", "ROUT2 Mix Amp"},
+ {"LOUT3", "NULL", "LOUT3 Mixer"},
+ {"ROUT3", "NULL", "ROUT3 Mixer"},
+
+ {"LOUT1 Mixer", "DACL", "DAC Left"},
+ {"ROUT1 Mixer", "DACR", "DAC Right"},
+ {"LOUT2 Mixer", "DACHL", "DAC Left"},
+ {"ROUT2 Mixer", "DACHR", "DAC Right"},
+ {"LOUT2 Mix Amp", "NULL", "LOUT2 Mixer"},
+ {"ROUT2 Mix Amp", "NULL", "ROUT2 Mixer"},
+ {"LOUT3 Mixer", "DACSL", "DAC Left"},
+ {"ROUT3 Mixer", "DACSR", "DAC Right"},
+
+ /* Inputs */
+ {"LIN MUX", "LIN1", "LIN1"},
+ {"LIN MUX", "LIN2", "LIN2"},
+ {"LIN MUX", "LIN3", "LIN3"},
+ {"LIN MUX", "LIN4", "LIN4"},
+
+ {"RIN MUX", "RIN1", "RIN1"},
+ {"RIN MUX", "RIN2", "RIN2"},
+ {"RIN MUX", "RIN3", "RIN3"},
+ {"RIN MUX", "RIN4", "RIN4"},
+
+ {"LIN1", NULL, "Mic Bias"},
+ {"RIN1", NULL, "Mic Bias"},
+ {"LIN2", NULL, "Mic Bias"},
+ {"RIN2", NULL, "Mic Bias"},
+
+ {"ADC Left", "NULL", "LIN MUX"},
+ {"ADC Right", "NULL", "RIN MUX"},
+
+ /* Analog Loops */
+ {"LIN1 Mixing Circuit", "NULL", "LIN1"},
+ {"RIN1 Mixing Circuit", "NULL", "RIN1"},
+ {"LIN2 Mixing Circuit", "NULL", "LIN2"},
+ {"RIN2 Mixing Circuit", "NULL", "RIN2"},
+ {"LIN3 Mixing Circuit", "NULL", "LIN3"},
+ {"RIN3 Mixing Circuit", "NULL", "RIN3"},
+ {"LIN4 Mixing Circuit", "NULL", "LIN4"},
+ {"RIN4 Mixing Circuit", "NULL", "RIN4"},
+
+ {"LOUT1 Mixer", "LINL1", "LIN1 Mixing Circuit"},
+ {"ROUT1 Mixer", "RINR1", "RIN1 Mixing Circuit"},
+ {"LOUT2 Mixer", "LINH1", "LIN1 Mixing Circuit"},
+ {"ROUT2 Mixer", "RINH1", "RIN1 Mixing Circuit"},
+ {"LOUT3 Mixer", "LINS1", "LIN1 Mixing Circuit"},
+ {"ROUT3 Mixer", "RINS1", "RIN1 Mixing Circuit"},
+
+ {"LOUT1 Mixer", "LINL2", "LIN2 Mixing Circuit"},
+ {"ROUT1 Mixer", "RINR2", "RIN2 Mixing Circuit"},
+ {"LOUT2 Mixer", "LINH2", "LIN2 Mixing Circuit"},
+ {"ROUT2 Mixer", "RINH2", "RIN2 Mixing Circuit"},
+ {"LOUT3 Mixer", "LINS2", "LIN2 Mixing Circuit"},
+ {"ROUT3 Mixer", "RINS2", "RIN2 Mixing Circuit"},
+
+ {"LOUT1 Mixer", "LINL3", "LIN3 Mixing Circuit"},
+ {"ROUT1 Mixer", "RINR3", "RIN3 Mixing Circuit"},
+ {"LOUT2 Mixer", "LINH3", "LIN3 Mixing Circuit"},
+ {"ROUT2 Mixer", "RINH3", "RIN3 Mixing Circuit"},
+ {"LOUT3 Mixer", "LINS3", "LIN3 Mixing Circuit"},
+ {"ROUT3 Mixer", "RINS3", "RIN3 Mixing Circuit"},
+
+ {"LOUT1 Mixer", "LINL4", "LIN4 Mixing Circuit"},
+ {"ROUT1 Mixer", "RINR4", "RIN4 Mixing Circuit"},
+ {"LOUT2 Mixer", "LINH4", "LIN4 Mixing Circuit"},
+ {"ROUT2 Mixer", "RINH4", "RIN4 Mixing Circuit"},
+ {"LOUT3 Mixer", "LINS4", "LIN4 Mixing Circuit"},
+ {"ROUT3 Mixer", "RINS4", "RIN4 Mixing Circuit"},
+};
+
+static int ak4671_add_widgets(struct snd_soc_codec *codec)
+{
+ snd_soc_dapm_new_controls(codec, ak4671_dapm_widgets,
+ ARRAY_SIZE(ak4671_dapm_widgets));
+
+ snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
+
+ snd_soc_dapm_new_widgets(codec);
+ return 0;
+}
+
+static int ak4671_hw_params(struct snd_pcm_substream *substream,
+ struct snd_pcm_hw_params *params,
+ struct snd_soc_dai *dai)
+{
+ struct snd_soc_codec *codec = dai->codec;
+ u8 fs;
+
+ fs = ak4671_read_reg_cache(codec, AK4671_PLL_MODE_SELECT0);
+ fs &= ~AK4671_FS;
+
+ switch (params_rate(params)) {
+ case 8000:
+ fs |= AK4671_FS_8KHZ;
+ break;
+ case 12000:
+ fs |= AK4671_FS_12KHZ;
+ break;
+ case 16000:
+ fs |= AK4671_FS_16KHZ;
+ break;
+ case 24000:
+ fs |= AK4671_FS_24KHZ;
+ break;
+ case 11025:
+ fs |= AK4671_FS_11_025KHZ;
+ break;
+ case 22050:
+ fs |= AK4671_FS_22_05KHZ;
+ break;
+ case 32000:
+ fs |= AK4671_FS_32KHZ;
+ break;
+ case 44100:
+ fs |= AK4671_FS_44_1KHZ;
+ break;
+ case 48000:
+ fs |= AK4671_FS_48KHZ;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ ak4671_write(codec, AK4671_PLL_MODE_SELECT0, fs);
+
+ return 0;
+}
+
+static int ak4671_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id,
+ unsigned int freq, int dir)
+{
+ struct snd_soc_codec *codec = dai->codec;
+ u8 pll;
+
+ pll = ak4671_read_reg_cache(codec, AK4671_PLL_MODE_SELECT0);
+ pll &= ~AK4671_PLL;
+
+ switch (freq) {
+ case 11289600:
+ pll |= AK4671_PLL_11_2896MHZ;
+ break;
+ case 12000000:
+ pll |= AK4671_PLL_12MHZ;
+ break;
+ case 12288000:
+ pll |= AK4671_PLL_12_288MHZ;
+ break;
+ case 13000000:
+ pll |= AK4671_PLL_13MHZ;
+ break;
+ case 13500000:
+ pll |= AK4671_PLL_13_5MHZ;
+ break;
+ case 19200000:
+ pll |= AK4671_PLL_19_2MHZ;
+ break;
+ case 24000000:
+ pll |= AK4671_PLL_24MHZ;
+ break;
+ case 26000000:
+ pll |= AK4671_PLL_26MHZ;
+ break;
+ case 27000000:
+ pll |= AK4671_PLL_27MHZ;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ ak4671_write(codec, AK4671_PLL_MODE_SELECT0, pll);
+
+ return 0;
+}
+
+static int ak4671_set_dai_fmt(struct snd_soc_dai *dai, unsigned int fmt)
+{
+ struct snd_soc_codec *codec = dai->codec;
+ struct ak4671_priv *ak4671 = codec->private_data;
+ u8 mode;
+ u8 format;
+
+ /* set master/slave audio interface */
+ mode = ak4671_read_reg_cache(codec, AK4671_PLL_MODE_SELECT1);
+
+ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
+ case SND_SOC_DAIFMT_CBM_CFM:
+ ak4671->pll_on = 1;
+ mode |= AK4671_M_S;
+ break;
+ case SND_SOC_DAIFMT_CBM_CFS:
+ ak4671->pll_on = 1;
+ mode &= ~(AK4671_M_S);
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ /* interface format */
+ format = ak4671_read_reg_cache(codec, AK4671_FORMAT_SELECT);
+ format &= ~AK4671_DIF;
+
+ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
+ case SND_SOC_DAIFMT_I2S:
+ format |= AK4671_DIF_I2S_MODE;
+ break;
+ case SND_SOC_DAIFMT_LEFT_J:
+ format |= AK4671_DIF_MSB_MODE;
+ break;
+ case SND_SOC_DAIFMT_DSP_A:
+ format |= AK4671_DIF_DSP_MODE;
+ format |= AK4671_BCKP;
+ format |= AK4671_MSBS;
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ /* set mode and format */
+ ak4671_write(codec, AK4671_PLL_MODE_SELECT1, mode);
+ ak4671_write(codec, AK4671_FORMAT_SELECT, format);
+
+ return 0;
+}
+
+static int ak4671_set_bias_level(struct snd_soc_codec *codec,
+ enum snd_soc_bias_level level)
+{
+ struct ak4671_priv *ak4671 = codec->private_data;
+ u8 reg;
+
+ switch (level) {
+ case SND_SOC_BIAS_ON:
+ case SND_SOC_BIAS_PREPARE:
+ case SND_SOC_BIAS_STANDBY:
+ if (ak4671->pll_on) {
+ reg = ak4671_read_reg_cache(codec,
+ AK4671_PLL_MODE_SELECT1);
+ reg |= AK4671_PMPLL;
+ ak4671_write(codec, AK4671_PLL_MODE_SELECT1, reg);
+ /* pll lock time: max 40ms */
+ mdelay(40);
+ }
+
+ reg = ak4671_read_reg_cache(codec,
+ AK4671_AD_DA_POWER_MANAGEMENT);
+ ak4671_write(codec, AK4671_AD_DA_POWER_MANAGEMENT,
+ reg | AK4671_PMVCM);
+ break;
+ case SND_SOC_BIAS_OFF:
+ if (ak4671->pll_on) {
+ reg = ak4671_read_reg_cache(codec,
+ AK4671_PLL_MODE_SELECT1);
+ reg &= ~AK4671_PMPLL;
+ ak4671_write(codec, AK4671_PLL_MODE_SELECT1, reg);
+ }
+
+ ak4671_write(codec, AK4671_AD_DA_POWER_MANAGEMENT, 0x00);
+ break;
+ }
+ codec->bias_level = level;
+ return 0;
+}
+
+#define AK4671_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\
+ SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |\
+ SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |\
+ SNDRV_PCM_RATE_48000)
+
+#define AK4671_FORMATS SNDRV_PCM_FMTBIT_S16_LE
+
+static struct snd_soc_dai_ops ak4671_dai_ops = {
+ .hw_params = ak4671_hw_params,
+ .set_sysclk = ak4671_set_dai_sysclk,
+ .set_fmt = ak4671_set_dai_fmt,
+
+ /* TODO */
+};
+
+struct snd_soc_dai ak4671_dai = {
+ .name = "AK4671",
+ .playback = {
+ .stream_name = "Playback",
+ .channels_min = 1,
+ .channels_max = 2,
+ .rates = AK4671_RATES,
+ .formats = AK4671_FORMATS,},
+ .capture = {
+ .stream_name = "Capture",
+ .channels_min = 1,
+ .channels_max = 2,
+ .rates = AK4671_RATES,
+ .formats = AK4671_FORMATS,},
+ .ops = &ak4671_dai_ops,
+};
+EXPORT_SYMBOL_GPL(ak4671_dai);
+
+static int ak4671_probe(struct platform_device *pdev)
+{
+ struct snd_soc_device *socdev = platform_get_drvdata(pdev);
+ struct snd_soc_codec *codec;
+ int ret = 0;
+
+ if (ak4671_codec == NULL) {
+ dev_err(&pdev->dev, "Codec device not registered\n");
+ return -ENODEV;
+ }
+
+ socdev->card->codec = ak4671_codec;
+ codec = ak4671_codec;
+
+ /* register pcms */
+ ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
+ if (ret < 0) {
+ dev_err(codec->dev, "failed to create pcms: %d\n", ret);
+ goto pcm_err;
+ }
+
+ snd_soc_add_controls(codec, ak4671_snd_controls,
+ ARRAY_SIZE(ak4671_snd_controls));
+ ak4671_add_widgets(codec);
+
+ ret = snd_soc_init_card(socdev);
+ if (ret < 0) {
+ dev_err(codec->dev, "failed to register card: %d\n", ret);
+ goto card_err;
+ }
+
+ ak4671_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
+
+ return ret;
+
+card_err:
+ snd_soc_free_pcms(socdev);
+ snd_soc_dapm_free(socdev);
+pcm_err:
+ return ret;
+}
+
+static int ak4671_remove(struct platform_device *pdev)
+{
+ struct snd_soc_device *socdev = platform_get_drvdata(pdev);
+
+ snd_soc_free_pcms(socdev);
+ snd_soc_dapm_free(socdev);
+
+ return 0;
+}
+
+#ifdef CONFIG_PM
+static int ak4671_suspend(struct platform_device *pdev, pm_message_t state)
+{
+ /* TODO */
+
+ return 0;
+}
+
+static int ak4671_resume(struct platform_device *pdev)
+{
+ /* TODO */
+
+ return 0;
+}
+#else
+#define ak4671_suspend NULL
+#define ak4671_resume NULL
+#endif
+
+struct snd_soc_codec_device soc_codec_dev_ak4671 = {
+ .probe = ak4671_probe,
+ .remove = ak4671_remove,
+ .suspend = ak4671_suspend,
+ .resume = ak4671_resume,
+};
+EXPORT_SYMBOL_GPL(soc_codec_dev_ak4671);
+
+static int ak4671_register(struct ak4671_priv *ak4671)
+{
+ int ret;
+ struct snd_soc_codec *codec = &ak4671->codec;
+
+ if (ak4671_codec) {
+ dev_err(codec->dev, "Another AK4671 is registered\n");
+ return -EINVAL;
+ }
+
+ mutex_init(&codec->mutex);
+ INIT_LIST_HEAD(&codec->dapm_widgets);
+ INIT_LIST_HEAD(&codec->dapm_paths);
+
+ codec->private_data = ak4671;
+ codec->name = "AK4671";
+ codec->owner = THIS_MODULE;
+ codec->read = ak4671_read_reg_cache;
+ codec->write = ak4671_write;
+ codec->bias_level = SND_SOC_BIAS_OFF;
+ codec->set_bias_level = ak4671_set_bias_level;
+ codec->dai = &ak4671_dai;
+ codec->num_dai = 1;
+ codec->reg_cache_size = AK4671_CACHEREGNUM;
+ codec->reg_cache = &ak4671->reg_cache;
+
+ memcpy(codec->reg_cache, ak4671_reg, sizeof(ak4671_reg));
+
+ ak4671_dai.dev = codec->dev;
+ ak4671_codec = codec;
+
+ ret = snd_soc_register_codec(codec);
+ if (ret != 0) {
+ dev_err(codec->dev, "Failed to register codec: %d\n", ret);
+ return ret;
+ }
+
+ ret = snd_soc_register_dai(&ak4671_dai);
+ if (ret != 0) {
+ dev_err(codec->dev, "Failed to register DAI: %d\n", ret);
+ snd_soc_unregister_codec(codec);
+ return ret;
+ }
+
+ return 0;
+}
+
+static void ak4671_unregister(struct ak4671_priv *ak4671)
+{
+ ak4671_set_bias_level(&ak4671->codec, SND_SOC_BIAS_OFF);
+ snd_soc_unregister_dai(&ak4671_dai);
+ snd_soc_unregister_codec(&ak4671->codec);
+ kfree(ak4671);
+ ak4671_codec = NULL;
+}
+
+static int __devinit ak4671_i2c_probe(struct i2c_client *client,
+ const struct i2c_device_id *id)
+{
+ struct ak4671_priv *ak4671;
+ struct snd_soc_codec *codec;
+
+ ak4671 = kzalloc(sizeof(struct ak4671_priv), GFP_KERNEL);
+ if (ak4671 == NULL)
+ return -ENOMEM;
+
+ codec = &ak4671->codec;
+ codec->hw_write = (hw_write_t)i2c_master_send;
+
+ i2c_set_clientdata(client, ak4671);
+ codec->control_data = client;
+
+ codec->dev = &client->dev;
+
+ return ak4671_register(ak4671);
+}
+
+static __devexit int ak4671_i2c_remove(struct i2c_client *client)
+{
+ struct ak4671_priv *ak4671 = i2c_get_clientdata(client);
+
+ ak4671_unregister(ak4671);
+
+ return 0;
+}
+
+static const struct i2c_device_id ak4671_i2c_id[] = {
+ { "ak4671", 0 },
+ { }
+};
+MODULE_DEVICE_TABLE(i2c, ak4671_i2c_id);
+
+static struct i2c_driver ak4671_i2c_driver = {
+ .driver = {
+ .name = "ak4671",
+ .owner = THIS_MODULE,
+ },
+ .probe = ak4671_i2c_probe,
+ .remove = __devexit_p(ak4671_i2c_remove),
+ .id_table = ak4671_i2c_id,
+};
+
+static int __init ak4671_init(void)
+{
+ return i2c_add_driver(&ak4671_i2c_driver);
+}
+module_init(ak4671_init);
+
+static void __exit ak4671_exit(void)
+{
+ i2c_del_driver(&ak4671_i2c_driver);
+}
+module_exit(ak4671_exit);
+
+MODULE_DESCRIPTION("ASoC AK4671 codec driver");
+MODULE_AUTHOR("Joonyoung Shim <jy0922.shim(a)samsung.com>");
+MODULE_LICENSE("GPL");
diff --git a/sound/soc/codecs/ak4671.h b/sound/soc/codecs/ak4671.h
new file mode 100644
index 0000000..e2fad96
--- /dev/null
+++ b/sound/soc/codecs/ak4671.h
@@ -0,0 +1,156 @@
+/*
+ * ak4671.h -- audio driver for AK4671
+ *
+ * Copyright (C) 2009 Samsung Electronics Co.Ltd
+ * Author: Joonyoung Shim <jy0922.shim(a)samsung.com>
+ *
+ * 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.
+ *
+ */
+
+#ifndef _AK4671_H
+#define _AK4671_H
+
+#define AK4671_AD_DA_POWER_MANAGEMENT 0x00
+#define AK4671_PLL_MODE_SELECT0 0x01
+#define AK4671_PLL_MODE_SELECT1 0x02
+#define AK4671_FORMAT_SELECT 0x03
+#define AK4671_MIC_SIGNAL_SELECT 0x04
+#define AK4671_MIC_AMP_GAIN 0x05
+#define AK4671_MIXING_POWER_MANAGEMENT0 0x06
+#define AK4671_MIXING_POWER_MANAGEMENT1 0x07
+#define AK4671_OUTPUT_VOLUME_CONTROL 0x08
+#define AK4671_LOUT1_SIGNAL_SELECT 0x09
+#define AK4671_ROUT1_SIGNAL_SELECT 0x0a
+#define AK4671_LOUT2_SIGNAL_SELECT 0x0b
+#define AK4671_ROUT2_SIGNAL_SELECT 0x0c
+#define AK4671_LOUT3_SIGNAL_SELECT 0x0d
+#define AK4671_ROUT3_SIGNAL_SELECT 0x0e
+#define AK4671_LOUT1_POWER_MANAGERMENT 0x0f
+#define AK4671_LOUT2_POWER_MANAGERMENT 0x10
+#define AK4671_LOUT3_POWER_MANAGERMENT 0x11
+#define AK4671_LCH_INPUT_VOLUME_CONTROL 0x12
+#define AK4671_RCH_INPUT_VOLUME_CONTROL 0x13
+#define AK4671_ALC_REFERENCE_SELECT 0x14
+#define AK4671_DIGITAL_MIXING_CONTROL 0x15
+#define AK4671_ALC_TIMER_SELECT 0x16
+#define AK4671_ALC_MODE_CONTROL 0x17
+#define AK4671_MODE_CONTROL1 0x18
+#define AK4671_MODE_CONTROL2 0x19
+#define AK4671_LCH_OUTPUT_VOLUME_CONTROL 0x1a
+#define AK4671_RCH_OUTPUT_VOLUME_CONTROL 0x1b
+#define AK4671_SIDETONE_A_CONTROL 0x1c
+#define AK4671_DIGITAL_FILTER_SELECT 0x1d
+#define AK4671_FIL3_COEFFICIENT0 0x1e
+#define AK4671_FIL3_COEFFICIENT1 0x1f
+#define AK4671_FIL3_COEFFICIENT2 0x20
+#define AK4671_FIL3_COEFFICIENT3 0x21
+#define AK4671_EQ_COEFFICIENT0 0x22
+#define AK4671_EQ_COEFFICIENT1 0x23
+#define AK4671_EQ_COEFFICIENT2 0x24
+#define AK4671_EQ_COEFFICIENT3 0x25
+#define AK4671_EQ_COEFFICIENT4 0x26
+#define AK4671_EQ_COEFFICIENT5 0x27
+#define AK4671_FIL1_COEFFICIENT0 0x28
+#define AK4671_FIL1_COEFFICIENT1 0x29
+#define AK4671_FIL1_COEFFICIENT2 0x2a
+#define AK4671_FIL1_COEFFICIENT3 0x2b
+#define AK4671_FIL2_COEFFICIENT0 0x2c
+#define AK4671_FIL2_COEFFICIENT1 0x2d
+#define AK4671_FIL2_COEFFICIENT2 0x2e
+#define AK4671_FIL2_COEFFICIENT3 0x2f
+#define AK4671_DIGITAL_FILTER_SELECT2 0x30
+#define AK4671_E1_COEFFICIENT0 0x32
+#define AK4671_E1_COEFFICIENT1 0x33
+#define AK4671_E1_COEFFICIENT2 0x34
+#define AK4671_E1_COEFFICIENT3 0x35
+#define AK4671_E1_COEFFICIENT4 0x36
+#define AK4671_E1_COEFFICIENT5 0x37
+#define AK4671_E2_COEFFICIENT0 0x38
+#define AK4671_E2_COEFFICIENT1 0x39
+#define AK4671_E2_COEFFICIENT2 0x3a
+#define AK4671_E2_COEFFICIENT3 0x3b
+#define AK4671_E2_COEFFICIENT4 0x3c
+#define AK4671_E2_COEFFICIENT5 0x3d
+#define AK4671_E3_COEFFICIENT0 0x3e
+#define AK4671_E3_COEFFICIENT1 0x3f
+#define AK4671_E3_COEFFICIENT2 0x40
+#define AK4671_E3_COEFFICIENT3 0x41
+#define AK4671_E3_COEFFICIENT4 0x42
+#define AK4671_E3_COEFFICIENT5 0x43
+#define AK4671_E4_COEFFICIENT0 0x44
+#define AK4671_E4_COEFFICIENT1 0x45
+#define AK4671_E4_COEFFICIENT2 0x46
+#define AK4671_E4_COEFFICIENT3 0x47
+#define AK4671_E4_COEFFICIENT4 0x48
+#define AK4671_E4_COEFFICIENT5 0x49
+#define AK4671_E5_COEFFICIENT0 0x4a
+#define AK4671_E5_COEFFICIENT1 0x4b
+#define AK4671_E5_COEFFICIENT2 0x4c
+#define AK4671_E5_COEFFICIENT3 0x4d
+#define AK4671_E5_COEFFICIENT4 0x4e
+#define AK4671_E5_COEFFICIENT5 0x4f
+#define AK4671_EQ_CONTROL_250HZ_100HZ 0x50
+#define AK4671_EQ_CONTROL_3500HZ_1KHZ 0x51
+#define AK4671_EQ_CONTRO_10KHZ 0x52
+#define AK4671_PCM_IF_CONTROL0 0x53
+#define AK4671_PCM_IF_CONTROL1 0x54
+#define AK4671_PCM_IF_CONTROL2 0x55
+#define AK4671_DIGITAL_VOLUME_B_CONTROL 0x56
+#define AK4671_DIGITAL_VOLUME_C_CONTROL 0x57
+#define AK4671_SIDETONE_VOLUME_CONTROL 0x58
+#define AK4671_DIGITAL_MIXING_CONTROL2 0x59
+#define AK4671_SAR_ADC_CONTROL 0x5a
+
+#define AK4671_CACHEREGNUM (AK4671_SAR_ADC_CONTROL + 1)
+
+/* Bitfield Definitions */
+
+/* AK4671_AD_DA_POWER_MANAGEMENT (0x00) Fields */
+#define AK4671_PMVCM 0x01
+
+/* AK4671_PLL_MODE_SELECT0 (0x01) Fields */
+#define AK4671_PLL 0x0f
+#define AK4671_PLL_11_2896MHZ (4 << 0)
+#define AK4671_PLL_12_288MHZ (5 << 0)
+#define AK4671_PLL_12MHZ (6 << 0)
+#define AK4671_PLL_24MHZ (7 << 0)
+#define AK4671_PLL_19_2MHZ (8 << 0)
+#define AK4671_PLL_13_5MHZ (12 << 0)
+#define AK4671_PLL_27MHZ (13 << 0)
+#define AK4671_PLL_13MHZ (14 << 0)
+#define AK4671_PLL_26MHZ (15 << 0)
+#define AK4671_FS 0xf0
+#define AK4671_FS_8KHZ (0 << 4)
+#define AK4671_FS_12KHZ (1 << 4)
+#define AK4671_FS_16KHZ (2 << 4)
+#define AK4671_FS_24KHZ (3 << 4)
+#define AK4671_FS_11_025KHZ (5 << 4)
+#define AK4671_FS_22_05KHZ (7 << 4)
+#define AK4671_FS_32KHZ (10 << 4)
+#define AK4671_FS_48KHZ (11 << 4)
+#define AK4671_FS_44_1KHZ (15 << 4)
+
+/* AK4671_PLL_MODE_SELECT1 (0x02) Fields */
+#define AK4671_PMPLL 0x01
+#define AK4671_M_S 0x02
+
+/* AK4671_FORMAT_SELECT (0x03) Fields */
+#define AK4671_DIF 0x03
+#define AK4671_DIF_DSP_MODE (0 << 0)
+#define AK4671_DIF_MSB_MODE (2 << 0)
+#define AK4671_DIF_I2S_MODE (3 << 0)
+#define AK4671_BCKP 0x04
+#define AK4671_MSBS 0x08
+#define AK4671_SDOD 0x10
+
+/* AK4671_LOUT2_POWER_MANAGEMENT (0x10) Fields */
+#define AK4671_MUTEN 0x04
+
+extern struct snd_soc_dai ak4671_dai;
+extern struct snd_soc_codec_device soc_codec_dev_ak4671;
+
+#endif
--
1.6.0.4
3
5

04 Sep '09
Hello,
Is there a way to reduce latency on audiocard if the dmix plugin is in
use?
I am asking because there is a strange problem with asistive
technologies which are outputing through alsa.
E. G. speech-dispatcher takes almost a half sec to stop the
speech-synthesizer.
If the user navigates quickly through menus, there are simultane outputs
at a time.
(tested with an usb logitech headset, snd-intel8x0 based card,
snd-hda-intel).
The same problem can be reproduced by running mplayer with alsa output
driver and pressing
quickly left/right arrow.
You should hear several samples at a time.
Using an sblive card which doesn't use dmix doesn't have such problems.
Using the dmix plugin should audio much faster to avoid this problem.
Please help!!!
Regards
Halim
2
8
On Fri, Sep 4, 2009 at 12:03 AM, Giovanni
Maruzzelli<gmaruzz.lists(a)gmail.com> wrote:
> I'll test it and report back here.
Still we have big problems....
Sep 4 00:35:45 localhost kernel: giovanni line: 306, pos=0,
jiffies=117963666, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:45 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117963719, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117963794, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117963794, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117963802, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117963802, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117963810, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117963810, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=0,
jiffies=117963847, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=0,
jiffies=117963847, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=64,
jiffies=117963851, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=64,
jiffies=117963851, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=128,
jiffies=117963855, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=128,
jiffies=117963855, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=0,
jiffies=117963922, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117963975, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117964050, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117964050, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117964058, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117964059, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117964066, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117964066, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=0,
jiffies=117964103, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=0,
jiffies=117964103, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=64,
jiffies=117964107, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=64,
jiffies=117964107, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=128,
jiffies=117964111, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=128,
jiffies=117964111, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=0,
jiffies=117964178, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117964231, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117964306, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117964306, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117964314, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117964314, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117964322, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117964322, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=0,
jiffies=117964359, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=0,
jiffies=117964359, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=64,
jiffies=117964363, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=64,
jiffies=117964363, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=128,
jiffies=117964367, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=128,
jiffies=117964367, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=0,
jiffies=117964434, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117964487, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117964562, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117964562, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117964570, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117964570, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2288,
jiffies=117964577, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2288,
jiffies=117964577, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=0,
jiffies=117964615, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=16,
jiffies=117964616, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=80,
jiffies=117964620, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=80,
jiffies=117964620, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=144,
jiffies=117964624, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=144,
jiffies=117964624, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=0,
jiffies=117964690, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:46 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117964743, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117964818, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117964818, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117964826, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117964826, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2288,
jiffies=117964833, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2288,
jiffies=117964833, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=0,
jiffies=117964871, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=0,
jiffies=117964871, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=64,
jiffies=117964875, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=64,
jiffies=117964875, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=112,
jiffies=117964878, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=128,
jiffies=117964879, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=128,
jiffies=117964879, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=0,
jiffies=117964946, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117964999, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117965074, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117965074, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117965082, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117965082, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117965090, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117965090, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=0,
jiffies=117965127, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=0,
jiffies=117965127, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=64,
jiffies=117965131, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=64,
jiffies=117965131, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=128,
jiffies=117965135, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=128,
jiffies=117965135, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=0,
jiffies=117965202, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117965255, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117965330, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117965330, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117965338, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117965338, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117965346, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117965346, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=0,
jiffies=117965383, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=0,
jiffies=117965383, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=64,
jiffies=117965387, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=64,
jiffies=117965387, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=128,
jiffies=117965391, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=128,
jiffies=117965391, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=0,
jiffies=117965458, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117965511, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117965586, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117965586, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117965594, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117965594, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117965603, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117965603, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=0,
jiffies=117965639, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=0,
jiffies=117965639, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=64,
jiffies=117965643, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=64,
jiffies=117965643, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=128,
jiffies=117965647, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=128,
jiffies=117965647, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=0,
jiffies=117965714, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:47 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117965767, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117965842, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117965842, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117965850, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117965850, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117965859, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117965859, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=0,
jiffies=117965895, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=0,
jiffies=117965895, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=64,
jiffies=117965899, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=64,
jiffies=117965899, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=128,
jiffies=117965903, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=128,
jiffies=117965903, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=0,
jiffies=117965970, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117966023, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117966098, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117966098, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117966106, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117966106, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117966115, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117966115, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=0,
jiffies=117966151, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=0,
jiffies=117966151, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=64,
jiffies=117966155, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=64,
jiffies=117966155, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=128,
jiffies=117966159, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=128,
jiffies=117966159, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=0,
jiffies=117966226, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117966279, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117966354, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117966354, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117966363, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117966363, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117966371, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117966371, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=0,
jiffies=117966407, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=0,
jiffies=117966407, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=64,
jiffies=117966411, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=64,
jiffies=117966411, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=128,
jiffies=117966415, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=128,
jiffies=117966415, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=0,
jiffies=117966482, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117966535, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117966610, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117966610, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117966619, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117966619, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117966627, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117966627, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=0,
jiffies=117966663, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=0,
jiffies=117966663, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=64,
jiffies=117966667, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=64,
jiffies=117966667, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=128,
jiffies=117966671, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=128,
jiffies=117966671, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:48 localhost kernel: giovanni line: 306, pos=0,
jiffies=117966738, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117966791, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117966866, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117966866, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117966875, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117966875, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2336,
jiffies=117966884, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2336,
jiffies=117966884, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=0,
jiffies=117966919, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=0,
jiffies=117966919, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=64,
jiffies=117966923, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=64,
jiffies=117966923, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=128,
jiffies=117966927, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=128,
jiffies=117966927, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=0,
jiffies=117966994, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117967047, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117967122, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117967122, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117967131, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117967131, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117967139, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117967139, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=0,
jiffies=117967175, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=0,
jiffies=117967175, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=48,
jiffies=117967178, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=64,
jiffies=117967179, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=112,
jiffies=117967182, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=112,
jiffies=117967182, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=0,
jiffies=117967250, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117967303, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117967378, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117967378, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2160,
jiffies=117967385, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2160,
jiffies=117967385, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117967394, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117967394, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=0,
jiffies=117967431, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=0,
jiffies=117967431, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=48,
jiffies=117967434, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=48,
jiffies=117967434, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=112,
jiffies=117967438, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=112,
jiffies=117967438, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=0,
jiffies=117967506, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117967559, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117967634, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117967634, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117967642, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117967643, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117967650, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117967650, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=0,
jiffies=117967687, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=0,
jiffies=117967687, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=48,
jiffies=117967690, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=64,
jiffies=117967691, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=112,
jiffies=117967694, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=112,
jiffies=117967694, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:49 localhost kernel: giovanni line: 306, pos=0,
jiffies=117967762, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117967815, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117967890, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117967890, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117967898, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117967898, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117967907, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117967907, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=0,
jiffies=117967943, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=0,
jiffies=117967943, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=48,
jiffies=117967946, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=64,
jiffies=117967947, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=112,
jiffies=117967950, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=112,
jiffies=117967950, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=0,
jiffies=117968018, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117968071, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117968146, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117968146, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117968154, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117968154, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117968163, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117968163, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=0,
jiffies=117968199, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=0,
jiffies=117968199, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=48,
jiffies=117968202, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=48,
jiffies=117968202, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=112,
jiffies=117968206, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=112,
jiffies=117968206, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=0,
jiffies=117968274, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117968327, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117968402, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117968402, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117968410, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117968410, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117968419, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117968419, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=0,
jiffies=117968455, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=0,
jiffies=117968455, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=48,
jiffies=117968458, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=64,
jiffies=117968459, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=112,
jiffies=117968462, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=112,
jiffies=117968462, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=0,
jiffies=117968530, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117968583, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117968658, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117968658, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117968666, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117968666, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117968674, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=2304,
jiffies=117968674, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=0,
jiffies=117968711, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=0,
jiffies=117968711, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=48,
jiffies=117968714, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=48,
jiffies=117968714, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=112,
jiffies=117968718, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:50 localhost kernel: giovanni line: 306, pos=112,
jiffies=117968718, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=0,
jiffies=117968786, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117968839, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117968914, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117968914, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117968923, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117968923, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117968931, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117968931, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=0,
jiffies=117968967, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=0,
jiffies=117968967, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=64,
jiffies=117968971, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=64,
jiffies=117968971, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=112,
jiffies=117968974, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=112,
jiffies=117968974, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=0,
jiffies=117969042, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117969095, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117969170, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117969170, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117969179, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2192,
jiffies=117969179, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117969187, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117969187, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=0,
jiffies=117969223, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=0,
jiffies=117969223, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=64,
jiffies=117969227, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=64,
jiffies=117969227, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=112,
jiffies=117969230, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=112,
jiffies=117969230, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=0,
jiffies=117969298, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117969351, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117969426, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117969426, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117969434, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117969434, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117969443, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117969443, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=0,
jiffies=117969479, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=0,
jiffies=117969479, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=64,
jiffies=117969483, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=64,
jiffies=117969483, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=128,
jiffies=117969487, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=128,
jiffies=117969487, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=0,
jiffies=117969554, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117969607, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117969682, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117969682, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117969690, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2176,
jiffies=117969690, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117969699, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=2320,
jiffies=117969699, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=0,
jiffies=117969735, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=0,
jiffies=117969735, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=64,
jiffies=117969739, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=64,
jiffies=117969739, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=112,
jiffies=117969742, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:51 localhost kernel: giovanni line: 306, pos=112,
jiffies=117969742, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:52 localhost kernel: giovanni line: 306, pos=0,
jiffies=117969810, buffer_size=4096, period_size=2048, rate=16000
Sep 4 00:35:52 localhost kernel: giovanni line: 306, pos=2048,
jiffies=117969863, buffer_size=4096, period_size=2048, rate=16000
1
0
[Forgot to add Cc to ML, added back now]
At Thu, 3 Sep 2009 21:52:54 +0200,
Giovanni Maruzzelli wrote:
>
> I had to modify a little the patch, so maybe I ruined it. My mods are
> marked with "giovanni".
Ah sorry, the patch was broken. I should have compile-tested.
The below is a revised one.
BTW, looking through your numbers:
> Sep 3 21:35:48 localhost kernel: giovanni line: 296,
> dpcm->frac_buf_pos / HZ=0, jiffies=107166054, buffer_size=4096,
> period_size=2048, rate=16000
> Sep 3 21:35:48 localhost kernel: giovanni line: 296,
> dpcm->frac_buf_pos / HZ=48, jiffies=107166057, buffer_size=4096,
> period_size=2048, rate=16000
> Sep 3 21:35:48 localhost kernel: giovanni line: 296,
> dpcm->frac_buf_pos / HZ=48, jiffies=107166057, buffer_size=4096,
> period_size=2048, rate=16000
> Sep 3 21:35:48 localhost kernel: giovanni line: 296,
> dpcm->frac_buf_pos / HZ=80, jiffies=107166059, buffer_size=4096,
> period_size=2048, rate=16000
> Sep 3 21:35:48 localhost kernel: giovanni line: 296,
> dpcm->frac_buf_pos / HZ=80, jiffies=107166059, buffer_size=4096,
> period_size=2048, rate=16000
> Sep 3 21:35:48 localhost kernel: giovanni line: 296,
> dpcm->frac_buf_pos / HZ=0, jiffies=107166133, buffer_size=4096,
> period_size=2048, rate=16000
Here, suddenly you get position 0. Then...
> Sep 3 21:35:48 localhost kernel: giovanni line: 296,
> dpcm->frac_buf_pos / HZ=2048, jiffies=107166182, buffer_size=4096,
> period_size=2048, rate=16000
Returning to the right position again. That can be an issue.
Takashi
---
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index 0a798bd..f08b9c8 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -207,19 +207,18 @@ struct dummy_systimer_pcm {
struct timer_list timer;
unsigned long base_time;
unsigned int frac_pos; /* fractional sample position (based HZ) */
+ unsigned int frac_period_rest;
unsigned int frac_buffer_size; /* buffer_size * HZ */
unsigned int frac_period_size; /* period_size * HZ */
unsigned int rate;
+ int elapsed;
struct snd_pcm_substream *substream;
};
static void dummy_systimer_rearm(struct dummy_systimer_pcm *dpcm)
{
- unsigned long frac;
-
- frac = dpcm->frac_pos % dpcm->frac_period_size;
dpcm->timer.expires = jiffies +
- (dpcm->frac_period_size + dpcm->rate - 1) / dpcm->rate;
+ (dpcm->frac_period_rest + dpcm->rate - 1) / dpcm->rate;
add_timer(&dpcm->timer);
}
@@ -230,10 +229,16 @@ static void dummy_systimer_update(struct dummy_systimer_pcm *dpcm)
delta = jiffies - dpcm->base_time;
if (!delta)
return;
- dpcm->base_time = jiffies;
- dpcm->frac_pos += delta * dpcm->rate;
+ dpcm->base_time += delta;
+ delta *= dpcm->rate;
+ dpcm->frac_pos += delta;
while (dpcm->frac_pos >= dpcm->frac_buffer_size)
dpcm->frac_pos -= dpcm->frac_buffer_size;
+ if (dpcm->frac_period_rest <= delta) {
+ dpcm->elapsed++;
+ dpcm->frac_period_rest += dpcm->frac_period_size;
+ }
+ dpcm->frac_period_rest -= delta;
}
static int dummy_systimer_start(struct snd_pcm_substream *substream)
@@ -264,6 +269,8 @@ static int dummy_systimer_prepare(struct snd_pcm_substream *substream)
dpcm->rate = runtime->rate;
dpcm->frac_buffer_size = runtime->buffer_size * HZ;
dpcm->frac_period_size = runtime->period_size * HZ;
+ dpcm->frac_period_rest = dpcm->frac_period_size;
+ dpcm->elapsed = 0;
return 0;
}
@@ -272,23 +279,29 @@ static void dummy_systimer_callback(unsigned long data)
{
struct dummy_systimer_pcm *dpcm = (struct dummy_systimer_pcm *)data;
unsigned long flags;
+ int elapsed = 0;
spin_lock_irqsave(&dpcm->lock, flags);
dummy_systimer_update(dpcm);
dummy_systimer_rearm(dpcm);
+ elapsed = dpcm->elapsed;
+ dpcm->elapsed = 0;
spin_unlock_irqrestore(&dpcm->lock, flags);
- snd_pcm_period_elapsed(dpcm->substream);
+ if (elapsed)
+ snd_pcm_period_elapsed(dpcm->substream);
}
static snd_pcm_uframes_t
dummy_systimer_pointer(struct snd_pcm_substream *substream)
{
struct dummy_systimer_pcm *dpcm = substream->runtime->private_data;
+ snd_pcm_uframes_t pos;
spin_lock(&dpcm->lock);
dummy_systimer_update(dpcm);
+ pos = dpcm->frac_pos / HZ;
spin_unlock(&dpcm->lock);
- return dpcm->frac_pos / HZ;
+ return pos;
}
static int dummy_systimer_create(struct snd_pcm_substream *substream)
2
1
On Thu, Sep 3, 2009 at 7:57 PM, Takashi Iwai<tiwai(a)suse.de> wrote:
>
> But, *what* is actually the problem? In your post, there was no clear
> description of the bug -- how is the behavior at all?
Problem is:
the channel driver uses Skype client, and uses an API call to make it
do audio I/O to tcp sockets (to listening sockets of the channel
driver itself).
*BUT* the Skype client insists to have a soundcard, probably for
getting its timing from.
Actually interfacing with an actual soundcard is taxing badly the cpu
(for dmix/dsnoop/plug overhead), takes irqs, and do not scale (you
cannot have 30 Skype clients happily sharing the same soundcard).
So for "heavy duty" it uses the snd-dummy.
It works perfectly, and scales very well, with the Ubuntu 8.04 kernel,
eg: a tickless 100HZ kernel.
It works perfectly on Centos is uses the other snd drivers.
It works perfectly on Centos with a compiled kernel like the Ubuntu 8.04 one.
It works very bad (with glitches, accumulating delays, hiccups, etc)
on Centos with the original Centos kernel (1000HZ, not tickless).
The ALSA unstable snapshot, and the first patch to it you sent me do
not solves the problem.
Now I will try the last patches you sent me today and report here.
Thanks a lot for your efforts,
-giovanni
1
1
Hi all,
I'm the maintainer of skypiax, a channel driver for FreeSWITCH and
Asterisk that allows to connect to the Skype network (eg:
http://wiki.freeswitch.org/wiki/Skypiax ).
I'm trying to use snd-dummy 1.0.20 as a fake soundcard on a regular
Centos installation (verified with both 5.2 and 5.3, fully updated).
I tested with both the packages "stable" from ATrpms.net and compiling
from the source of alsa-project.org.
It gives me bad timing to the program that depends on it (eg: Skype),
resulting in unacceptable behavior.
On the same machine, same Centos kernel and distro, if I use 1.0.20
snd-hda-intel or snd-usb, no problem.
On the same machine, snd_dummy with other distro, no problem.
On the same machine, same Centos, if I compile and install a kernel,
snd_dummy has no problem.
So, it's a specific problem of incompatibility between snd-dummy and
the kernel of Centos 5.2 and 5.3 (same kernels as in RHEL5).
I'm trying hard to find where the problem is, but I'm not having success.
Please please please, can someone have a look at it?
If more informations are needed, I'm willing to cooperate.
Thanks in advance,
-giovanni
3
20
Hi, Mark.
I have a target including the wolfson wm8994 codec chip, so i will
implement the wm8994 codec driver. I wonder if you have a plan to
implement it. I don't want a duplicate work.
Thank you.
2
1
Hardware Background
-------------------
ABE (Audio back end) IP on the OMAP4 SoC of TI provides digital
audio signal processing features (real-time mixing, equalization,
etc) on the media processor. ABE allows flexible routing of the
audio paths with dedicated equalizer and acoustics protection for
earphone/ headphone, hands-free and vibra paths. Typically the ABE
is connected to a companion analog audio chip via a dedicated McPDM
(multi-channel pulse density modulation) as show at
http://dev.omapzoom.org/?p=misael/kernel-audio.git;a=blob;f=sound/soc/codec…
;
Proposal
--------
On OMAP4, audio codec functionality is spread between ABE of OMAP4
and the companion analog audio chip. The interface between the ABE
and Phoenix audio chip is proprietary McPDM interface. The proposal
is to combine both ABE and Phoenix into a codec driver. OMAP4 ABE
also provides other links for routing digital processed data to
McBSP, McASP interfaces, which are at the same level as McPDM
interface.
+---------+ +---------------------+
ALSA Library --|ASOC Core|--|OMAP4 Platform Driver|
+---------+ +---------------------+
|
<DMA-DAI>
|
+-----------------------+
|ABE--<McPDM>--Phoenix--|--o Speaker/MIC
+-----------------------+
ABE provides a FIFO interface (similar to McBSP FIFO) and the audio
data transfer between the audio buffers and ABE FIFO is handled
through the CPU DAI. Handling of the McPDM interface between the
digital audio (ABE) and analog audio chip (Phoenix) is handled
internally in the codec driver as part of the codec DAI operations.
This RFC addresses the basic audio usecases using Phoenix companion
chip with the OMAP4 audio IP block. Support and configuration for
using different codecs (connectivity with BT/FM etc) using I2S/PCM
interfaces are targeted for future enhancements.
High Level Design
-----------------
Following are the files consisting of the TI OMAP4 audio driver:
sound/soc/omap/omap-pcm.c: This is the platform driver for OMAP
audio. It remains the same across all OMAP chip versions.
sound/soc/codecs/abe-twl6030.c: This is the codec driver interface
file for OMAP4 audio. It defines the codec DAIs for the HIFI,
voice and Vibra subdevices. Handles the configuration of Phoenix
companion chip using i2c control interface. Handles the
initialization and configuration of ABE. All codec related widget
controls are also handled in this file. Both, digital (ABE) and
analog (twl6030) widgets will be contained in this same driver.
sound/soc/codecs/abe/*: This folder contains the ABE specific
handlers. i.e reset, clock, configuration of ABE ports for
different stream inputs/outputs etc.
sound/soc/omap/oma-abe.c: This is the DAI driver towards the abe.
sound/soc/omap/sdp4430.c: This is the machine driver for SDP4430
and defines the stream connections.
Questions
---------
How to handle routing of digital audio from ABE to external devices
like Bluetooth/FM connectivity devices which are usually connected
using McBSP interfaces?. In these scenarios, we need another DAI
between the ABE (platform codec) and an external codec.
ABE(platform Codec (Digital) -----> Phoenix audio codec
|
|
+--> BT/FM codec
4
5
Please confirm the document.
++++ Attachment: No Virus found
++++ F-Secure AntiVirus - www.f-secure.com
1
0