ASoC updates
Subsystems (10)
cover ASoC updates
The following changes since commit 0ecfe7987855d21c2a89ffe003ddf0ee11b42d47:
Mark Brown (1):
ASoC: Don't free static data in WM9713
are available in the git repository at:
git://opensource.wolfsonmicro.com/linux-2.6-asoc for-tiwai
Daniel Mack (1):
ASoC: tlv320aic3x: headset/button press support
Grazvydas Ignotas (1):
ASoC: TWL4030: Add input selection and gain controls
Mark Brown (3):
ASoC: Push workqueue data into snd_soc_card
ASoC: Push platform registration down into the card
ASoC: Fix WM8903 right mixer bypass path
include/sound/soc.h | 9 +- sound/soc/atmel/playpaq_wm8510.c | 2 +- sound/soc/atmel/sam9g20_wm8731.c | 2 +- sound/soc/blackfin/bf5xx-ad1980.c | 2 +- sound/soc/blackfin/bf5xx-ad73311.c | 2 +- sound/soc/blackfin/bf5xx-ssm2602.c | 2 +- sound/soc/codecs/tlv320aic3x.c | 31 ++++++- sound/soc/codecs/tlv320aic3x.h | 46 +++++++++- sound/soc/codecs/twl4030.c | 177 +++++++++++++++++++++++++++++++++- sound/soc/codecs/twl4030.h | 16 +++ sound/soc/codecs/wm8903.c | 8 +- sound/soc/davinci/davinci-evm.c | 2 +- sound/soc/davinci/davinci-i2s.c | 2 +- sound/soc/davinci/davinci-sffsdr.c | 2 +- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/soc-of-simple.c | 2 +- sound/soc/omap/n810.c | 2 +- sound/soc/omap/omap2evm.c | 2 +- sound/soc/omap/omap3beagle.c | 2 +- sound/soc/omap/osk5912.c | 2 +- sound/soc/omap/overo.c | 2 +- sound/soc/omap/sdp3430.c | 2 +- sound/soc/pxa/corgi.c | 2 +- sound/soc/pxa/e800_wm9712.c | 2 +- sound/soc/pxa/em-x270.c | 2 +- sound/soc/pxa/palm27x.c | 2 +- sound/soc/pxa/poodle.c | 2 +- sound/soc/pxa/spitz.c | 2 +- sound/soc/pxa/tosa.c | 2 +- sound/soc/pxa/zylonite.c | 2 +- sound/soc/s3c24xx/ln2440sbc_alc650.c | 2 +- sound/soc/s3c24xx/neo1973_wm8753.c | 2 +- sound/soc/s3c24xx/s3c24xx_uda134x.c | 2 +- sound/soc/s3c24xx/smdk2443_wm9710.c | 2 +- sound/soc/sh/sh7760-ac97.c | 2 +- sound/soc/soc-core.c | 77 +++++++++------ 36 files changed, 348 insertions(+), 74 deletions(-)
PATCH 1/5 ASoC: Push workqueue data into snd_soc_card
ASoC v2 does not use the struct snd_soc_device at runtime, using struct snd_soc_card as the root of the card. Begin removing data from snd_soc_device by pushing the workqueue data into snd_soc_card, using a backpointer to the snd_soc_device to keep things going for the time being.
--- include/sound/soc.h | 7 +++++-- sound/soc/soc-core.c | 33 ++++++++++++++++++++------------- 2 files changed, 25 insertions(+), 15 deletions(-)
include/sound/soc.h +5 -2
@@ -349,6 +349,11 @@ struct snd_soc_card {/* CPU <--> Codec DAI links */ struct snd_soc_dai_link *dai_link;int num_links; + +struct snd_soc_device *socdev; + +struct delayed_work delayed_work; +struct work_struct deferred_resume_work; };/* SoC Device - the audio subsystem */
@@ -358,8 +363,6 @@ struct snd_soc_device {struct snd_soc_platform *platform;struct snd_soc_codec *codec;struct snd_soc_codec_device *codec_dev; -struct delayed_work delayed_work; -struct work_struct deferred_resume_work;void *codec_data;#ifdef CONFIG_DEBUG_FS struct dentry *debugfs_root;
sound/soc/soc-core.c +20 -13
@@ -247,8 +247,9 @@ out:*/ static void close_delayed_work (struct work_struct *work) { -struct snd_soc_device *socdev = - container_of(work, struct snd_soc_device, delayed_work.work); + struct snd_soc_card *card = container_of(work, struct snd_soc_card, + delayed_work.work); +struct snd_soc_device *socdev = card->socdev;struct snd_soc_codec *codec = socdev->codec;struct snd_soc_dai *codec_dai;int i;
@@ -299,6 +300,7 @@ static int soc_codec_close(struct snd_pcm_substream *substream) {struct snd_soc_pcm_runtime *rtd = substream->private_data;struct snd_soc_device *socdev = rtd->socdev; +struct snd_soc_card *card = socdev->card;struct snd_soc_dai_link *machine = rtd->dai;struct snd_soc_platform *platform = socdev->platform;struct snd_soc_dai *cpu_dai = machine->cpu_dai;
@@ -340,7 +342,7 @@ static int soc_codec_close(struct snd_pcm_substream *substream)if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) {/* start delayed pop wq here for playback streams */ codec_dai->pop_wait =1 ; -schedule_delayed_work (&socdev->delayed_work, +schedule_delayed_work (&card->delayed_work,msecs_to_jiffies (pmdown_time)); }else {/* capture streams can be powered down now */
@@ -366,6 +368,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream) {struct snd_soc_pcm_runtime *rtd = substream->private_data;struct snd_soc_device *socdev = rtd->socdev; +struct snd_soc_card *card = socdev->card;struct snd_soc_dai_link *machine = rtd->dai;struct snd_soc_platform *platform = socdev->platform;struct snd_soc_dai *cpu_dai = machine->cpu_dai;
@@ -411,7 +414,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK && codec_dai->pop_wait) { codec_dai->pop_wait =0 ; -cancel_delayed_work (&socdev->delayed_work); +cancel_delayed_work (&card->delayed_work); }/* do we need to power up codec */
@@ -645,7 +648,7 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state) }/* close any waiting streams and save state */ -run_delayed_work (&socdev->delayed_work); +run_delayed_work (&card->delayed_work); codec->suspend_bias_level = codec->bias_level;for (i =0 ; i < codec->num_dai; i++) {
@@ -679,10 +682,10 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state)*/ static void soc_resume_deferred (struct work_struct *work) { -struct snd_soc_device *socdev =container_of (work, - struct snd_soc_device, - deferred_resume_work); -struct snd_soc_card *card = socdev->card; +struct snd_soc_card *card =container_of (work, + struct snd_soc_card, + deferred_resume_work); +struct snd_soc_device *socdev = card->socdev;struct snd_soc_platform *platform = socdev->platform;struct snd_soc_codec_device *codec_dev = socdev->codec_dev;struct snd_soc_codec *codec = socdev->codec;
@@ -746,10 +749,11 @@ static void soc_resume_deferred(struct work_struct *work)static int soc_resume (struct platform_device *pdev) {struct snd_soc_device *socdev =platform_get_drvdata (pdev); +struct snd_soc_card *card = socdev->card;dev_dbg (socdev->dev,"scheduling resume work\n" ); -if (!schedule_work (&socdev->deferred_resume_work)) +if (!schedule_work (&card->deferred_resume_work))dev_err (socdev->dev,"resume work item may be lost\n" );return 0 ;
@@ -769,6 +773,9 @@ static int soc_probe(struct platform_device *pdev)struct snd_soc_platform *platform = socdev->platform;struct snd_soc_codec_device *codec_dev = socdev->codec_dev; +/* Bodge while we push things out of socdev */ + card->socdev = socdev; +if (card->probe) { ret = card->probe (pdev);if (ret <0 )
@@ -797,10 +804,10 @@ static int soc_probe(struct platform_device *pdev) }/* DAPM stream work */ -INIT_DELAYED_WORK (&socdev->delayed_work, close_delayed_work); +INIT_DELAYED_WORK (&card->delayed_work, close_delayed_work);#ifdef CONFIG_PM /* deferred resume work */ -INIT_WORK (&socdev->deferred_resume_work, soc_resume_deferred); +INIT_WORK (&card->deferred_resume_work, soc_resume_deferred);#endif return 0 ;
@@ -831,7 +838,7 @@ static int soc_remove(struct platform_device *pdev)struct snd_soc_platform *platform = socdev->platform;struct snd_soc_codec_device *codec_dev = socdev->codec_dev; -run_delayed_work (&socdev->delayed_work); +run_delayed_work (&card->delayed_work);if (platform->remove) platform->remove (pdev);
Signature · 1 line
1.5.6.5
PATCH 1/1 leds: Add WM8350 LED driver
The voltage and current regulators on the WM8350 AudioPlus PMIC can be used in concert to provide a power efficient LED driver. This driver implements support for this within the standard LED class.
Platform initialisation code should configure the LED hardware in the init callback provided by the WM8350 core driver. The callback should use wm8350_isink_set_flash(), wm8350_dcdc25_set_mode() and wm8350_dcdc_set_slot() to configure the operating parameters of the regulators for their hardware and then then use wm8350_register_led() to instantiate the LED driver.
This driver was originally written by Liam Girdwood, though it has been extensively modified since then.
--- drivers/leds/Kconfig | 7 + drivers/leds/Makefile | 1 + drivers/leds/leds-wm8350.c | 333 ++++++++++++++++++++++++++++++++++ drivers/mfd/wm8350-core.c | 3 + drivers/regulator/wm8350-regulator.c | 91 +++++++++ include/linux/mfd/wm8350/pmic.h | 36 ++++ 6 files changed, 471 insertions(+), 0 deletions(-) create mode 100644 drivers/leds/leds-wm8350.c
drivers/leds/Kconfig +7 -0
@@ -158,6 +158,13 @@ config LEDS_PCA955X LED driver chips accessed via the I2C bus. Supported devices include PCA9550, PCA9551, PCA9552, and PCA9553. +config LEDS_WM8350 + tristate "LED Support for WM8350 AudioPlus PMIC" + depends on LEDS_CLASS && MFD_WM8350 + help + This option enables support for LEDs driven by the Wolfson + Microelectronics WM8350 AudioPlus PMIC. + config LEDS_DA903X tristate "LED Support for DA9030/DA9034 PMIC" depends on LEDS_CLASS && PMIC_DA903X
drivers/leds/Makefile +1 -0
@@ -23,6 +23,7 @@ obj-$(CONFIG_LEDS_FSG) += leds-fsg.o obj-$(CONFIG_LEDS_PCA955X) += leds-pca955x.o obj-$(CONFIG_LEDS_DA903X) += leds-da903x.o obj-$(CONFIG_LEDS_HP_DISK) += leds-hp-disk.o +obj-$(CONFIG_LEDS_WM8350) += leds-wm8350.o # LED Triggers obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
drivers/leds/leds-wm8350.c new file +333 -0
333 lines not on this page · raw message
drivers/mfd/wm8350-core.c +3 -0
@@ -1257,6 +1257,9 @@ void wm8350_device_exit(struct wm8350 *wm8350) {int i; +for (i =0 ; i <ARRAY_SIZE (wm8350->pmic.led); i++) +platform_device_unregister (wm8350->pmic.led[i].pdev); +for (i =0 ; i <ARRAY_SIZE (wm8350->pmic.pdev); i++)platform_device_unregister (wm8350->pmic.pdev[i]);
drivers/regulator/wm8350-regulator.c +91 -0
97 lines not on this page · raw message
include/linux/mfd/wm8350/pmic.h +36 -0
@@ -13,6 +13,10 @@#ifndef __LINUX_MFD_WM8350_PMIC_H#define __LINUX_MFD_WM8350_PMIC_H +#include <linux/platform_device.h> +#include <linux/leds.h> +#include <linux/regulator/machine.h> +/* * Register values. */
@@ -700,6 +704,33 @@ struct wm8350;struct platform_device ;struct regulator_init_data ; +/* +* WM8350 LED platform data +*/ +struct wm8350_led_platform_data { +const char *name; +const char *default_trigger; +int max_uA; +}; + +struct wm8350_led { +struct platform_device *pdev; +struct mutex mutex; +struct work_struct work; +spinlock_t value_lock; +enum led_brightness value; +struct led_classdev cdev; +int max_uA_index; +int enabled; + +struct regulator *isink; +struct regulator_consumer_supply isink_consumer; +struct regulator_init_data isink_init; +struct regulator *dcdc; +struct regulator_consumer_supply dcdc_consumer; +struct regulator_init_data dcdc_init; +}; +struct wm8350_pmic {/* ISINK to DCDC mapping */ int isink_A_dcdc;
@@ -713,10 +744,15 @@ struct wm8350_pmic {/* regulator devices */ struct platform_device *pdev[NUM_WM8350_REGULATORS ]; + +/* LED devices */ +struct wm8350_led led[2 ]; };int wm8350_register_regulator (struct wm8350 *wm8350,int reg,struct regulator_init_data *initdata); +int wm8350_register_led (struct wm8350 *wm8350,int lednum,int dcdc,int isink, +struct wm8350_led_platform_data *pdata);/* * Additional DCDC control not supported via regulator API
Signature · 1 line
1.5.6.5
PATCH 2/5 ASoC: Push platform registration down into the card
As part of the deprecation of snd_soc_device push the registration of the platform down into the card structure.
--- include/sound/soc.h | 2 +- sound/soc/atmel/playpaq_wm8510.c | 2 +- sound/soc/atmel/sam9g20_wm8731.c | 2 +- sound/soc/blackfin/bf5xx-ad1980.c | 2 +- sound/soc/blackfin/bf5xx-ad73311.c | 2 +- sound/soc/blackfin/bf5xx-ssm2602.c | 2 +- sound/soc/davinci/davinci-evm.c | 2 +- sound/soc/davinci/davinci-i2s.c | 2 +- sound/soc/davinci/davinci-sffsdr.c | 2 +- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/soc-of-simple.c | 2 +- sound/soc/omap/n810.c | 2 +- sound/soc/omap/omap2evm.c | 2 +- sound/soc/omap/omap3beagle.c | 2 +- sound/soc/omap/osk5912.c | 2 +- sound/soc/omap/overo.c | 2 +- sound/soc/omap/sdp3430.c | 2 +- sound/soc/pxa/corgi.c | 2 +- sound/soc/pxa/e800_wm9712.c | 2 +- sound/soc/pxa/em-x270.c | 2 +- sound/soc/pxa/palm27x.c | 2 +- sound/soc/pxa/poodle.c | 2 +- sound/soc/pxa/spitz.c | 2 +- sound/soc/pxa/tosa.c | 2 +- sound/soc/pxa/zylonite.c | 2 +- sound/soc/s3c24xx/ln2440sbc_alc650.c | 2 +- sound/soc/s3c24xx/neo1973_wm8753.c | 2 +- sound/soc/s3c24xx/s3c24xx_uda134x.c | 2 +- sound/soc/s3c24xx/smdk2443_wm9710.c | 2 +- sound/soc/sh/sh7760-ac97.c | 2 +- sound/soc/soc-core.c | 44 +++++++++++++++++++-------------- 31 files changed, 55 insertions(+), 49 deletions(-)
include/sound/soc.h +1 -1
@@ -352,6 +352,7 @@ struct snd_soc_card {struct snd_soc_device *socdev; +struct snd_soc_platform *platform;struct delayed_work delayed_work;struct work_struct deferred_resume_work; };
@@ -360,7 +361,6 @@ struct snd_soc_card {struct snd_soc_device {struct device *dev;struct snd_soc_card *card; -struct snd_soc_platform *platform;struct snd_soc_codec *codec;struct snd_soc_codec_device *codec_dev;void *codec_data;
sound/soc/atmel/playpaq_wm8510.c +1 -1
@@ -363,6 +363,7 @@ static struct snd_soc_dai_link playpaq_wm8510_dai = {static struct snd_soc_card snd_soc_playpaq = { .name ="LRS_PlayPaq_WM8510" , + .platform = &at32_soc_platform, .dai_link = &playpaq_wm8510_dai, .num_links =1 , };
@@ -378,7 +379,6 @@ static struct wm8510_setup_data playpaq_wm8510_setup = {static struct snd_soc_device playpaq_wm8510_snd_devdata = { .card = &snd_soc_playpaq, - .platform = &at32_soc_platform, .codec_dev = &soc_codec_dev_wm8510, .codec_data = &playpaq_wm8510_setup, };
sound/soc/atmel/sam9g20_wm8731.c +1 -1
@@ -244,6 +244,7 @@ static struct snd_soc_dai_link at91sam9g20ek_dai = {static struct snd_soc_card snd_soc_at91sam9g20ek = { .name ="WM8731" , + .platform = &atmel_soc_platform, .dai_link = &at91sam9g20ek_dai, .num_links =1 , };
@@ -255,7 +256,6 @@ static struct wm8731_setup_data at91sam9g20ek_wm8731_setup = {static struct snd_soc_device at91sam9g20ek_snd_devdata = { .card = &snd_soc_at91sam9g20ek, - .platform = &atmel_soc_platform, .codec_dev = &soc_codec_dev_wm8731, .codec_data = &at91sam9g20ek_wm8731_setup, };
sound/soc/blackfin/bf5xx-ad1980.c +1 -1
@@ -69,13 +69,13 @@ static struct snd_soc_dai_link bf5xx_board_dai = {static struct snd_soc_card bf5xx_board = { .name ="bf5xx-board" , + .platform = &bf5xx_ac97_soc_platform, .dai_link = &bf5xx_board_dai, .num_links =1 , };static struct snd_soc_device bf5xx_board_snd_devdata = { .card = &bf5xx_board, - .platform = &bf5xx_ac97_soc_platform, .codec_dev = &soc_codec_dev_ad1980, };
sound/soc/blackfin/bf5xx-ad73311.c +1 -1
@@ -192,6 +192,7 @@ static struct snd_soc_dai_link bf5xx_ad73311_dai = {static struct snd_soc_card bf5xx_ad73311 = { .name ="bf5xx_ad73311" , + .platform = &bf5xx_i2s_soc_platform, .probe = bf5xx_probe, .dai_link = &bf5xx_ad73311_dai, .num_links =1 ,
@@ -199,7 +200,6 @@ static struct snd_soc_card bf5xx_ad73311 = {static struct snd_soc_device bf5xx_ad73311_snd_devdata = { .card = &bf5xx_ad73311, - .platform = &bf5xx_i2s_soc_platform, .codec_dev = &soc_codec_dev_ad73311, };
sound/soc/blackfin/bf5xx-ssm2602.c +1 -1
@@ -137,13 +137,13 @@ static struct ssm2602_setup_data bf5xx_ssm2602_setup = {static struct snd_soc_card bf5xx_ssm2602 = { .name ="bf5xx_ssm2602" , + .platform = &bf5xx_i2s_soc_platform, .dai_link = &bf5xx_ssm2602_dai, .num_links =1 , };static struct snd_soc_device bf5xx_ssm2602_snd_devdata = { .card = &bf5xx_ssm2602, - .platform = &bf5xx_i2s_soc_platform, .codec_dev = &soc_codec_dev_ssm2602, .codec_data = &bf5xx_ssm2602_setup, };
sound/soc/davinci/davinci-evm.c +1 -1
@@ -130,6 +130,7 @@ static struct snd_soc_dai_link evm_dai = {/* davinci-evm audio machine driver */ static struct snd_soc_card snd_soc_card_evm = { .name ="DaVinci EVM" , + .platform = &davinci_soc_platform, .dai_link = &evm_dai, .num_links =1 , };
@@ -143,7 +144,6 @@ static struct aic3x_setup_data evm_aic3x_setup = {/* evm audio subsystem */ static struct snd_soc_device evm_snd_devdata = { .card = &snd_soc_card_evm, - .platform = &davinci_soc_platform, .codec_dev = &soc_codec_dev_aic3x, .codec_data = &evm_aic3x_setup, };
sound/soc/davinci/davinci-i2s.c +1 -1
@@ -112,7 +112,7 @@ static void davinci_mcbsp_start(struct snd_pcm_substream *substream)struct snd_soc_pcm_runtime *rtd = substream->private_data;struct davinci_mcbsp_dev *dev = rtd->dai->cpu_dai->private_data;struct snd_soc_device *socdev = rtd->socdev; -struct snd_soc_platform *platform = socdev->platform; +struct snd_soc_platform *platform = socdev->card->platform;u32 w;int ret;
sound/soc/davinci/davinci-sffsdr.c +1 -1
@@ -76,6 +76,7 @@ static struct snd_soc_dai_link sffsdr_dai = {/* davinci-sffsdr audio machine driver */ static struct snd_soc_card snd_soc_sffsdr = { .name ="DaVinci SFFSDR" , + .platform = &davinci_soc_platform, .dai_link = &sffsdr_dai, .num_links =1 , };
@@ -91,7 +92,6 @@ static struct pcm3008_setup_data sffsdr_pcm3008_setup = {/* sffsdr audio subsystem */ static struct snd_soc_device sffsdr_snd_devdata = { .card = &snd_soc_sffsdr, - .platform = &davinci_soc_platform, .codec_dev = &soc_codec_dev_pcm3008, .codec_data = &sffsdr_pcm3008_setup, };
sound/soc/fsl/mpc8610_hpcd.c +1 -1
@@ -467,7 +467,7 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev, machine_data->sound_devdata.card = &mpc8610_hpcd_machine; machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270; - machine_data->sound_devdata.platform = &fsl_soc_platform; + machine_data->machine.platform = &fsl_soc_platform; sound_device->dev.platform_data = machine_data;
sound/soc/fsl/soc-of-simple.c +1 -1
@@ -158,7 +158,7 @@ int of_snd_soc_register_platform(struct snd_soc_platform *platform, of_soc->platform_node = node; of_soc->dai_link.cpu_dai = cpu_dai; - of_soc->device.platform = platform; + of_soc->card.platform = platform; of_soc->card.name = of_soc->dai_link.cpu_dai->name;/* Now try to register the SoC device */
sound/soc/omap/n810.c +1 -1
@@ -288,6 +288,7 @@ static struct snd_soc_dai_link n810_dai = {/* Audio machine driver */ static struct snd_soc_card snd_soc_n810 = { .name ="N810" , + .platform = &omap_soc_platform, .dai_link = &n810_dai, .num_links =1 , };
@@ -303,7 +304,6 @@ static struct aic3x_setup_data n810_aic33_setup = {/* Audio subsystem */ static struct snd_soc_device n810_snd_devdata = { .card = &snd_soc_n810, - .platform = &omap_soc_platform, .codec_dev = &soc_codec_dev_aic3x, .codec_data = &n810_aic33_setup, };
sound/soc/omap/omap2evm.c +1 -1
@@ -93,6 +93,7 @@ static struct snd_soc_dai_link omap2evm_dai = {/* Audio machine driver */ static struct snd_soc_card snd_soc_omap2evm = { .name ="omap2evm" , + .platform = &omap_soc_platform, .dai_link = &omap2evm_dai, .num_links =1 , };
@@ -100,7 +101,6 @@ static struct snd_soc_card snd_soc_omap2evm = {/* Audio subsystem */ static struct snd_soc_device omap2evm_snd_devdata = { .card = &snd_soc_omap2evm, - .platform = &omap_soc_platform, .codec_dev = &soc_codec_dev_twl4030, };
sound/soc/omap/omap3beagle.c +1 -1
@@ -90,6 +90,7 @@ static struct snd_soc_dai_link omap3beagle_dai = {/* Audio machine driver */ static struct snd_soc_card snd_soc_omap3beagle = { .name ="omap3beagle" , + .platform = &omap_soc_platform, .dai_link = &omap3beagle_dai, .num_links =1 , };
@@ -97,7 +98,6 @@ static struct snd_soc_card snd_soc_omap3beagle = {/* Audio subsystem */ static struct snd_soc_device omap3beagle_snd_devdata = { .card = &snd_soc_omap3beagle, - .platform = &omap_soc_platform, .codec_dev = &soc_codec_dev_twl4030, };
sound/soc/omap/osk5912.c +1 -1
@@ -145,6 +145,7 @@ static struct snd_soc_dai_link osk_dai = {/* Audio machine driver */ static struct snd_soc_card snd_soc_card_osk = { .name ="OSK5912" , + .platform = &omap_soc_platform, .dai_link = &osk_dai, .num_links =1 , };
@@ -152,7 +153,6 @@ static struct snd_soc_card snd_soc_card_osk = {/* Audio subsystem */ static struct snd_soc_device osk_snd_devdata = { .card = &snd_soc_card_osk, - .platform = &omap_soc_platform, .codec_dev = &soc_codec_dev_tlv320aic23, };
sound/soc/omap/overo.c +1 -1
@@ -90,6 +90,7 @@ static struct snd_soc_dai_link overo_dai = {/* Audio machine driver */ static struct snd_soc_card snd_soc_card_overo = { .name ="overo" , + .platform = &omap_soc_platform, .dai_link = &overo_dai, .num_links =1 , };
@@ -97,7 +98,6 @@ static struct snd_soc_card snd_soc_card_overo = {/* Audio subsystem */ static struct snd_soc_device overo_snd_devdata = { .card = &snd_soc_card_overo, - .platform = &omap_soc_platform, .codec_dev = &soc_codec_dev_twl4030, };
sound/soc/omap/sdp3430.c +1 -1
@@ -93,6 +93,7 @@ static struct snd_soc_dai_link sdp3430_dai = {/* Audio machine driver */ static struct snd_soc_machine snd_soc_machine_sdp3430 = { .name ="SDP3430" , + .platform = &omap_soc_platform, .dai_link = &sdp3430_dai, .num_links =1 , };
@@ -100,7 +101,6 @@ static struct snd_soc_machine snd_soc_machine_sdp3430 = {/* Audio subsystem */ static struct snd_soc_device sdp3430_snd_devdata = { .machine = &snd_soc_machine_sdp3430, - .platform = &omap_soc_platform, .codec_dev = &soc_codec_dev_twl4030, };
sound/soc/pxa/corgi.c +1 -1
@@ -312,6 +312,7 @@ static struct snd_soc_dai_link corgi_dai = {/* corgi audio machine driver */ static struct snd_soc_card snd_soc_corgi = { .name ="Corgi" , + .platform = &pxa2xx_soc_platform, .dai_link = &corgi_dai, .num_links =1 , };
@@ -325,7 +326,6 @@ static struct wm8731_setup_data corgi_wm8731_setup = {/* corgi audio subsystem */ static struct snd_soc_device corgi_snd_devdata = { .card = &snd_soc_corgi, - .platform = &pxa2xx_soc_platform, .codec_dev = &soc_codec_dev_wm8731, .codec_data = &corgi_wm8731_setup, };
sound/soc/pxa/e800_wm9712.c +1 -1
@@ -42,13 +42,13 @@ static struct snd_soc_dai_link e800_dai[] = {static struct snd_soc_card e800 = { .name ="Toshiba e800" , + .platform = &pxa2xx_soc_platform, .dai_link = e800_dai, .num_links =ARRAY_SIZE (e800_dai), };static struct snd_soc_device e800_snd_devdata = { .card = &e800, - .platform = &pxa2xx_soc_platform, .codec_dev = &soc_codec_dev_wm9712, };
sound/soc/pxa/em-x270.c +1 -1
@@ -54,13 +54,13 @@ static struct snd_soc_dai_link em_x270_dai[] = {static struct snd_soc_card em_x270 = { .name ="EM-X270" , + .platform = &pxa2xx_soc_platform, .dai_link = em_x270_dai, .num_links =ARRAY_SIZE (em_x270_dai), };static struct snd_soc_device em_x270_snd_devdata = { .card = &em_x270, - .platform = &pxa2xx_soc_platform, .codec_dev = &soc_codec_dev_wm9712, };
sound/soc/pxa/palm27x.c +1 -1
@@ -191,13 +191,13 @@ static struct snd_soc_dai_link palm27x_dai[] = {static struct snd_soc_card palm27x_asoc = { .name ="Palm/PXA27x" , + .platform = &pxa2xx_soc_platform, .dai_link = palm27x_dai, .num_links =ARRAY_SIZE (palm27x_dai), };static struct snd_soc_device palm27x_snd_devdata = { .card = &palm27x_asoc, - .platform = &pxa2xx_soc_platform, .codec_dev = &soc_codec_dev_wm9712, };
sound/soc/pxa/poodle.c +1 -1
@@ -278,6 +278,7 @@ static struct snd_soc_dai_link poodle_dai = {/* poodle audio machine driver */ static struct snd_soc_card snd_soc_poodle = { .name ="Poodle" , + .platform = &pxa2xx_soc_platform, .dai_link = &poodle_dai, .num_links =1 , };
@@ -291,7 +292,6 @@ static struct wm8731_setup_data poodle_wm8731_setup = {/* poodle audio subsystem */ static struct snd_soc_device poodle_snd_devdata = { .card = &snd_soc_poodle, - .platform = &pxa2xx_soc_platform, .codec_dev = &soc_codec_dev_wm8731, .codec_data = &poodle_wm8731_setup, };
sound/soc/pxa/spitz.c +1 -1
@@ -321,6 +321,7 @@ static struct snd_soc_dai_link spitz_dai = {/* spitz audio machine driver */ static struct snd_soc_card snd_soc_spitz = { .name ="Spitz" , + .platform = &pxa2xx_soc_platform, .dai_link = &spitz_dai, .num_links =1 , };
@@ -334,7 +335,6 @@ static struct wm8750_setup_data spitz_wm8750_setup = {/* spitz audio subsystem */ static struct snd_soc_device spitz_snd_devdata = { .card = &snd_soc_spitz, - .platform = &pxa2xx_soc_platform, .codec_dev = &soc_codec_dev_wm8750, .codec_data = &spitz_wm8750_setup, };
sound/soc/pxa/tosa.c +1 -1
@@ -252,6 +252,7 @@ static int tosa_remove(struct platform_device *dev)static struct snd_soc_card tosa = { .name ="Tosa" , + .platform = &pxa2xx_soc_platform, .dai_link = tosa_dai, .num_links =ARRAY_SIZE (tosa_dai), .probe = tosa_probe,
@@ -260,7 +261,6 @@ static struct snd_soc_card tosa = {static struct snd_soc_device tosa_snd_devdata = { .card = &tosa, - .platform = &pxa2xx_soc_platform, .codec_dev = &soc_codec_dev_wm9712, };
sound/soc/pxa/zylonite.c +1 -1
@@ -175,13 +175,13 @@ static struct snd_soc_dai_link zylonite_dai[] = {static struct snd_soc_card zylonite = { .name ="Zylonite" , + .platform = &pxa2xx_soc_platform, .dai_link = zylonite_dai, .num_links =ARRAY_SIZE (zylonite_dai), };static struct snd_soc_device zylonite_snd_ac97_devdata = { .card = &zylonite, - .platform = &pxa2xx_soc_platform, .codec_dev = &soc_codec_dev_wm9713, };
sound/soc/s3c24xx/ln2440sbc_alc650.c +1 -1
@@ -40,13 +40,13 @@ static struct snd_soc_dai_link ln2440sbc_dai[] = {static struct snd_soc_card ln2440sbc = { .name ="LN2440SBC" , + .platform = &s3c24xx_soc_platform, .dai_link = ln2440sbc_dai, .num_links =ARRAY_SIZE (ln2440sbc_dai), };static struct snd_soc_device ln2440sbc_snd_ac97_devdata = { .card = &ln2440sbc, - .platform = &s3c24xx_soc_platform, .codec_dev = &soc_codec_dev_ac97, };
sound/soc/s3c24xx/neo1973_wm8753.c +1 -1
@@ -580,6 +580,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {static struct snd_soc_card neo1973 = { .name ="neo1973" , + .platform = &s3c24xx_soc_platform, .dai_link = neo1973_dai, .num_links =ARRAY_SIZE (neo1973_dai), };
@@ -591,7 +592,6 @@ static struct wm8753_setup_data neo1973_wm8753_setup = {static struct snd_soc_device neo1973_snd_devdata = { .card = &neo1973, - .platform = &s3c24xx_soc_platform, .codec_dev = &soc_codec_dev_wm8753, .codec_data = &neo1973_wm8753_setup, };
sound/soc/s3c24xx/s3c24xx_uda134x.c +1 -1
@@ -234,6 +234,7 @@ static struct snd_soc_dai_link s3c24xx_uda134x_dai_link = {static struct snd_soc_card snd_soc_s3c24xx_uda134x = { .name ="S3C24XX_UDA134X" , + .platform = &s3c24xx_soc_platform, .dai_link = &s3c24xx_uda134x_dai_link, .num_links =1 , };
@@ -271,7 +272,6 @@ static struct uda134x_platform_data s3c24xx_uda134x = {static struct snd_soc_device s3c24xx_uda134x_snd_devdata = { .card = &snd_soc_s3c24xx_uda134x, - .platform = &s3c24xx_soc_platform, .codec_dev = &soc_codec_dev_uda134x, .codec_data = &s3c24xx_uda134x, };
sound/soc/s3c24xx/smdk2443_wm9710.c +1 -1
@@ -36,13 +36,13 @@ static struct snd_soc_dai_link smdk2443_dai[] = {static struct snd_soc_card smdk2443 = { .name ="SMDK2443" , + .platform = &s3c24xx_soc_platform, .dai_link = smdk2443_dai, .num_links =ARRAY_SIZE (smdk2443_dai), };static struct snd_soc_device smdk2443_snd_ac97_devdata = { .card = &smdk2443, - .platform = &s3c24xx_soc_platform, .codec_dev = &soc_codec_dev_ac97, };
sound/soc/sh/sh7760-ac97.c +1 -1
@@ -40,13 +40,13 @@ static struct snd_soc_dai_link sh7760_ac97_dai = {static struct snd_soc_card sh7760_ac97_soc_machine = { .name ="SH7760 AC97" , + .platform = &sh7760_soc_platform, .dai_link = &sh7760_ac97_dai, .num_links =1 , };static struct snd_soc_device sh7760_ac97_snd_devdata = { .card = &sh7760_ac97_soc_machine, - .platform = &sh7760_soc_platform, .codec_dev = &soc_codec_dev_ac97, };
sound/soc/soc-core.c +25 -19
131 lines not on this page · raw message
Signature · 1 line
1.5.6.5
PATCH 3/5 ASoC: TWL4030: Add input selection and gain controls
From: Grazvydas Ignotas <[email protected]>
The TWL4030 codec device has two ADCs. Both of them can have several inputs routed to them, but TRM says that only one source can be selected for every ADC, even though every source has a dedicated bit in the registers.
This patch adds input source controls. It modifies default register values to have no inputs selected and ADCs disabled. When some input is selected, control handlers enable apropriate input amplifier and ADC. If a microphone is selected, bias power is automatically enabled. When some input is deselected, unused chip parts are disabled.
Microphone and line input recording tested on OMAP3 pandora board.
--- sound/soc/codecs/twl4030.c | 177 +++++++++++++++++++++++++++++++++++++++++++- sound/soc/codecs/twl4030.h | 16 ++++ 2 files changed, 190 insertions(+), 3 deletions(-)
sound/soc/codecs/twl4030.c +174 -3
@@ -46,9 +46,9 @@ static const u8 twl4030_reg[TWL4030_CACHEREGNUM] = {0xc3 ,/* REG_OPTION (0x2) */ 0x00 ,/* REG_UNKNOWN (0x3) */ 0x00 ,/* REG_MICBIAS_CTL (0x4) */ -0x24 ,/* REG_ANAMICL (0x5) */ -0x04 ,/* REG_ANAMICR (0x6) */ -0x0a ,/* REG_AVADC_CTL (0x7) */ +0x20 ,/* REG_ANAMICL (0x5) */ +0x00 ,/* REG_ANAMICR (0x6) */ +0x00 ,/* REG_AVADC_CTL (0x7) */ 0x00 ,/* REG_ADCMICSEL (0x8) */ 0x00 ,/* REG_DIGMIXING (0x9) */ 0x0c, /* REG_ATXL1PGA (0xA) */
@@ -347,6 +347,162 @@ static int snd_soc_put_volsw_r2_twl4030(struct snd_kcontrol *kcontrol,return err; } +static int twl4030_get_left_input (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_codec *codec = kcontrol->private_data; +u8 reg =twl4030_read_reg_cache (codec,TWL4030_REG_ANAMICL ); +int result =0 ; + +/* one bit must be set a time */ + reg &=TWL4030_CKMIC_EN |TWL4030_AUXL_EN |TWL4030_HSMIC_EN + |TWL4030_MAINMIC_EN ; +if (reg !=0 ) { + result++; +while ((reg &1 ) ==0 ) { + result++; + reg >>=1 ; + } + } + + ucontrol->value.integer.value[0 ] = result; +return 0 ; +} + +static int twl4030_put_left_input (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_codec *codec = kcontrol->private_data; +int value = ucontrol->value.integer.value[0 ]; +u8 anamicl, micbias, avadc_ctl; + + anamicl =twl4030_read_reg_cache (codec,TWL4030_REG_ANAMICL ); + anamicl &= ~(TWL4030_CKMIC_EN |TWL4030_AUXL_EN |TWL4030_HSMIC_EN + |TWL4030_MAINMIC_EN ); + micbias =twl4030_read_reg_cache (codec,TWL4030_REG_MICBIAS_CTL ); + micbias &= ~(TWL4030_HSMICBIAS_EN |TWL4030_MICBIAS1_EN ); + avadc_ctl =twl4030_read_reg_cache (codec,TWL4030_REG_AVADC_CTL ); + +switch (value) { +case 1 : + anamicl |=TWL4030_MAINMIC_EN ; + micbias |=TWL4030_MICBIAS1_EN ; +break ; +case 2 : + anamicl |=TWL4030_HSMIC_EN ; + micbias |=TWL4030_HSMICBIAS_EN ; +break ; +case 3 : + anamicl |=TWL4030_AUXL_EN ; +break ; +case 4 : + anamicl |=TWL4030_CKMIC_EN ; +break ; +default : +break ; + } + +/* If some input is selected, enable amp and ADC */ +if (value !=0 ) { + anamicl |=TWL4030_MICAMPL_EN ; + avadc_ctl |=TWL4030_ADCL_EN ; + }else { + anamicl &= ~TWL4030_MICAMPL_EN ; + avadc_ctl &= ~TWL4030_ADCL_EN ; + } + +twl4030_write (codec,TWL4030_REG_ANAMICL , anamicl); +twl4030_write (codec,TWL4030_REG_MICBIAS_CTL , micbias); +twl4030_write (codec,TWL4030_REG_AVADC_CTL , avadc_ctl); + +return 1 ; +} + +static int twl4030_get_right_input (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_codec *codec = kcontrol->private_data; +u8 reg =twl4030_read_reg_cache (codec,TWL4030_REG_ANAMICR ); +int value =0 ; + + reg &=TWL4030_SUBMIC_EN |TWL4030_AUXR_EN ; +switch (reg) { +case TWL4030_SUBMIC_EN : + value =1 ; +break ; +case TWL4030_AUXR_EN : + value =2 ; +break ; +default : +break ; + } + + ucontrol->value.integer.value[0 ] = value; +return 0 ; +} + +static int twl4030_put_right_input (struct snd_kcontrol *kcontrol, +struct snd_ctl_elem_value *ucontrol) +{ +struct snd_soc_codec *codec = kcontrol->private_data; +int value = ucontrol->value.integer.value[0 ]; +u8 anamicr, micbias, avadc_ctl; + + anamicr =twl4030_read_reg_cache (codec,TWL4030_REG_ANAMICR ); + anamicr &= ~(TWL4030_SUBMIC_EN |TWL4030_AUXR_EN ); + micbias =twl4030_read_reg_cache (codec,TWL4030_REG_MICBIAS_CTL ); + micbias &= ~TWL4030_MICBIAS2_EN ; + avadc_ctl =twl4030_read_reg_cache (codec,TWL4030_REG_AVADC_CTL ); + +switch (value) { +case 1 : + anamicr |=TWL4030_SUBMIC_EN ; + micbias |=TWL4030_MICBIAS2_EN ; +break ; +case 2 : + anamicr |=TWL4030_AUXR_EN ; +break ; +default : +break ; + } + +if (value !=0 ) { + anamicr |=TWL4030_MICAMPR_EN ; + avadc_ctl |=TWL4030_ADCR_EN ; + }else { + anamicr &= ~TWL4030_MICAMPR_EN ; + avadc_ctl &= ~TWL4030_ADCR_EN ; + } + +twl4030_write (codec,TWL4030_REG_ANAMICR , anamicr); +twl4030_write (codec,TWL4030_REG_MICBIAS_CTL , micbias); +twl4030_write (codec,TWL4030_REG_AVADC_CTL , avadc_ctl); + +return 1 ; +} + +static const char *twl4030_left_in_sel[] = { +"None" , +"Main Mic" , +"Headset Mic" , +"Line In" , +"Carkit Mic" , +}; + +static const char *twl4030_right_in_sel[] = { +"None" , +"Sub Mic" , +"Line In" , +}; + +static const struct soc_enum twl4030_left_input_mux = +SOC_ENUM_SINGLE_EXT (ARRAY_SIZE (twl4030_left_in_sel), + twl4030_left_in_sel); + +static const struct soc_enum twl4030_right_input_mux = +SOC_ENUM_SINGLE_EXT (ARRAY_SIZE (twl4030_right_in_sel), + twl4030_right_in_sel); +/* * FGAIN volume control: * from -62 to 0 dB in 1 dB steps (mute instead of -63 dB)
@@ -378,6 +534,12 @@ static DECLARE_TLV_DB_SCALE(output_tvl, -1200, 600, 1);*/ static DECLARE_TLV_DB_SCALE(digital_capture_tlv, 0, 100, 0); +/* +* Gain control for input amplifiers +* 0 dB to 30 dB in 6 dB steps +*/ +static DECLARE_TLV_DB_SCALE(input_gain_tlv, 0, 600, 0); +static const struct snd_kcontrol_new twl4030_snd_controls[] = {/* Common playback gain controls */ SOC_DOUBLE_R_TLV("DAC1 Digital Fine Playback Volume",
@@ -420,6 +582,15 @@ static const struct snd_kcontrol_new twl4030_snd_controls[] = {SOC_DOUBLE_R_TLV ("Capture Volume" ,TWL4030_REG_ATXL1PGA ,TWL4030_REG_ATXR1PGA ,0 ,0x1f ,0 , digital_capture_tlv), + +SOC_DOUBLE_TLV ("Input Boost Volume" ,TWL4030_REG_ANAMIC_GAIN , +0 ,3 ,5 ,0 , input_gain_tlv), + +/* Input source controls */ +SOC_ENUM_EXT ("Left Input Source" , twl4030_left_input_mux, + twl4030_get_left_input, twl4030_put_left_input), +SOC_ENUM_EXT ("Right Input Source" , twl4030_right_input_mux, + twl4030_get_right_input, twl4030_put_right_input), };/* add non dapm controls */
sound/soc/codecs/twl4030.h +16 -0
@@ -113,7 +113,16 @@#define TWL4030_CODECPDZ 0x02#define TWL4030_OPT_MODE 0x01 +/* TWL4030_REG_MICBIAS_CTL (0x04) Fields */ + +#define TWL4030_MICBIAS2_CTL 0x40 +#define TWL4030_MICBIAS1_CTL 0x20 +#define TWL4030_HSMICBIAS_EN 0x04 +#define TWL4030_MICBIAS2_EN 0x02 +#define TWL4030_MICBIAS1_EN 0x01 +/* ANAMICL (0x05) Fields */ +#define TWL4030_CNCL_OFFSET_START 0x80#define TWL4030_OFFSET_CNCL_SEL 0x60#define TWL4030_OFFSET_CNCL_SEL_ARX1 0x00
@@ -127,10 +136,17 @@#define TWL4030_MAINMIC_EN 0x01/* ANAMICR (0x06) Fields */ +#define TWL4030_MICAMPR_EN 0x10#define TWL4030_AUXR_EN 0x04#define TWL4030_SUBMIC_EN 0x01 +/* AVADC_CTL (0x07) Fields */ + +#define TWL4030_ADCL_EN 0x08 +#define TWL4030_AVADC_CLK_PRIORITY 0x04 +#define TWL4030_ADCR_EN 0x02 +/* AUDIO_IF (0x0E) Fields */ #define TWL4030_AIF_SLAVE_EN 0x80
Signature · 1 line
1.5.6.5
PATCH 4/5 ASoC: Fix WM8903 right mixer bypass path
--- sound/soc/codecs/wm8903.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
sound/soc/codecs/wm8903.c +4 -4
@@ -773,14 +773,14 @@ static const struct snd_kcontrol_new left_output_mixer[] = {SOC_DAPM_SINGLE ("DACL Switch" ,WM8903_ANALOGUE_LEFT_MIX_0 ,3 ,1 ,0 ),SOC_DAPM_SINGLE ("DACR Switch" ,WM8903_ANALOGUE_LEFT_MIX_0 ,2 ,1 ,0 ),SOC_DAPM_SINGLE_W ("Left Bypass Switch" ,WM8903_ANALOGUE_LEFT_MIX_0 ,1 ,1 ,0 ), -SOC_DAPM_SINGLE_W("Right Bypass Switch", WM8903_ANALOGUE_LEFT_MIX_0, 1, 1, 0), +SOC_DAPM_SINGLE_W("Right Bypass Switch", WM8903_ANALOGUE_LEFT_MIX_0, 0, 1, 0), };static const struct snd_kcontrol_new right_output_mixer[] = {SOC_DAPM_SINGLE ("DACL Switch" ,WM8903_ANALOGUE_RIGHT_MIX_0 ,3 ,1 ,0 ),SOC_DAPM_SINGLE ("DACR Switch" ,WM8903_ANALOGUE_RIGHT_MIX_0 ,2 ,1 ,0 ),SOC_DAPM_SINGLE_W ("Left Bypass Switch" ,WM8903_ANALOGUE_RIGHT_MIX_0 ,1 ,1 ,0 ), -SOC_DAPM_SINGLE_W ("Right Bypass Switch" ,WM8903_ANALOGUE_RIGHT_MIX_0 ,1 ,1 ,0 ), +SOC_DAPM_SINGLE_W ("Right Bypass Switch" ,WM8903_ANALOGUE_RIGHT_MIX_0 ,0 ,1 ,0 ), }; static const struct snd_kcontrol_new left_speaker_mixer[] = {
@@ -788,7 +788,7 @@ SOC_DAPM_SINGLE("DACL Switch", WM8903_ANALOGUE_SPK_MIX_LEFT_0, 3, 1, 0),SOC_DAPM_SINGLE ("DACR Switch" ,WM8903_ANALOGUE_SPK_MIX_LEFT_0 ,2 ,1 ,0 ),SOC_DAPM_SINGLE ("Left Bypass Switch" ,WM8903_ANALOGUE_SPK_MIX_LEFT_0 ,1 ,1 ,0 ),SOC_DAPM_SINGLE ("Right Bypass Switch" ,WM8903_ANALOGUE_SPK_MIX_LEFT_0 , - 1, 1, 0), + 0, 1, 0), }; static const struct snd_kcontrol_new right_speaker_mixer[] = {
@@ -797,7 +797,7 @@ SOC_DAPM_SINGLE("DACR Switch", WM8903_ANALOGUE_SPK_MIX_RIGHT_0, 2, 1, 0),SOC_DAPM_SINGLE ("Left Bypass Switch" ,WM8903_ANALOGUE_SPK_MIX_RIGHT_0 ,1 ,1 ,0 ),SOC_DAPM_SINGLE ("Right Bypass Switch" ,WM8903_ANALOGUE_SPK_MIX_RIGHT_0 , - 1, 1, 0), + 0, 1, 0), }; static const struct snd_soc_dapm_widget wm8903_dapm_widgets[] = {
Signature · 1 line
1.5.6.5
PATCH 5/5 ASoC: tlv320aic3x: headset/button press support
From: Daniel Mack <[email protected]>
- Add aic3x_set_headset_detection() function to define the headset detection mode for tlv32aic3x chips
- added aic3x_button_pressed()
- Read from the real-time registers in aic3x_headset_detected() to query headset presence without an occured interrupt
--- sound/soc/codecs/tlv320aic3x.c | 31 +++++++++++++++++++++++++- sound/soc/codecs/tlv320aic3x.h | 46 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 3 deletions(-)
sound/soc/codecs/tlv320aic3x.c +29 -2
@@ -1018,14 +1018,41 @@ int aic3x_get_gpio(struct snd_soc_codec *codec, int gpio) }EXPORT_SYMBOL_GPL (aic3x_get_gpio); +void aic3x_set_headset_detection (struct snd_soc_codec *codec,int detect, +int headset_debounce,int button_debounce) +{ +u8 val; + + val = ((detect &AIC3X_HEADSET_DETECT_MASK ) + <<AIC3X_HEADSET_DETECT_SHIFT ) | + ((headset_debounce &AIC3X_HEADSET_DEBOUNCE_MASK ) + <<AIC3X_HEADSET_DEBOUNCE_SHIFT ) | + ((button_debounce &AIC3X_BUTTON_DEBOUNCE_MASK ) + <<AIC3X_BUTTON_DEBOUNCE_SHIFT ); + +if (detect &AIC3X_HEADSET_DETECT_MASK ) + val |=AIC3X_HEADSET_DETECT_ENABLED ; + +aic3x_write (codec,AIC3X_HEADSET_DETECT_CTRL_A , val); +} +EXPORT_SYMBOL_GPL (aic3x_set_headset_detection); +int aic3x_headset_detected (struct snd_soc_codec *codec) {u8 val; -aic3x_read (codec,AIC3X_RT_IRQ_FLAGS_REG , &val); -return (val >>2 ) &1 ; +aic3x_read (codec,AIC3X_HEADSET_DETECT_CTRL_B , &val); +return (val >>4 ) &1 ; }EXPORT_SYMBOL_GPL (aic3x_headset_detected); +int aic3x_button_pressed (struct snd_soc_codec *codec) +{ +u8 val; +aic3x_read (codec,AIC3X_HEADSET_DETECT_CTRL_B , &val); +return (val >>5 ) &1 ; +} +EXPORT_SYMBOL_GPL (aic3x_button_pressed); +#define AIC3X_RATES SNDRV_PCM_RATE_8000_96000#define AIC3X_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE | \ SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S32_LE)
sound/soc/codecs/tlv320aic3x.h +45 -1
59 lines not on this page · raw message
Signature · 1 line
1.5.6.5
Re: [PATCH] leds: Add WM8350 LED driver
In reply to Mark BrownQuoted 3 lines · Mark Brown
The voltage and current regulators on the WM8350 AudioPlus PMIC can be used in concert to provide a power efficient LED driver. This driver implements support for this within the standard LED class.
Gah, sorry - this was lying about in the directory when I did git send-email. It's not in the branch advertised.
At Wed, 3 Dec 2008 13:20:05 +0000,
Quoted 8 lines · Mark Brown
The following changes since commit
0ecfe7987855d21c2a89ffe003ddf0ee11b42d47:
Mark Brown (1):
ASoC: Don't free static data in WM9713are available in the git repository at:
git://opensource.wolfsonmicro.com/linux-2.6-asocfor-tiwai
Pulled in now. Thanks.
Takashi
Quoted 49 lines
Daniel Mack (1):
ASoC: tlv320aic3x: headset/button press supportGrazvydas Ignotas (1):
ASoC: TWL4030: Add input selection and gain controlsMark Brown (3):
ASoC: Push workqueue data intosnd_soc_card
ASoC: Push platform registration down into the card
ASoC: Fix WM8903 right mixer bypass pathinclude/sound/soc.h | 9 +- sound/soc/atmel/playpaq_wm8510.c | 2 +- sound/soc/atmel/sam9g20_wm8731.c | 2 +- sound/soc/blackfin/bf5xx-ad1980.c | 2 +- sound/soc/blackfin/bf5xx-ad73311.c | 2 +- sound/soc/blackfin/bf5xx-ssm2602.c | 2 +- sound/soc/codecs/tlv320aic3x.c | 31 ++++++- sound/soc/codecs/tlv320aic3x.h | 46 +++++++++- sound/soc/codecs/twl4030.c | 177 +++++++++++++++++++++++++++++++++- sound/soc/codecs/twl4030.h | 16 +++ sound/soc/codecs/wm8903.c | 8 +- sound/soc/davinci/davinci-evm.c | 2 +- sound/soc/davinci/davinci-i2s.c | 2 +- sound/soc/davinci/davinci-sffsdr.c | 2 +- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/soc/fsl/soc-of-simple.c | 2 +- sound/soc/omap/n810.c | 2 +- sound/soc/omap/omap2evm.c | 2 +- sound/soc/omap/omap3beagle.c | 2 +- sound/soc/omap/osk5912.c | 2 +- sound/soc/omap/overo.c | 2 +- sound/soc/omap/sdp3430.c | 2 +- sound/soc/pxa/corgi.c | 2 +- sound/soc/pxa/e800_wm9712.c | 2 +- sound/soc/pxa/em-x270.c | 2 +- sound/soc/pxa/palm27x.c | 2 +- sound/soc/pxa/poodle.c | 2 +- sound/soc/pxa/spitz.c | 2 +- sound/soc/pxa/tosa.c | 2 +- sound/soc/pxa/zylonite.c | 2 +- sound/soc/s3c24xx/ln2440sbc_alc650.c | 2 +- sound/soc/s3c24xx/neo1973_wm8753.c | 2 +- sound/soc/s3c24xx/s3c24xx_uda134x.c | 2 +- sound/soc/s3c24xx/smdk2443_wm9710.c | 2 +- sound/soc/sh/sh7760-ac97.c | 2 +- sound/soc/soc-core.c | 77 +++++++++------ 36 files changed, 348 insertions(+), 74 deletions(-)