ASoC updates
Subsystems (6)
cover ASoC updates
The following changes since commit 682d5874f3d654b5d13d9b8dd56b9e05cfadd01b:
Takashi Iwai (1):
ALSA: ASoC: Fix old-style trigger callback in s3c2443-ac97.c
are available in the git repository at:
git://opensource.wolfsonmicro.com/linux-2.6-asoc for-tiwai
Mark Brown (4):
ASoC: Rename snd_soc_register_card() to snd_soc_init_card()
ASoC: Annotate core removal function
ASoC: Remove in-code changelog from AD73311 driver
ASoC: Don't free static data in WM9713
Peter Ujfalusi (3):
ASoC: TWL4030: Change the capture volume control to TLV
ASoC: TWL4030: Change the common playback volume controls
ASoC: TWL4030: Add volume controls for outputs
include/sound/soc.h | 2 +- sound/soc/codecs/ac97.c | 2 +- sound/soc/codecs/ad1980.c | 2 +- sound/soc/codecs/ad73311.c | 5 +-- sound/soc/codecs/ak4535.c | 2 +- sound/soc/codecs/cs4270.c | 2 +- sound/soc/codecs/pcm3008.c | 2 +- sound/soc/codecs/ssm2602.c | 2 +- sound/soc/codecs/tlv320aic23.c | 2 +- sound/soc/codecs/tlv320aic26.c | 2 +- sound/soc/codecs/tlv320aic3x.c | 2 +- sound/soc/codecs/twl4030.c | 74 +++++++++++++++++++++++++++++++++------ sound/soc/codecs/uda134x.c | 2 +- sound/soc/codecs/uda1380.c | 2 +- sound/soc/codecs/wm8510.c | 2 +- sound/soc/codecs/wm8580.c | 2 +- sound/soc/codecs/wm8728.c | 2 +- sound/soc/codecs/wm8731.c | 2 +- sound/soc/codecs/wm8750.c | 2 +- sound/soc/codecs/wm8753.c | 2 +- sound/soc/codecs/wm8900.c | 2 +- sound/soc/codecs/wm8903.c | 2 +- sound/soc/codecs/wm8971.c | 2 +- sound/soc/codecs/wm8990.c | 2 +- sound/soc/codecs/wm9712.c | 2 +- sound/soc/codecs/wm9713.c | 3 +- sound/soc/soc-core.c | 8 ++-- 27 files changed, 91 insertions(+), 45 deletions(-)
PATCH 1/7 ASoC: Rename snd_soc_register_card() to snd_soc_init_card()
Currently ASoC card initialisation is completed by a function called snd_soc_register_card(). As part of the work to allow independant registration of cards, codecs and machines in ASoC v2 a new function of the same name has been added so rename the existing function to facilitate the merge of v2.
--- include/sound/soc.h | 2 +- sound/soc/codecs/ac97.c | 2 +- sound/soc/codecs/ad1980.c | 2 +- sound/soc/codecs/ad73311.c | 2 +- sound/soc/codecs/ak4535.c | 2 +- sound/soc/codecs/cs4270.c | 2 +- sound/soc/codecs/pcm3008.c | 2 +- sound/soc/codecs/ssm2602.c | 2 +- sound/soc/codecs/tlv320aic23.c | 2 +- sound/soc/codecs/tlv320aic26.c | 2 +- sound/soc/codecs/tlv320aic3x.c | 2 +- sound/soc/codecs/twl4030.c | 2 +- sound/soc/codecs/uda134x.c | 2 +- sound/soc/codecs/uda1380.c | 2 +- sound/soc/codecs/wm8510.c | 2 +- sound/soc/codecs/wm8580.c | 2 +- sound/soc/codecs/wm8728.c | 2 +- sound/soc/codecs/wm8731.c | 2 +- sound/soc/codecs/wm8750.c | 2 +- sound/soc/codecs/wm8753.c | 2 +- sound/soc/codecs/wm8900.c | 2 +- sound/soc/codecs/wm8903.c | 2 +- sound/soc/codecs/wm8971.c | 2 +- sound/soc/codecs/wm8990.c | 2 +- sound/soc/codecs/wm9712.c | 2 +- sound/soc/codecs/wm9713.c | 2 +- sound/soc/soc-core.c | 6 +++--- 27 files changed, 29 insertions(+), 29 deletions(-)
include/sound/soc.h +1 -1
@@ -162,7 +162,7 @@ extern struct snd_ac97_bus_ops soc_ac97_ops;/* pcm <-> DAI connect */ void snd_soc_free_pcms (struct snd_soc_device *socdev);int snd_soc_new_pcms (struct snd_soc_device *socdev,int idx,const char *xid); -int snd_soc_register_card (struct snd_soc_device *socdev); +int snd_soc_init_card (struct snd_soc_device *socdev);/* set runtime hw params */ int snd_soc_set_runtime_hwparams(struct snd_pcm_substream *substream,
sound/soc/codecs/ac97.c +1 -1
@@ -114,7 +114,7 @@ static int ac97_soc_probe(struct platform_device *pdev)if (ret <0 ) goto bus_err; - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) goto bus_err;return 0 ;
sound/soc/codecs/ad1980.c +1 -1
@@ -270,7 +270,7 @@ static int ad1980_soc_probe(struct platform_device *pdev)ac97_write (codec,AC97_EXTENDED_STATUS , ext_status&~0x3800 );ad1980_add_controls (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "ad1980: failed to register card\n" ); goto reset_err;
sound/soc/codecs/ad73311.c +1 -1
@@ -67,7 +67,7 @@ static int ad73311_soc_probe(struct platform_device *pdev) goto pcm_err; } - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "ad73311: failed to register card\n" ); goto register_err;
sound/soc/codecs/ak4535.c +1 -1
@@ -512,7 +512,7 @@ static int ak4535_init(struct snd_soc_device *socdev)ak4535_add_controls (codec);ak4535_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "ak4535: failed to register card\n" ); goto card_err;
sound/soc/codecs/cs4270.c +1 -1
@@ -723,7 +723,7 @@ static int cs4270_probe(struct platform_device *pdev)printk (KERN_INFO "cs4270: I2C disabled, using stand-alone mode\n" );#endif - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "cs4270: failed to register card\n" ); goto error_del_driver;
sound/soc/codecs/pcm3008.c +1 -1
@@ -91,7 +91,7 @@ static int pcm3008_soc_probe(struct platform_device *pdev) }/* Register Card. */ - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "pcm3008: failed to register card\n" ); goto card_err;
sound/soc/codecs/ssm2602.c +1 -1
@@ -624,7 +624,7 @@ static int ssm2602_init(struct snd_soc_device *socdev)ssm2602_add_controls (codec);ssm2602_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {pr_err ("ssm2602: failed to register card\n" ); goto card_err;
sound/soc/codecs/tlv320aic23.c +1 -1
@@ -720,7 +720,7 @@ static int tlv320aic23_init(struct snd_soc_device *socdev)tlv320aic23_add_controls (codec);tlv320aic23_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "tlv320aic23: failed to register card\n" ); goto card_err;
sound/soc/codecs/tlv320aic26.c +1 -1
@@ -359,7 +359,7 @@ static int aic26_probe(struct platform_device *pdev)/* CODEC is setup, we can register the card now */ dev_dbg (&pdev->dev,"Registering card\n" ); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {dev_err (&pdev->dev,"aic26: failed to register card\n" ); goto card_err;
sound/soc/codecs/tlv320aic3x.c +1 -1
@@ -1187,7 +1187,7 @@ static int aic3x_init(struct snd_soc_device *socdev)aic3x_add_controls (codec);aic3x_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "aic3x: failed to register card\n" ); goto card_err;
sound/soc/codecs/twl4030.c +1 -1
@@ -764,7 +764,7 @@ static int twl4030_init(struct snd_soc_device *socdev)twl4030_add_controls (codec);twl4030_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "twl4030: failed to register card\n" ); goto card_err;
sound/soc/codecs/uda134x.c +1 -1
@@ -578,7 +578,7 @@ static int uda134x_soc_probe(struct platform_device *pdev) goto pcm_err; } - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "UDA134X: failed to register card\n" ); goto card_err;
sound/soc/codecs/uda1380.c +1 -1
@@ -677,7 +677,7 @@ static int uda1380_init(struct snd_soc_device *socdev, int dac_clk)/* uda1380 init */ uda1380_add_controls (codec);uda1380_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {pr_err ("uda1380: failed to register card\n" ); goto card_err;
sound/soc/codecs/wm8510.c +1 -1
@@ -658,7 +658,7 @@ static int wm8510_init(struct snd_soc_device *socdev)wm8510_set_bias_level (codec,SND_SOC_BIAS_STANDBY );wm8510_add_controls (codec);wm8510_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "wm8510: failed to register card\n" ); goto card_err;
sound/soc/codecs/wm8580.c +1 -1
@@ -869,7 +869,7 @@ static int wm8580_init(struct snd_soc_device *socdev)wm8580_add_controls (codec);wm8580_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "wm8580: failed to register card\n" ); goto card_err;
sound/soc/codecs/wm8728.c +1 -1
@@ -332,7 +332,7 @@ static int wm8728_init(struct snd_soc_device *socdev)wm8728_add_controls (codec);wm8728_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "wm8728: failed to register card\n" ); goto card_err;
sound/soc/codecs/wm8731.c +1 -1
@@ -545,7 +545,7 @@ static int wm8731_init(struct snd_soc_device *socdev)wm8731_add_controls (codec);wm8731_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "wm8731: failed to register card\n" ); goto card_err;
sound/soc/codecs/wm8750.c +1 -1
@@ -818,7 +818,7 @@ static int wm8750_init(struct snd_soc_device *socdev)wm8750_add_controls (codec);wm8750_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "wm8750: failed to register card\n" ); goto card_err;
sound/soc/codecs/wm8753.c +1 -1
@@ -1605,7 +1605,7 @@ static int wm8753_init(struct snd_soc_device *socdev)wm8753_add_controls (codec);wm8753_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "wm8753: failed to register card\n" ); goto card_err;
sound/soc/codecs/wm8900.c +1 -1
@@ -1365,7 +1365,7 @@ static int wm8900_init(struct snd_soc_device *socdev)wm8900_add_controls (codec);wm8900_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {dev_err (&i2c_client->dev,"Failed to register card\n" ); goto card_err;
sound/soc/codecs/wm8903.c +1 -1
@@ -1648,7 +1648,7 @@ static int wm8903_init(struct snd_soc_device *socdev)wm8903_add_controls (codec);wm8903_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {dev_err (&i2c->dev,"wm8903: failed to register card\n" ); goto card_err;
sound/soc/codecs/wm8971.c +1 -1
@@ -747,7 +747,7 @@ static int wm8971_init(struct snd_soc_device *socdev)wm8971_add_controls (codec);wm8971_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "wm8971: failed to register card\n" ); goto card_err;
sound/soc/codecs/wm8990.c +1 -1
@@ -1462,7 +1462,7 @@ static int wm8990_init(struct snd_soc_device *socdev)wm8990_add_controls (codec);wm8990_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "wm8990: failed to register card\n" ); goto card_err;
sound/soc/codecs/wm9712.c +1 -1
@@ -700,7 +700,7 @@ static int wm9712_soc_probe(struct platform_device *pdev)wm9712_set_bias_level (codec,SND_SOC_BIAS_STANDBY );wm9712_add_controls (codec);wm9712_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) {printk (KERN_ERR "wm9712: failed to register card\n" ); goto reset_err;
sound/soc/codecs/wm9713.c +1 -1
@@ -1247,7 +1247,7 @@ static int wm9713_soc_probe(struct platform_device *pdev)wm9713_add_controls (codec);wm9713_add_widgets (codec); - ret =snd_soc_register_card (socdev); + ret =snd_soc_init_card (socdev);if (ret <0 ) goto reset_err;return 0 ;
sound/soc/soc-core.c +3 -3
@@ -1233,7 +1233,7 @@ int snd_soc_new_pcms(struct snd_soc_device *socdev, int idx, const char *xid)EXPORT_SYMBOL_GPL (snd_soc_new_pcms);/** -* snd_soc_register_card - register sound card +* snd_soc_init_card - register sound card * @socdev: the SoC audio device * * Register a SoC sound card. Also registers an AC97 device if the
@@ -1241,7 +1241,7 @@ EXPORT_SYMBOL_GPL(snd_soc_new_pcms);* * Returns 0 for success, else error. */ -int snd_soc_register_card (struct snd_soc_device *socdev) +int snd_soc_init_card (struct snd_soc_device *socdev) {struct snd_soc_codec *codec = socdev->codec;struct snd_soc_card *card = socdev->card;
@@ -1298,7 +1298,7 @@ int snd_soc_register_card(struct snd_soc_device *socdev) out:return ret; } -EXPORT_SYMBOL_GPL (snd_soc_register_card); +EXPORT_SYMBOL_GPL (snd_soc_init_card);/** * snd_soc_free_pcms - free sound card and pcms
Signature · 1 line
1.5.6.5
PATCH 2/7 ASoC: Annotate core removal function
--- sound/soc/soc-core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sound/soc/soc-core.c +1 -1
@@ -1952,7 +1952,7 @@ static int __devinit snd_soc_init(void)return platform_driver_register (&soc_driver); } -static void snd_soc_exit (void ) +static void __exit snd_soc_exit(void) {platform_driver_unregister (&soc_driver); }
Signature · 1 line
1.5.6.5
PATCH 3/7 ASoC: Remove in-code changelog from AD73311 driver
--- sound/soc/codecs/ad73311.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
sound/soc/codecs/ad73311.c +0 -3
@@ -8,9 +8,6 @@* 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. -* -* Revision history -* 25th Sep 2008 Initial version. */ #include <linux/init.h>
Signature · 1 line
1.5.6.5
PATCH 4/7 ASoC: TWL4030: Change the capture volume control to TLV
From: Peter Ujfalusi <[email protected]>
The digital Capture gain control has a range:
0 to 31 dB in 1 dB steps.
--- sound/soc/codecs/twl4030.c | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-)
sound/soc/codecs/twl4030.c +11 -3
@@ -360,6 +360,12 @@ static DECLARE_TLV_DB_SCALE(master_tlv, -6300, 100, 1);*/ static DECLARE_TLV_DB_SCALE(master_coarse_tlv, 0, 600, 0); +/* +* Capture gain after the ADCs +* from 0 dB to 31 dB in 1 dB steps +*/ +static DECLARE_TLV_DB_SCALE(digital_capture_tlv, 0, 100, 0); +static const struct snd_kcontrol_new twl4030_snd_controls[] = { SOC_DOUBLE_R_TLV("Master Playback Volume", TWL4030_REG_ARXL2PGA, TWL4030_REG_ARXR2PGA,
@@ -367,9 +373,11 @@ static const struct snd_kcontrol_new twl4030_snd_controls[] = {SOC_DOUBLE_R_TLV ("Master PCM Playback Volume" ,TWL4030_REG_ARXL2PGA ,TWL4030_REG_ARXR2PGA ,6 ,0x2 ,0 , master_coarse_tlv), -SOC_DOUBLE_R ("Capture Volume" , -TWL4030_REG_ATXL1PGA ,TWL4030_REG_ATXR1PGA , - 0, 0x1f, 0), + +/* Common capture gain controls */ +SOC_DOUBLE_R_TLV ("Capture Volume" , +TWL4030_REG_ATXL1PGA ,TWL4030_REG_ATXR1PGA , + 0, 0x1f, 0, digital_capture_tlv), };/* add non dapm controls */
Signature · 1 line
1.5.6.5
PATCH 5/7 ASoC: TWL4030: Change the common playback volume controls
From: Peter Ujfalusi <[email protected]>
Add Playback volume controls for all four DACs. All four paths has three levels of volume controls:
Digital Fine gain, Digital Coarse gain, Analog gain.
The controls are named to reflect their connection to the DACs. Per DAC volume can be performed, if needed:
amixer sset 'DAC1 Analog' 5,10
DACL1 analog gain to 5
DACR1 analog gain to 10
--- sound/soc/codecs/twl4030.c | 37 +++++++++++++++++++++++++++++-------- 1 files changed, 29 insertions(+), 8 deletions(-)
sound/soc/codecs/twl4030.c +29 -8
@@ -351,14 +351,20 @@ static int snd_soc_put_volsw_r2_twl4030(struct snd_kcontrol *kcontrol,* FGAIN volume control: * from -62 to 0 dB in 1 dB steps (mute instead of -63 dB) */ -static DECLARE_TLV_DB_SCALE(master_tlv, -6300, 100, 1); +static DECLARE_TLV_DB_SCALE(digital_fine_tlv, -6300, 100, 1);/* * CGAIN volume control: * 0 dB to 12 dB in 6 dB steps * value 2 and 3 means 12 dB */ -static DECLARE_TLV_DB_SCALE(master_coarse_tlv, 0, 600, 0); +static DECLARE_TLV_DB_SCALE(digital_coarse_tlv, 0, 600, 0); + +/* +* Analog playback gain +* -24 dB to 12 dB in 2 dB steps +*/ +static DECLARE_TLV_DB_SCALE(analog_tlv, -2400, 200, 0);/* * Capture gain after the ADCs
@@ -367,12 +373,27 @@ static DECLARE_TLV_DB_SCALE(master_coarse_tlv, 0, 600, 0); static DECLARE_TLV_DB_SCALE(digital_capture_tlv, 0, 100, 0);static const struct snd_kcontrol_new twl4030_snd_controls[] = { -SOC_DOUBLE_R_TLV ("Master Playback Volume" , -TWL4030_REG_ARXL2PGA ,TWL4030_REG_ARXR2PGA , -0 ,0x3f ,0 , master_tlv), -SOC_DOUBLE_R_TLV ("Master PCM Playback Volume" , -TWL4030_REG_ARXL2PGA ,TWL4030_REG_ARXR2PGA , -6 ,0x2 ,0 , master_coarse_tlv), +/* Common playback gain controls */ +SOC_DOUBLE_R_TLV ("DAC1 Digital Fine Playback Volume" , +TWL4030_REG_ARXL1PGA ,TWL4030_REG_ARXR1PGA , +0 ,0x3f ,0 , digital_fine_tlv), +SOC_DOUBLE_R_TLV ("DAC2 Digital Fine Playback Volume" , +TWL4030_REG_ARXL2PGA ,TWL4030_REG_ARXR2PGA , +0 ,0x3f ,0 , digital_fine_tlv), + +SOC_DOUBLE_R_TLV ("DAC1 Digital Coarse Playback Volume" , +TWL4030_REG_ARXL1PGA ,TWL4030_REG_ARXR1PGA , +6 ,0x2 ,0 , digital_coarse_tlv), +SOC_DOUBLE_R_TLV ("DAC2 Digital Coarse Playback Volume" , +TWL4030_REG_ARXL2PGA ,TWL4030_REG_ARXR2PGA , +6 ,0x2 ,0 , digital_coarse_tlv), + +SOC_DOUBLE_R_TLV ("DAC1 Analog Playback Volume" , +TWL4030_REG_ARXL1_APGA_CTL ,TWL4030_REG_ARXR1_APGA_CTL , +3 ,0x12 ,1 , analog_tlv), +SOC_DOUBLE_R_TLV ("DAC2 Analog Playback Volume" , +TWL4030_REG_ARXL2_APGA_CTL ,TWL4030_REG_ARXR2_APGA_CTL , +3 ,0x12 ,1 , analog_tlv),/* Common capture gain controls */ SOC_DOUBLE_R_TLV("Capture Volume",
Signature · 1 line
1.5.6.5
PATCH 6/7 ASoC: TWL4030: Add volume controls for outputs
From: Peter Ujfalusi <[email protected]>
All outputs have dedicated gain controls except the HandsFree output.
--- sound/soc/codecs/twl4030.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-)
sound/soc/codecs/twl4030.c +21 -0
@@ -367,6 +367,12 @@ static DECLARE_TLV_DB_SCALE(digital_coarse_tlv, 0, 600, 0); static DECLARE_TLV_DB_SCALE(analog_tlv, -2400, 200, 0);/* +* Gain controls tied to outputs +* -6 dB to 6 dB in 6 dB steps (mute instead of -12) +*/ +static DECLARE_TLV_DB_SCALE(output_tvl, -1200, 600, 1); + +/* * Capture gain after the ADCs * from 0 dB to 31 dB in 1 dB steps */
@@ -395,6 +401,21 @@ static const struct snd_kcontrol_new twl4030_snd_controls[] = { TWL4030_REG_ARXL2_APGA_CTL, TWL4030_REG_ARXR2_APGA_CTL, 3, 0x12, 1, analog_tlv), +/* Separate output gain controls */ +SOC_DOUBLE_R_TLV_TWL4030 ("PreDriv Playback Volume" , +TWL4030_REG_PREDL_CTL ,TWL4030_REG_PREDR_CTL , +4 ,3 ,0 , output_tvl), + +SOC_DOUBLE_TLV_TWL4030 ("Headset Playback Volume" , +TWL4030_REG_HS_GAIN_SET ,0 ,2 ,3 ,0 , output_tvl), + +SOC_DOUBLE_R_TLV_TWL4030 ("Carkit Playback Volume" , +TWL4030_REG_PRECKL_CTL ,TWL4030_REG_PRECKR_CTL , +4 ,3 ,0 , output_tvl), + +SOC_SINGLE_TLV_TWL4030 ("Earpiece Playback Volume" , +TWL4030_REG_EAR_CTL ,4 ,3 ,0 , output_tvl), +/* Common capture gain controls */ SOC_DOUBLE_R_TLV("Capture Volume", TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA,
Signature · 1 line
1.5.6.5
PATCH 7/7 ASoC: Don't free static data in WM9713
--- sound/soc/codecs/wm9713.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
sound/soc/codecs/wm9713.c +0 -1
@@ -1283,7 +1283,6 @@ static int wm9713_soc_remove(struct platform_device *pdev)snd_soc_free_ac97_codec (codec);kfree (codec->private_data);kfree (codec->reg_cache); -kfree (codec->dai);kfree (codec);return 0 ; }
Signature · 1 line
1.5.6.5
Re: [PATCH 6/7] ASoC: TWL4030: Add volume controls for outputs
In reply to Mark BrownQuoted 30 lines · Mark Brown
From: Peter Ujfalusi <[email protected]>
All outputs have dedicated gain controls except the HandsFree output.
Signed-off-by Peter Ujfalusi <[email protected]>Signed-off-by Mark Brown <[email protected]>--- sound/soc/codecs/twl4030.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-)sound/soc/codecs/twl4030.c +6
-0@@ -367,6 +367,12 @@ static DECLARE_TLV_DB_SCALE(digital_coarse_tlv, 0, 600, 0); static DECLARE_TLV_DB_SCALE(analog_tlv, -2400, 200, 0);/* +* Gain controls tied to outputs +* -6 dB to 6 dB in 6 dB steps (mute instead of -12) +*/ +static DECLARE_TLV_DB_SCALE(output_tvl, -1200, 600, 1); + +/* * Capture gain after the ADCs * from 0 dB to 31 dB in 1 dB steps */
sound/soc/codecs/twl4030.c static const struct snd_kcontrol_new · line 408
Quoted 8 lines
sound/soc/codecs/twl4030.c +4
-0@@ -395,6 +401,21 @@ static const struct snd_kcontrol_new twl4030_snd_controls[] = { TWL4030_REG_ARXL2_APGA_CTL, TWL4030_REG_ARXR2_APGA_CTL, 3, 0x12, 1, analog_tlv), +/* Separate output gain controls */ +SOC_DOUBLE_R_TLV_TWL4030 ("" , +TWL4030_REG_PREDL_CTL ,TWL4030_REG_PREDR_CTL , + 4, 3, 0, output_tvl),
With this implementation the
#amixer cset numid=16 3
numid=16,iface=MIXER,name='PreDriv Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=209,step=0 : values=3,3
| dBscale-min=-12.00dB,step=6.00dB,mute=1
The min and max values are from 0 to 209 and they r repeating for every 4 steps
Can any one explain this
sound/soc/codecs/twl4030.c static const struct snd_kcontrol_new twl4030_snd_controls[] = { · line 410
Quoted 4 lines
sound/soc/codecs/twl4030.c +3
-0+ +SOC_DOUBLE_TLV_TWL4030 ("Headset Playback Volume" , + TWL4030_REG_HS_GAIN_SET, 0, 2, 3, 0, output_tvl),
With this implementation the min and max values seems to be shown like 0 to 60 instead of 0 to 3
and the range is repeatring between 0 to 60
Means 4 again 0 and 7 a bit max, its repeating..
Quoted 12 lines
sound/soc/codecs/twl4030.c +8
-0+ +SOC_DOUBLE_R_TLV_TWL4030 ("Carkit Playback Volume" , +TWL4030_REG_PRECKL_CTL ,TWL4030_REG_PRECKR_CTL , +4 ,3 ,0 , output_tvl), + +SOC_SINGLE_TLV_TWL4030 ("Earpiece Playback Volume" , +TWL4030_REG_EAR_CTL ,4 ,3 ,0 , output_tvl), +/* Common capture gain controls */ SOC_DOUBLE_R_TLV("Capture Volume",TWL4030_REG_ATXL1PGA, TWL4030_REG_ATXR1PGA,
Quoted 8 lines
--
1.5.6.5_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
Thanks ,,
(: Naveen Krishna Ch :)
Re: [PATCH 6/7] ASoC: TWL4030: Add volume controls for outputs
Quoted 3 lines · naveen krishna ch
The min and max values are from 0 to 209 and they r repeating for every 4 steps
Can any one explain this
Does this patch help?
sound/soc/codecs/twl4030.c +1 -1
@@ -223,7 +223,7 @@ static void twl4030_init_chip(struct snd_soc_codec *codec) .put = snd_soc_put_volsw_r2_twl4030, \ .private_value = (unsigned long)&(struct soc_mixer_control) \ {.reg = reg_left, .rreg = reg_right, .shift = xshift, \ - .max = xmax, .invert = xinvert} } + .rshift = xshift, .max = xmax, .invert = xinvert} }#define SOC_SINGLE_TLV_TWL4030 (xname, xreg, xshift, xmax, xinvert, tlv_array) \ SOC_DOUBLE_TLV_TWL4030(xname, xreg, xshift, xshift, xmax, \ xinvert, tlv_array)
Re: [PATCH 6/7] ASoC: TWL4030: Add volume controls for outputs
Quoted 21 lines · Mark Brown
Quoted 3 lines · naveen krishna ch
The min and max values are from 0 to 209 and they r repeating for every 4 steps
Can any one explain thisDoes this patch help?
sound/soc/codecs/twl4030.c +1
-1@@ -223,7 +223,7 @@ static void twl4030_init_chip(struct snd_soc_codec *codec) .put = snd_soc_put_volsw_r2_twl4030, \ .private_value = (unsigned long )&(struct soc_mixer_control ) \ {.reg = reg_left, .rreg = reg_right, .shift = xshift, \ - .max = xmax, .invert = xinvert} } + .rshift = xshift, .max = xmax, .invert = xinvert} }#define SOC_SINGLE_TLV_TWL4030 (xname, xreg, xshift, xmax, xinvert, tlv_array) \
Quoted 2 lines
SOC_DOUBLE_TLV_TWL4030(xname, xreg, xshift, xshift, xmax, \
xinvert, tlv_array)I am afraid But it dint help.
The desired affect is repeating itself between 0 to 60 range.
Signature · 3 lines
Thanks, (: Naveen Krishna Ch :)
Re: [PATCH 6/7] ASoC: TWL4030: Add volume controls for outputs
In reply to naveen krishna chHello,
interesting...
Quoted 9 lines · On Friday 05 December 2008 06:44:35 ext naveen krishna ch wrote:
On Tue, Dec 2, 2008 at 1:37 AM, Mark Brown
<[email protected]> wrote:With this implementation the
#amixer cset numid=16 3 numid=16,iface=MIXER,name='PreDriv Playback Volume'
; type=INTEGER,access=rw---R--,values=2,min=0,max=209,step=0
Quoted 7 lines
: values=3,3
:
| dBscale-min=-12.00dB,step=6.00dB,mute=1Thanks ,,
(: Naveen Krishna Ch :)
I have other patches on top of that, so the numid is different, but it gives:
# amixer cset numid=7 3 numid=7,iface=MIXER,name='PreDriv Playback Volume' ; type=INTEGER,access=rw---R--,values=2,min=0,max=3,step=0 : values=3,3 | dBscale-min=-12.00dB,step=6.00dB,mute=1
Signature · 1 line
Péter
At Mon, 1 Dec 2008 20:07:03 +0000,
Quoted 8 lines · Mark Brown
The following changes since commit
682d5874f3d654b5d13d9b8dd56b9e05cfadd01b:
Takashi Iwai (1):
ALSA: ASoC: Fix old-style trigger callback ins3c2443-ac97.care available in the git repository at:
git://opensource.wolfsonmicro.com/linux-2.6-asocfor-tiwai
Pulled now. Thanks.
Takashi
Quoted 41 lines
Mark Brown (4):
ASoC: Renamesnd_soc_register_card()tosnd_soc_init_card()
ASoC: Annotate core removal function
ASoC: Remove in-code changelog from AD73311 driver
ASoC: Don't free static data in WM9713Peter Ujfalusi (3):
ASoC: TWL4030: Change the capture volume control to TLV
ASoC: TWL4030: Change the common playback volume controls
ASoC: TWL4030: Add volume controls for outputsinclude/sound/soc.h | 2 +- sound/soc/codecs/ac97.c | 2 +- sound/soc/codecs/ad1980.c | 2 +- sound/soc/codecs/ad73311.c | 5 +-- sound/soc/codecs/ak4535.c | 2 +- sound/soc/codecs/cs4270.c | 2 +- sound/soc/codecs/pcm3008.c | 2 +- sound/soc/codecs/ssm2602.c | 2 +- sound/soc/codecs/tlv320aic23.c | 2 +- sound/soc/codecs/tlv320aic26.c | 2 +- sound/soc/codecs/tlv320aic3x.c | 2 +- sound/soc/codecs/twl4030.c | 74 +++++++++++++++++++++++++++++++++------ sound/soc/codecs/uda134x.c | 2 +- sound/soc/codecs/uda1380.c | 2 +- sound/soc/codecs/wm8510.c | 2 +- sound/soc/codecs/wm8580.c | 2 +- sound/soc/codecs/wm8728.c | 2 +- sound/soc/codecs/wm8731.c | 2 +- sound/soc/codecs/wm8750.c | 2 +- sound/soc/codecs/wm8753.c | 2 +- sound/soc/codecs/wm8900.c | 2 +- sound/soc/codecs/wm8903.c | 2 +- sound/soc/codecs/wm8971.c | 2 +- sound/soc/codecs/wm8990.c | 2 +- sound/soc/codecs/wm9712.c | 2 +- sound/soc/codecs/wm9713.c | 3 +- sound/soc/soc-core.c | 8 ++-- 27 files changed, 91 insertions(+), 45 deletions(-)