From 7a79e94e973639da7bf1b8242d504f9db9e5e848 Mon Sep 17 00:00:00 2001 From: Bill Pemberton Date: Fri, 7 Dec 2012 09:26:37 -0500 Subject: ASoC: codecs: remove __dev* attributes CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton Signed-off-by: Mark Brown --- sound/soc/codecs/sgtl5000.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sound/soc/codecs/sgtl5000.c') diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index df2f99d..cb1675c 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -1404,8 +1404,8 @@ static struct snd_soc_codec_driver sgtl5000_driver = { .num_dapm_routes = ARRAY_SIZE(sgtl5000_dapm_routes), }; -static __devinit int sgtl5000_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int sgtl5000_i2c_probe(struct i2c_client *client, + const struct i2c_device_id *id) { struct sgtl5000_priv *sgtl5000; int ret; @@ -1422,7 +1422,7 @@ static __devinit int sgtl5000_i2c_probe(struct i2c_client *client, return ret; } -static __devexit int sgtl5000_i2c_remove(struct i2c_client *client) +static int sgtl5000_i2c_remove(struct i2c_client *client) { snd_soc_unregister_codec(&client->dev); @@ -1449,7 +1449,7 @@ static struct i2c_driver sgtl5000_i2c_driver = { .of_match_table = sgtl5000_dt_ids, }, .probe = sgtl5000_i2c_probe, - .remove = __devexit_p(sgtl5000_i2c_remove), + .remove = sgtl5000_i2c_remove, .id_table = sgtl5000_id, }; -- cgit v1.1 From b50684da6cd5a9ec47ea5556bc9f5461c1d7017c Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sun, 23 Dec 2012 15:45:31 -0200 Subject: ASoC: sgtl5000: Fix maximum value for microphone gain sgtl5000 microphone gain only has 2 bits of resolution, so maximum value is 3. From Eric Nelson: "We also found that for the microphones we have here (commodity PC boom mics) a default value of 2 for the gain gives the best results." So change the default microphone gain as well. Signed-off-by: Eric Nelson Signed-off-by: Fabio Estevam Signed-off-by: Mark Brown --- sound/soc/codecs/sgtl5000.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/soc/codecs/sgtl5000.c') diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index cb1675c..92bbfec 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -401,7 +401,7 @@ static const struct snd_kcontrol_new sgtl5000_snd_controls[] = { 5, 1, 0), SOC_SINGLE_TLV("Mic Volume", SGTL5000_CHIP_MIC_CTRL, - 0, 4, 0, mic_gain_tlv), + 0, 3, 0, mic_gain_tlv), }; /* mute the codec used by alsa core */ @@ -1344,7 +1344,7 @@ static int sgtl5000_probe(struct snd_soc_codec *codec) SGTL5000_HP_ZCD_EN | SGTL5000_ADC_ZCD_EN); - snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 0); + snd_soc_write(codec, SGTL5000_CHIP_MIC_CTRL, 2); /* * disable DAP -- cgit v1.1