summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
...
| | | | | | | * | | | | ASoC: rt5670: refactor DMI quirks and fix Dell Venue settingsPierre-Louis Bossart2017-09-251-19/+105
| | | | | | | | |/ / / | | | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Additional checks exposed a mistake in the quirk for the Dell Venue Pro 5855 (Dmic2 instead of Dmic1). Rather than adding quirk tables, merge all quirks in a single table and use flags to differentiate platforms. Also add a parameter override to help support additional platforms using this codec CC: Bard Liao <bardliao@realtek.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | * | | | | ASoC: rt5663: Check the JD status in the button pushingoder_chiou@realtek.com2017-11-101-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check the JD status in the button pushing to prevent the IRQ that is locked by button pushing event while the jack unpluging. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | * | | | | ASoC: rt5663: Delay and retry reading rt5663 ID registerOder Chiou2017-11-091-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the probe, the codec may not be ready for I2C reading or there are some glitches on the i2c line. So if the i2c reading value is incorrect, it will read again after delay. This issue is similar the patch https://patchwork.kernel.org/patch/9681421/. In current project, these 2 devices were connected to the same i2c line, and they met the same problem. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | * | | | | ASoC: rt5663: Add the function of impedance sensingOder Chiou2017-09-191-4/+214
| | | | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support the function of impedance sensing. It could be set the matrix row number of the impedance sensing table and the related parameters in the DTS. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | | | | ASoC: rt5659: move set_pll to codec levelBard Liao2017-10-181-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move set_pll function to codec level and people can use it at both codec and dai level. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | | | | ASoC: rt5659: move set_sysclk to codec levelBard Liao2017-10-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move set_sysclk to codec level and people can use it at both codec and dai level. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | ASoC: rt5651: Enable JD1_1 quirk for KIANO laptoptCarlo Caione2017-10-261-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The KIANO SlimNote 14.2 laptop uses the JD1_1 input pin for jack detection. Set the correct quirk in the codec driver. Signed-off-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | ASoC: rt5651: Rework quirk logicCarlo Caione2017-10-261-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rework a bit the quirk logic in the codec driver to simplify the DMI-based quirk assignment for non-DT platforms. Signed-off-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | ASoC: rt5651: Enable jack detection on JD* pinsCarlo Caione2017-10-262-2/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable jack detection for the RT5651 codec on the JD* pins. Signed-off-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | ASoC: rt5651: Convert rt5651 micbias1 to a supply widgetCarlo Caione2017-10-231-2/+2
| | | | | |/ / / / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MICBIAS widget type has been deprecated. Convert it to a SUPPLY widget. Signed-off-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | | ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2Akshu Agrawal2017-11-091-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Minimum time required between power On of codec and read of RT5645_VENDOR_ID2 is 400msec. We should wait that long before reading the value. TEST=Cold boot the device and check for sound device. Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com> Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | | ASoC: rt5645: remove unexisting route on new rt5645Bard Liao2017-10-311-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "SPOL MIX DAC R1 Switch" and "SPOL MIX SPKVOL R Switch" are only exist in the early version of rt5645. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | | ASoC: rt5645: Make a few struct constJean Delvare2017-09-191-4/+4
| | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These dmi_system_id structures and associated platform data are never modified so they can be marked const. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Bard Liao <bardliao@realtek.com> Cc: Oder Chiou <oder_chiou@realtek.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> -- sound/soc/codecs/rt5645.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | | |
| | | \ \ \ \ \
| | *-. \ \ \ \ \ Merge remote-tracking branches 'asoc/topic/rl6231' and 'asoc/topic/rt5514' ↵Mark Brown2017-11-105-5/+57
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into asoc-next
| | | | * | | | | | ASoC: rt5514: work around link errorArnd Bergmann2017-11-102-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main rt5514 driver optionally calls into the SPI back-end to load the firmware. This causes a link error when one driver selects rt5514 as built-in and another driver selects rt5514-spi as a loadable module: sound/soc/codecs/rt5514.o: In function `rt5514_dsp_voice_wake_up_put': rt5514.c:(.text+0xac8): undefined reference to `rt5514_spi_burst_write' As a workaround, this adds another silent symbol, to force rt5514-spi to be built-in for that configuration. I'm not overly happy with that solution, but couldn't come up with anything better. Using 'IS_REACHABLE()' would break the case that relies on the loadable module, and all other ideas would result in more complexity. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | ASoC: rt5514: mark PM functions as __maybe_unusedArnd Bergmann2017-11-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new functions are only used when CONFIG_PM is enabled, leading to a harmless warning: sound/soc/codecs/rt5514-spi.c:474:12: error: 'rt5514_resume' defined but not used [-Werror=unused-function] sound/soc/codecs/rt5514-spi.c:464:12: error: 'rt5514_suspend' defined but not used [-Werror=unused-function] This marks them as __maybe_unused to make the build silent again. Fixes: 58f1c07d23cd ("ASoC: rt5514: Voice wakeup support.") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | ASoC: rt5514-spi: check irq status to schedule data copy in resume functionoder_chiou@realtek.com2017-11-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For wake on voice use case, we need to copy data from DSP buffer to PCM stream when system wakes up by voice. However the edge triggered IRQ could be missed when system wakes up, in that case the irq function will not be called. If the substream was constructed beforce suspend, we will schedule data copy in resume function. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | ASoC: rt5514: Voice wakeup support.oder_chiou@realtek.com2017-11-081-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the rt5514 Wake on Voice device is opened while suspended, it will be able to wake up the system when a voice command is detected. This patch also supports user-space policy to override wakeup behavior by /sys/bus/spi/drivers/rt5514/spi2.0/power/wakeup. Signed-off-by: Chinyue Chen <chinyue@chromium.org> Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | ASoC: rt5514-spi: Let the buf_size to align with period_bytesOder Chiou2017-11-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch lets the buf_size to align with period_bytes to prevent the buffer reading over the real size of the DSP buffer and also avoid to calculate the wrong size of remaining data. Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | ASoC: rt5514: The ACPI also should use the function rt5514_parse_dp()oder_chiou@realtek.com2017-11-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch fixed that the ACPI cannot access the device property from the function rt5514_parse_dp(). Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | | | ASoC: rl6231: make arrays div and pd static const, reduces object code sizeColin Ian King2017-09-191-2/+3
| | | | |/ / / / / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't populate the read-only arrays div and pd on the stack, instead make them static const. Makes the object code smaller by 210 bytes: Before: text data bss dec hex filename 2869 720 0 3589 e05 sound/soc/codecs/rl6231.o After: text data bss dec hex filename 2495 880 0 3375 d2f sound/soc/codecs/rl6231.o Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | | | |
| | | \ \ \ \ \ \
| | | \ \ \ \ \ \
| | | \ \ \ \ \ \
| | | \ \ \ \ \ \
| | | \ \ \ \ \ \
| | *-----. \ \ \ \ \ \ Merge remote-tracking branches 'asoc/topic/max98925', 'asoc/topic/max98927', ↵Mark Brown2017-11-105-96/+204
| | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'asoc/topic/msm8916' and 'asoc/topic/omap' into asoc-next
| | | | | | * | | | | | | ASoC: omap-hdmi-audio: Handle return value of devm_kasprintfArvind Yadav2017-09-211-0/+3
| | | | | | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | | | | | | ASoC: codecs: msm8916-wcd-analog: configure micbias in mbhc setupDamien Riegel2017-10-041-44/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The very first time a headset is plugged in, detection is unreliable because bias hasn't been configured yet, it's done once a mechanical insertion interrupt has been triggered, so following insertions (and thus detections) are not affected. To fix the very first detection, the bias must also be configured in the function that setup the MBHC. Move pm8916_wcd_setup_mbhc after pm8916_mbhc_configure_bias to avoid a forward declaration. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | | | | | | ASoC: codecs: msm8916-wcd-analog: fix module autoloadNicolas Dechesne2017-10-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo snd_soc_msm8916_analog | grep alias $ After this patch: $ modinfo snd_soc_msm8916_analog | grep alias alias: of:N*T*Cqcom,pm8916-wcd-analog-codecC* alias: of:N*T*Cqcom,pm8916-wcd-analog-codec Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | * | | | | | | ASoC: codecs: msm8916-wcd-analog: use btn0 released detectionDamien Riegel2017-09-281-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | msm8916-wcd-analog uses button0 to differentiate between headphone and headset. Under some circumstances, button pressed and released interrupts are not fired as the driver expects it. For instance, with some connectors, there are spurious button-pressed interrupts when unplugging a headphone, without the corresponding button-released interrupt. But the codec always alternates between button pressed and released interrupts, it cannot fire two interrupts of the same kind in a row. That means that when the headphone is plugged back, only a button-released interrupt will be fired instead of pressed then released. This causes the driver to report headphone as headset. By changing the logic and relying on button 0 release interrupt, the driver could be made more robust for connectors that differ from the one used on the Dragonboard's audio mezzanine. Signed-off-by: Damien Riegel <damien.riegel@savoirfairelinux.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: max98927: Added max98927_dai_tdm_slot functionRyan Lee2017-09-252-16/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: max98927: Added support for DSP_A and DSP_B formatRyan Lee2017-09-252-17/+24
| | | | | |/ / / / / / | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Ryan Lee <ryans.lee@maximintegrated.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | | | | ASoC: max98925: Return proper error if revision mismatchAxel Lin2017-10-131-10/+13
| | | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return proper error instead of 0 if the revision does not match. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | | | | |
| | | \ \ \ \ \ \ \
| | | \ \ \ \ \ \ \
| | | \ \ \ \ \ \ \
| | *---. \ \ \ \ \ \ \ Merge remote-tracking branches 'asoc/topic/hdmi', 'asoc/topic/img' and ↵Mark Brown2017-11-108-78/+384
| | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'asoc/topic/kirkwood' into asoc-next
| | | | | * | | | | | | | ASoC: kirkwood: make kirkwood_soc_platform constBhumika Goyal2017-09-272-2/+2
| | | | | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make kirkwood_soc_platform const as it only passed to a const argument of the function snd_soc_register_platform in the file referencing it. Make the declaration const too. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: img-spdif-out: Add control of sys clock to runtime PMEd Blake2017-10-091-14/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable sys clock as well as ref clock when runtime suspended. Signed-off-by: Ed Blake <ed.blake@sondrel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: img-spdif-out: Add suspend / resume handlingEd Blake2017-10-091-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement suspend and resume callbacks to save and restore register state, to support platforms where the power is disabled during suspend. In future the driver could be converted to use regmap which would simplify the suspend and resume code. Signed-off-by: Ed Blake <ed.blake@sondrel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: img-spdif-in: Add runtime PMEd Blake2017-10-091-14/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add runtime PM to disable the clock when the device is not in use. The ASoC core takes care of the pm_runtime_get_sync / put calls so we just need to provide runtime_suspend / runtime_resume functions and enable runtime PM. Signed-off-by: Ed Blake <ed.blake@sondrel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: img-spdif-in: Add suspend / resume handlingEd Blake2017-10-091-1/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement suspend and resume callbacks to save and restore register state, to support platforms where the power is disabled during suspend. In future the driver could be converted to use regmap which would simplify the suspend and resume code. Signed-off-by: Ed Blake <ed.blake@sondrel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: img-i2s-out: Add control of sys clock to runtime PMEd Blake2017-10-091-29/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disable sys clock as well as ref clock when runtime suspended. Signed-off-by: Ed Blake <ed.blake@sondrel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: img-i2s-out: Add suspend / resume handlingEd Blake2017-10-091-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement suspend and resume callbacks to save and restore register state, to support platforms where the power is disabled during suspend. In future the driver could be converted to use regmap which would simplify the suspend and resume code. Signed-off-by: Ed Blake <ed.blake@sondrel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: img-i2s-in: Add runtime PMEd Blake2017-10-091-17/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add runtime PM to disable the clock when the device is not in use. The ASoC core takes care of the pm_runtime_get_sync / put calls so we just need to provide runtime_suspend / runtime_resume functions and enable runtime PM. Signed-off-by: Ed Blake <ed.blake@sondrel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: img-i2s-in: Add suspend / resume handlingEd Blake2017-10-091-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement suspend and resume callbacks to save and restore register state, to support platforms where the power is disabled during suspend. In future the driver could be converted to use regmap which would simplify the suspend and resume code. Signed-off-by: Ed Blake <ed.blake@sondrel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: img-parallel-out: Check pm_runtime_get_sync return codeEd Blake2017-10-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check the the pm_runtime_get_sync return code and return if an error. Signed-off-by: Ed Blake <ed.blake@sondrel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: img-spdif-out: Rename suspend / resume funcsEd Blake2017-10-041-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename suspend and resume functions to runtime_suspend and runtime_resume, which is what they actually are. This will avoid confusion when adding suspend and resume functions in a subsequent patch. Signed-off-by: Ed Blake <ed.blake@sondrel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: img-parallel-out: Add pm_runtime_get/put to set_fmt callbackEd Blake2017-10-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add pm_runtime_get_sync and pm_runtime_put calls to set_fmt callback function. This fixes a bus error during boot when CONFIG_SUSPEND is defined when this function gets called while the device is runtime disabled and device registers are accessed while the clock is disabled. Signed-off-by: Ed Blake <ed.blake@sondrel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | * | | | | | | | ASoC: img-i2s-out: Rename suspend / resume funcsEd Blake2017-10-041-7/+7
| | | | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename suspend and resume functions to runtime_suspend and runtime_resume, which is what they actually are. This will avoid confusion when adding suspend and resume functions in a subsequent patch. Signed-off-by: Ed Blake <ed.blake@sondrel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | | | | | | ASoC: hdmi-codec: use sizeof_field rather than declaring hcpColin Ian King2017-09-191-4/+1
| | | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use FIELD_SIZEOF rather than declaring and initializing hcp. Remove unused variables. Cleans up clang warning: warning: Value stored to 'hcp' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | | | | |
| | | \ \ \ \ \ \ \
| | | \ \ \ \ \ \ \
| | | \ \ \ \ \ \ \
| | | \ \ \ \ \ \ \
| | | \ \ \ \ \ \ \
| | | \ \ \ \ \ \ \
| | | \ \ \ \ \ \ \
| | *-------. \ \ \ \ \ \ \ Merge remote-tracking branches 'asoc/topic/dwc', 'asoc/topic/fallthrough', ↵Mark Brown2017-11-1013-48/+91
| | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'asoc/topic/fsi', 'asoc/topic/fsl' and 'asoc/topic/graph' into asoc-next
| | | | | | | * | | | | | | | ASoC: add mclk-fs support to audio graph cardOlivier Moysan2017-11-101-8/+39
| | | | | | | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mclk-fs support to audio graph card as it was previously implemented in simple card. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | * | | | | | | | ASoC: fsl-asoc-card: Handle return value of devm_kasprintfArvind Yadav2017-09-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | devm_kasprintf() can fail here and we must check its return value. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | * | | | | | | | ASoC: fsl-asoc-card: Don't error out if ENOTSUPPNicolin Chen2017-09-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The snd_soc_component_set_sysclk() and snd_soc_dai_set_tdm_slot() in the soc-core.c will return -ENOTSUPP if there is no function implementation for them in the dai and component drivers. So this patch tries to ignore this errno. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | * | | | | | | | ASoC: fsl_ssi: Caculate bit clock rate using slot number and widthNicolin Chen2017-09-191-20/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The set_sysclk() now is used to override the output bit clock rate. But this is not a common way to implement a set_dai_sysclk(). And this creates a problem when a general machine driver (simple-card for example) tries to do set_dai_sysclk() by passing an input clock rate for the baud clock instead of setting the bit clock rate as fsl_ssi driver expected. So this patch solves this problem by firstly removing set_sysclk() since the hw_params() can calculate the bit clock rate. Secondly, in order not to break those TDM use cases which previously might have been using set_sysclk() to override the bit clock rate, this patch changes the driver to calculate the bit clock rate using the slot number and the slot width from the via set_tdm_slot(). The patch also removes an obsolete comment of the dir parameter. Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
| | | | | | * | | | | | | | ASoC: fsl_spdif: make const arrays rate staticColin Ian King2017-09-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't populate the const arrays rate on the stack, instead make them static. Makes the object code smaller by 220 bytes: Before: text data bss dec hex filename 24385 9776 128 34289 85f1 sound/soc/fsl/fsl_spdif.o After: text data bss dec hex filename 24005 9936 128 34069 8515 sound/soc/fsl/fsl_spdif.o Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Mark Brown <broonie@kernel.org>
OpenPOWER on IntegriCloud