aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/mc1n2/mc1n2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/mc1n2/mc1n2.c')
-rw-r--r--sound/soc/codecs/mc1n2/mc1n2.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/sound/soc/codecs/mc1n2/mc1n2.c b/sound/soc/codecs/mc1n2/mc1n2.c
index 975f40b..17dbefa 100644
--- a/sound/soc/codecs/mc1n2/mc1n2.c
+++ b/sound/soc/codecs/mc1n2/mc1n2.c
@@ -149,6 +149,7 @@ struct mc1n2_data {
MCDRV_PDM_INFO pdm_store;
UINT32 hdmicount;
UINT32 delay_mic1in;
+ UINT32 lineoutenable;
};
struct mc1n2_info_store {
@@ -666,6 +667,12 @@ static int mc1n2_i2s_hw_params(struct snd_pcm_substream *substream,
}
#endif
+/* Because of line out pop up noise issue, i2s port already opend */
+ if ((mc1n2->lineoutenable == 1) && (port->stream & (1 << dir))) {
+ err = 0;
+ goto error;
+ }
+
port->rate = rate;
port->channels = params_channels(params);
@@ -739,6 +746,12 @@ static int mc1n2_hw_free(struct snd_pcm_substream *substream,
}
#endif
+/* Because of line out pop up noise, leave codec opened */
+ if (mc1n2->lineoutenable == 1) {
+ err = 0;
+ goto error;
+ }
+
if (dir == SNDRV_PCM_STREAM_PLAYBACK) {
err = mc1n2_control_dir(mc1n2, get_port_id(dai->id), 0);
} else {
@@ -3777,6 +3790,12 @@ static int mc1n2_hwdep_ioctl_notify(struct snd_soc_codec *codec,
(mc1n2->hdmicount)--;
}
break;
+ case MCDRV_NOTIFY_LINEOUT_START:
+ mc1n2->lineoutenable = 1;
+ break;
+ case MCDRV_NOTIFY_LINEOUT_STOP:
+ mc1n2->lineoutenable = 0;
+ break;
case MCDRV_NOTIFY_RECOVER:
{
int err, i;
@@ -4335,7 +4354,7 @@ static int mc1n2_i2c_probe(struct i2c_client *client,
#endif
mc1n2->hdmicount = 0;
-
+ mc1n2->lineoutenable = 0;
mc1n2->pdata = client->dev.platform_data;
/* setup i2c client data */
@@ -4449,7 +4468,6 @@ static int mc1n2_i2c_remove(struct i2c_client *client)
return 0;
}
-#ifdef CONFIG_TARGET_LOCALE_KOR
/*
* Function to prevent tick-noise when reboot menu selected.
* if you have Power-Off sound and same problem, use this function
@@ -4521,7 +4539,6 @@ error:
return;
}
-#endif
static const struct i2c_device_id mc1n2_i2c_id[] = {
{MC1N2_NAME, 0},
@@ -4536,9 +4553,7 @@ static struct i2c_driver mc1n2_i2c_driver = {
},
.probe = mc1n2_i2c_probe,
.remove = mc1n2_i2c_remove,
-#ifdef CONFIG_TARGET_LOCALE_KOR
.shutdown = mc1n2_i2c_shutdown,
-#endif
.id_table = mc1n2_i2c_id,
};