Commit c8ead415 authored by Takashi Iwai's avatar Takashi Iwai

Merge tag 'asoc-v3.12-3' of...

Merge tag 'asoc-v3.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next

ASoC: Final updates for v3.12

A few final updates for v3.12 - some cleanups, a bug fix for ssm2602,
pop removal for rt5640 and fixes for the reporting of unidirectional
links in the MXS SGTL5000 driver.
parents 18e39186 5df498a2
...@@ -697,7 +697,6 @@ struct snd_soc_codec { ...@@ -697,7 +697,6 @@ struct snd_soc_codec {
unsigned int probed:1; /* Codec has been probed */ unsigned int probed:1; /* Codec has been probed */
unsigned int ac97_registered:1; /* Codec has been AC97 registered */ unsigned int ac97_registered:1; /* Codec has been AC97 registered */
unsigned int ac97_created:1; /* Codec has been created by SoC */ unsigned int ac97_created:1; /* Codec has been created by SoC */
unsigned int sysfs_registered:1; /* codec has been sysfs registered */
unsigned int cache_init:1; /* codec cache has been initialized */ unsigned int cache_init:1; /* codec cache has been initialized */
unsigned int using_regmap:1; /* using regmap access */ unsigned int using_regmap:1; /* using regmap access */
u32 cache_only; /* Suppress writes to hardware */ u32 cache_only; /* Suppress writes to hardware */
...@@ -705,7 +704,6 @@ struct snd_soc_codec { ...@@ -705,7 +704,6 @@ struct snd_soc_codec {
/* codec IO */ /* codec IO */
void *control_data; /* codec control (i2c/3wire) data */ void *control_data; /* codec control (i2c/3wire) data */
enum snd_soc_control_type control_type;
hw_write_t hw_write; hw_write_t hw_write;
unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int); unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int);
unsigned int (*read)(struct snd_soc_codec *, unsigned int); unsigned int (*read)(struct snd_soc_codec *, unsigned int);
...@@ -724,7 +722,6 @@ struct snd_soc_codec { ...@@ -724,7 +722,6 @@ struct snd_soc_codec {
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_codec_root; struct dentry *debugfs_codec_root;
struct dentry *debugfs_reg; struct dentry *debugfs_reg;
struct dentry *debugfs_dapm;
#endif #endif
}; };
...@@ -849,7 +846,6 @@ struct snd_soc_platform { ...@@ -849,7 +846,6 @@ struct snd_soc_platform {
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
struct dentry *debugfs_platform_root; struct dentry *debugfs_platform_root;
struct dentry *debugfs_dapm;
#endif #endif
}; };
...@@ -934,6 +930,10 @@ struct snd_soc_dai_link { ...@@ -934,6 +930,10 @@ struct snd_soc_dai_link {
/* machine stream operations */ /* machine stream operations */
const struct snd_soc_ops *ops; const struct snd_soc_ops *ops;
const struct snd_soc_compr_ops *compr_ops; const struct snd_soc_compr_ops *compr_ops;
/* For unidirectional dai links */
bool playback_only;
bool capture_only;
}; };
struct snd_soc_codec_conf { struct snd_soc_codec_conf {
......
This diff is collapsed.
...@@ -145,6 +145,8 @@ ...@@ -145,6 +145,8 @@
/* Index of Codec Private Register definition */ /* Index of Codec Private Register definition */
#define RT5640_CHPUMP_INT_REG1 0x24
#define RT5640_MAMP_INT_REG2 0x37
#define RT5640_3D_SPK 0x63 #define RT5640_3D_SPK 0x63
#define RT5640_WND_1 0x6c #define RT5640_WND_1 0x6c
#define RT5640_WND_2 0x6d #define RT5640_WND_2 0x6d
...@@ -153,6 +155,7 @@ ...@@ -153,6 +155,7 @@
#define RT5640_WND_5 0x70 #define RT5640_WND_5 0x70
#define RT5640_WND_8 0x73 #define RT5640_WND_8 0x73
#define RT5640_DIP_SPK_INF 0x75 #define RT5640_DIP_SPK_INF 0x75
#define RT5640_HP_DCC_INT1 0x77
#define RT5640_EQ_BW_LOP 0xa0 #define RT5640_EQ_BW_LOP 0xa0
#define RT5640_EQ_GN_LOP 0xa1 #define RT5640_EQ_GN_LOP 0xa1
#define RT5640_EQ_FC_BP1 0xa2 #define RT5640_EQ_FC_BP1 0xa2
...@@ -1201,6 +1204,14 @@ ...@@ -1201,6 +1204,14 @@
#define RT5640_CP_FQ2_SFT 4 #define RT5640_CP_FQ2_SFT 4
#define RT5640_CP_FQ3_MASK (0x7) #define RT5640_CP_FQ3_MASK (0x7)
#define RT5640_CP_FQ3_SFT 0 #define RT5640_CP_FQ3_SFT 0
#define RT5640_CP_FQ_1_5_KHZ 0
#define RT5640_CP_FQ_3_KHZ 1
#define RT5640_CP_FQ_6_KHZ 2
#define RT5640_CP_FQ_12_KHZ 3
#define RT5640_CP_FQ_24_KHZ 4
#define RT5640_CP_FQ_48_KHZ 5
#define RT5640_CP_FQ_96_KHZ 6
#define RT5640_CP_FQ_192_KHZ 7
/* HPOUT charge pump (0x91) */ /* HPOUT charge pump (0x91) */
#define RT5640_OSW_L_MASK (0x1 << 11) #define RT5640_OSW_L_MASK (0x1 << 11)
...@@ -2087,6 +2098,7 @@ struct rt5640_priv { ...@@ -2087,6 +2098,7 @@ struct rt5640_priv {
int pll_out; int pll_out;
int dmic_en; int dmic_en;
bool hp_mute;
}; };
#endif #endif
...@@ -561,8 +561,9 @@ static int ssm2602_suspend(struct snd_soc_codec *codec) ...@@ -561,8 +561,9 @@ static int ssm2602_suspend(struct snd_soc_codec *codec)
static int ssm2602_resume(struct snd_soc_codec *codec) static int ssm2602_resume(struct snd_soc_codec *codec)
{ {
snd_soc_cache_sync(codec); struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec);
regcache_sync(ssm2602->regmap);
ssm2602_set_bias_level(codec, SND_SOC_BIAS_STANDBY); ssm2602_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return 0; return 0;
......
...@@ -45,7 +45,7 @@ snd-soc-mx27vis-aic32x4-objs := mx27vis-aic32x4.o ...@@ -45,7 +45,7 @@ snd-soc-mx27vis-aic32x4-objs := mx27vis-aic32x4.o
snd-soc-wm1133-ev1-objs := wm1133-ev1.o snd-soc-wm1133-ev1-objs := wm1133-ev1.o
snd-soc-imx-sgtl5000-objs := imx-sgtl5000.o snd-soc-imx-sgtl5000-objs := imx-sgtl5000.o
snd-soc-imx-wm8962-objs := imx-wm8962.o snd-soc-imx-wm8962-objs := imx-wm8962.o
snd-soc-imx-spdif-objs :=imx-spdif.o snd-soc-imx-spdif-objs := imx-spdif.o
snd-soc-imx-mc13783-objs := imx-mc13783.o snd-soc-imx-mc13783-objs := imx-mc13783.o
obj-$(CONFIG_SND_SOC_EUKREA_TLV320) += snd-soc-eukrea-tlv320.o obj-$(CONFIG_SND_SOC_EUKREA_TLV320) += snd-soc-eukrea-tlv320.o
......
...@@ -411,8 +411,8 @@ static int spdif_set_sample_rate(struct snd_pcm_substream *substream, ...@@ -411,8 +411,8 @@ static int spdif_set_sample_rate(struct snd_pcm_substream *substream,
return 0; return 0;
} }
int fsl_spdif_startup(struct snd_pcm_substream *substream, static int fsl_spdif_startup(struct snd_pcm_substream *substream,
struct snd_soc_dai *cpu_dai) struct snd_soc_dai *cpu_dai)
{ {
struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_pcm_runtime *rtd = substream->private_data;
struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(rtd->cpu_dai); struct fsl_spdif_priv *spdif_priv = snd_soc_dai_get_drvdata(rtd->cpu_dai);
...@@ -546,7 +546,7 @@ static int fsl_spdif_trigger(struct snd_pcm_substream *substream, ...@@ -546,7 +546,7 @@ static int fsl_spdif_trigger(struct snd_pcm_substream *substream,
return 0; return 0;
} }
struct snd_soc_dai_ops fsl_spdif_dai_ops = { static struct snd_soc_dai_ops fsl_spdif_dai_ops = {
.startup = fsl_spdif_startup, .startup = fsl_spdif_startup,
.hw_params = fsl_spdif_hw_params, .hw_params = fsl_spdif_hw_params,
.trigger = fsl_spdif_trigger, .trigger = fsl_spdif_trigger,
...@@ -919,7 +919,7 @@ static int fsl_spdif_dai_probe(struct snd_soc_dai *dai) ...@@ -919,7 +919,7 @@ static int fsl_spdif_dai_probe(struct snd_soc_dai *dai)
return 0; return 0;
} }
struct snd_soc_dai_driver fsl_spdif_dai = { static struct snd_soc_dai_driver fsl_spdif_dai = {
.probe = &fsl_spdif_dai_probe, .probe = &fsl_spdif_dai_probe,
.playback = { .playback = {
.channels_min = 2, .channels_min = 2,
...@@ -1071,9 +1071,9 @@ static int fsl_spdif_probe_txclk(struct fsl_spdif_priv *spdif_priv, ...@@ -1071,9 +1071,9 @@ static int fsl_spdif_probe_txclk(struct fsl_spdif_priv *spdif_priv,
break; break;
} }
dev_dbg(&pdev->dev, "use rxtx%d as tx clock source for %dHz sample rate", dev_dbg(&pdev->dev, "use rxtx%d as tx clock source for %dHz sample rate\n",
spdif_priv->txclk_src[index], rate[index]); spdif_priv->txclk_src[index], rate[index]);
dev_dbg(&pdev->dev, "use divisor %d for %dHz sample rate", dev_dbg(&pdev->dev, "use divisor %d for %dHz sample rate\n",
spdif_priv->txclk_div[index], rate[index]); spdif_priv->txclk_div[index], rate[index]);
return 0; return 0;
......
...@@ -105,11 +105,13 @@ static struct snd_soc_dai_link mxs_sgtl5000_dai[] = { ...@@ -105,11 +105,13 @@ static struct snd_soc_dai_link mxs_sgtl5000_dai[] = {
.stream_name = "HiFi Playback", .stream_name = "HiFi Playback",
.codec_dai_name = "sgtl5000", .codec_dai_name = "sgtl5000",
.ops = &mxs_sgtl5000_hifi_ops, .ops = &mxs_sgtl5000_hifi_ops,
.playback_only = true,
}, { }, {
.name = "HiFi Rx", .name = "HiFi Rx",
.stream_name = "HiFi Capture", .stream_name = "HiFi Capture",
.codec_dai_name = "sgtl5000", .codec_dai_name = "sgtl5000",
.ops = &mxs_sgtl5000_hifi_ops, .ops = &mxs_sgtl5000_hifi_ops,
.capture_only = true,
}, },
}; };
......
...@@ -229,6 +229,8 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget, ...@@ -229,6 +229,8 @@ static int dapm_kcontrol_data_alloc(struct snd_soc_dapm_widget *widget,
template.id = snd_soc_dapm_kcontrol; template.id = snd_soc_dapm_kcontrol;
template.name = kcontrol->id.name; template.name = kcontrol->id.name;
data->value = template.on_val;
data->widget = snd_soc_dapm_new_control(widget->dapm, data->widget = snd_soc_dapm_new_control(widget->dapm,
&template); &template);
if (!data->widget) { if (!data->widget) {
......
...@@ -2020,6 +2020,16 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num) ...@@ -2020,6 +2020,16 @@ int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
capture = 1; capture = 1;
} }
if (rtd->dai_link->playback_only) {
playback = 1;
capture = 0;
}
if (rtd->dai_link->capture_only) {
playback = 0;
capture = 1;
}
/* create the PCM */ /* create the PCM */
if (rtd->dai_link->no_pcm) { if (rtd->dai_link->no_pcm) {
snprintf(new_name, sizeof(new_name), "(%s)", snprintf(new_name, sizeof(new_name), "(%s)",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment