summaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung/h1940_uda1380.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: h1940_uda1380: Constify rate constraintsLars-Peter Clausen2015-10-231-3/+2Star
| | | | | | | | | | | The rate constraints in this board driver are not modified at runtime, so make them const. While we are at it also remove the unnecessary 0 initializer for the mask field. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: h1980_uda1380: Register jacks at the card levelLars-Peter Clausen2015-03-041-7/+2Star
| | | | | | | | The jacks are card level elements so use snd_soc_card_jack_new() instead of snd_soc_jack_new() to register them. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: h1940_uda1380: Use static DAI format setupLars-Peter Clausen2015-01-061-13/+2Star
| | | | | | | | Set the dai_fmt field in the dai_link struct instead of manually calling snd_soc_dai_fmt(). This makes the code cleaner and shorter. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Fix wrong argument for card remove callbacksTakashi Iwai2014-06-031-1/+1
| | | | | | | | | | | The commit [e1d4d3c8: ASoC: free jack GPIOs before the sound card is freed] introduced snd_soc_card remove callbacks to a few drivers, but they are implemented with a wrong argument type. The callback should receive snd_soc_card pointer instead of snd_soc_pcm_runtime. Fixes: e1d4d3c854f2 ('ASoC: free jack GPIOs before the sound card is freed') Acked-by: Mark Brown <broonie@linaro.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ASoC: free jack GPIOs before the sound card is freedStephen Warren2014-06-031-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the same change as commit fb6b8e71448a "ASoC: tegra: free jack GPIOs before the sound card is freed", but applied to all other ASoC machine drivers where code inspection indicates the same problem exists. That commit's description is: ========== snd_soc_jack_add_gpios() schedules a work queue item to poll the GPIO to generate an initial jack status report. If sound card initialization fails, that work item needs to be cancelled, so it doesn't run after the card has been freed. Specifically, freeing the card calls snd_jack_dev_free() which calls snd_jack_dev_disconnect() which sets jack->input_dev = NULL, and input_dev is used by snd_jack_report(), which is called from the work queue item. snd_soc_jack_free_gpios() cancels the work item. The Tegra ASoC machine drivers do call this function in the platform driver remove() callback. However, this happens after the sound card is freed, at least when the card is freed due to errors late during snd_soc_instantiate_card(). This leaves a window where the work item can execute after the card is freed. In next-20140522, sound card initialization does fail for unrelated reasons, and hits the problem described above. To solve this, fix the Tegra ASoC machine drivers to clean up the Jack GPIOs during the snd_soc_card's .remove() callback, which is executed before the overall card object is freed. also, guard the cleanup call based on whether we actually setup up the GPIOs in the first place. Ideally, we'd do the cleanup in a struct snd_soc_dai_link .fini/remove function to match where the GPIOs get set up. However, there is no such callback. ========== Note that I have not even compile-tested this in most cases, since most of the drivers rely on specific mach-* support I don't have enabled, and don't support COMPILE_TEST. Testing by the relevant board maintainers would be useful. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: Remove needless snd_soc_dapm_enable_pin() from machine driver initsJarkko Nikula2014-05-191-5/+0Star
| | | | | | | | | ALSA SoC core marks widgets as connected by default when they are initialized in snd_soc_dapm_new_control() so there is no need to call snd_soc_dapm_enable_pin() from machine driver init functions. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: h1940_uda1380: Don't modify runtime->hwLars-Peter Clausen2014-02-031-4/+0Star
| | | | | | | | | | | Individual components are not supposed to modify the runtime->hw struct itself as it is manged by the ASoC core. If a component wants to limit the list of supported rates it should set a rate constraint. The h1940_uda1380 already does this, so it is safe to just remove the code that modifies runtime->hw. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Vasily Khoruzhick <anarsoul@gmail.com> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: samsung: h1940_uda1380: Fix build warningSachin Kamat2014-02-031-1/+1
| | | | | | | | Fixes the following warning: sound/soc/samsung/h1940_uda1380.c:98:4: warning: passing argument 1 of ‘dev_err’ from incompatible pointer type [enabled by default] Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: samsung: h1940_uda1380: Remove unused variableSachin Kamat2014-02-031-1/+0Star
| | | | | | | | Fixes the following warning: sound/soc/samsung/h1940_uda1380.c:183:6: warning: unused variable ‘err’ [-Wunused-variable] Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: samsung: Fix build regressions due to gpio re-orgSachin Kamat2014-01-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes through commits c67d0f29262b ("ARM: s3c24xx: get rid of custom <mach/gpio.h>"), b0161caa72b6 ("ARM: S3C[24|64]xx: move includes back under <mach/> scope"), 364374121b78 ("ARM: s3c24xx: explicit dependency on <plat/gpio-cfg.h>") and 41c3548e6da6 ("ARM: s3c64xx: get rid of custom <mach/gpio.h>") caused build regressions due to broken dependencies. Fix the following errors by including the necessary header files explicitly: sound/soc/samsung/h1940_uda1380.c:56:3: error: implicit declaration of function ‘S3C2410_GPG’ sound/soc/samsung/h1940_uda1380.c:149:18: error: ‘S3C_GPIO_END’ undeclared (first use in this function) sound/soc/samsung/h1940_uda1380.c:234:21: error: ‘S3C_GPIO_END’ undeclared (first use in this function) sound/soc/samsung/h1940_uda1380.c:270:12: error: ‘S3C_GPIO_END’ undeclared (first use in this function) sound/soc/samsung/neo1973_wm8753.c:239:2: error: implicit declaration of function ‘S3C2410_GPJ’ sound/soc/samsung/rx1950_uda1380.c:67:3: error: implicit declaration of function ‘S3C2410_GPG’ sound/soc/samsung/s3c2412-i2s.c:86:2: error: implicit declaration of function ‘s3c_gpio_cfgall_range’ sound/soc/samsung/s3c2412-i2s.c:86:2: error: implicit declaration of function ‘S3C2410_GPE’ sound/soc/samsung/s3c2412-i2s.c:86:2: error: implicit declaration of function ‘S3C_GPIO_SFN’ sound/soc/samsung/s3c2412-i2s.c:87:10: error: ‘S3C_GPIO_PULL_NONE’ undeclared sound/soc/samsung/s3c24xx-i2s.c:394:2: error: implicit declaration of function ‘s3c_gpio_cfgall_range’ sound/soc/samsung/s3c24xx-i2s.c:394:2: error: implicit declaration of function ‘S3C2410_GPE’ sound/soc/samsung/s3c24xx-i2s.c:394:2: error: implicit declaration of function ‘S3C_GPIO_SFN’ sound/soc/samsung/s3c24xx-i2s.c:395:10: error: ‘S3C_GPIO_PULL_NONE’ undeclared sound/soc/samsung/smartq_wm8987.c:112:3: error: implicit declaration of function ‘S3C64XX_GPL’ Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
* ASoC: samsung: move plat/ headers to local directoryArnd Bergmann2013-04-111-1/+1
| | | | | | | | | The plat/regs-iis.h and plat/regs-ac97.h files in the samsung platform are only needed by the ASoC drivers, so they can be moved into the same directory, as one more step towards a multiplatform build. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ARM: S3C24XX: make h1940.h and h1940-latch.h localKukjin Kim2013-01-101-7/+6Star
| | | | | | The headers can be local in mach-s3c24xx/. Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
* ASoC: Samsung: Do not register samsung audio dma device as pdevPadmavathi Venna2012-12-071-1/+1
| | | | | | | | | | | | | | Previously, the ASoC 'platform' (PCM/DMA) object was instantiated via a platform_device. This didn't represent the hardware well, since there was no separate hardware associated with this platform_device; it was a virtual device with sole purpose to call snd_soc_register_platform(). This change removes the platform_device completely. Each Samsung DAI now registers the ASoC 'platform' itself. Machine drivers are adjusted for the new 'platform' name. Signed-off-by: Padmavathi Venna <padma.v@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: samsung: Add .owner to struct snd_soc_cardAxel Lin2011-12-221-0/+1
| | | | | | | | | Missed .owner of struct snd_soc_card will prevent the module from being removed from underneath its users. Reported-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* sound: Add module.h to the previously silent sound usersPaul Gortmaker2011-11-011-0/+1
| | | | | | | | Lots of sound drivers were getting module.h via the implicit presence of it in <linux/device.h> but we are going to clean that up. So fix up those users now. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* ASoC: Convert H1940 to table based initMark Brown2011-10-101-12/+5Star
| | | | | Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com>
* ASoC: Remove redundant snd_soc_dapm_sync() calls from machine driversMark Brown2011-10-081-2/+0Star
| | | | | | | | | The core will sync DAPM as part of the card initialization, there is no need for machine drivers to do so during their setup. OMAP drivers are omitted as I know Peter already has patches for them. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: h1940: Fix compilation error due to missing headerVasily Khoruzhick2011-08-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add linux/types.h to fix this compilation error: In file included from arch/arm/mach-s3c2410/include/mach/gpio-fns.h:27:0, from arch/arm/mach-s3c2410/include/mach/gpio.h:27, from /home/anarsoul/work/pda-linux/linux-next/arch/arm/include/asm/gpio.h:5, from include/linux/gpio.h:18, from sound/soc/samsung/rx1950_uda1380.c:20: arch/arm/plat-samsung/include/plat/gpio-cfg.h:29:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘s3c_gpio_pull_t’ arch/arm/plat-samsung/include/plat/gpio-cfg.h:30:34: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘s5p_gpio_drvstr_t’ arch/arm/plat-samsung/include/plat/gpio-cfg.h:57:2: error: expected specifier-qualifier-list before ‘s3c_gpio_pull_t’ arch/arm/plat-samsung/include/plat/gpio-cfg.h:148:47: error: expected declaration specifiers or ‘...’ before ‘s3c_gpio_pull_t’ arch/arm/plat-samsung/include/plat/gpio-cfg.h:156:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘s3c_gpio_getpull’ arch/arm/plat-samsung/include/plat/gpio-cfg.h:175:24: error: expected declaration specifiers or ‘...’ before ‘s3c_gpio_pull_t’ arch/arm/plat-samsung/include/plat/gpio-cfg.h: In function ‘s3c_gpio_cfgrange_nopull’: arch/arm/plat-samsung/include/plat/gpio-cfg.h:180:47: error: ‘s3c_gpio_pull_t’ undeclared (first use in this function) arch/arm/plat-samsung/include/plat/gpio-cfg.h:180:47: note: each undeclared identifier is reported only once for each function it appears in arch/arm/plat-samsung/include/plat/gpio-cfg.h:180:47: error: expected ‘)’ before numeric constant arch/arm/plat-samsung/include/plat/gpio-cfg.h:180:47: error: too many arguments to function ‘s3c_gpio_cfgall_range’ arch/arm/plat-samsung/include/plat/gpio-cfg.h:174:12: note: declared here arch/arm/plat-samsung/include/plat/gpio-cfg.h: At top level: arch/arm/plat-samsung/include/plat/gpio-cfg.h:199:26: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘s5p_gpio_get_drvstr’ arch/arm/plat-samsung/include/plat/gpio-cfg.h:210:50: error: expected declaration specifiers or ‘...’ before ‘s5p_gpio_drvstr_t’ Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: SAMSUNG: Clean-up header includesSeungwhan Youn2011-01-111-9/+0Star
| | | | | | | | | | This patch remove including unnecessary/duplicated headers which relative with Samsung SoCs. Signed-off-by: Seungwhan Youn <sw.youn@samsung.com> Acked-by: Jassi Brar <jassi.brar@samsung.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* ASoC: Add HP iPAQ H1940 supportVasily Khoruzhick2010-12-101-0/+296
Add glue driver to make s3c24xx-i2s and uda1380 produce some sound on H1940. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>