aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/codecs
AgeCommit message (Collapse)AuthorFilesLines
2016-02-24ASoC: rt298: enable IRQ for jack detectionBard Liao2-0/+14
There are some registers needed for enabling rt298 IRQ missed on current driver. Signed-off-by: Bard Liao <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-24ASoC: adau17x1: Add basic DT support for adau17x1Andreas Irestål4-0/+44
Signed-off-by: Andreas Irestål <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-24ASoC: adau17x1: Correct typos in file headersAndreas Irestål4-4/+4
Signed-off-by: Andreas Irestål <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-24ASoC: adau17x1: Fix incorrect BCLK ratio definitionsAndreas Irestål1-3/+3
Signed-off-by: Andreas Irestål <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-24ASoC: arizona: Make logging of FLL calculations clearerRichard Fitzgerald1-4/+5
The debug logging of FLL calculations was confusing. Values were printed in hex without indicating this by a leading 0x, and despite these normally being required in decimal. Also where the register value isn't the actual value (it s a power-of-two or 0 means 1, 1 means 2, ...) it was unclear whether the actual or register value was shown. This patch changes the log print so that all mathematical values are shown in decimal, all register values are shown in hex with a 0x prefix, and where the register value isn't the actual integer value the decimal integer value is shown in () after the hex register value. Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-24ASoC: max9867: Use params_width instead of open-codedAxel Lin1-3/+2
Signed-off-by: Axel Lin <[email protected]> Acked-by: anish kumar <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-24ASoC: max9867: fix type of variable containing error codesAndrzej Hajda1-1/+2
value variable can contain error values and is compared with zero. Its type must be signed. The problem has been detected using coccinelle script scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Axel Lin <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-24ASoC: wm9713: fix regmap free pathRobert Jarzmik1-1/+1
In the conversion to regmap, I assumed that the devm_() variant could be used in the soc probe function. As a mater of fact with the current code the regmap is freed twice because of the devm_() call: (mutex_lock) from [<c01f6624>] (debugfs_remove_recursive+0x50/0x1d0) (debugfs_remove_recursive) from [<c02bf800>] (regmap_debugfs_exit+0x1c/0xd4) (regmap_debugfs_exit) from [<c02ba1f8>] (regmap_exit+0x28/0xc8) (regmap_exit) from [<c02aa258>] (release_nodes+0x18c/0x204) (release_nodes) from [<c02a278c>] (device_release+0x18/0x90) (device_release) from [<c0239030>] (kobject_release+0x90/0x1bc) (kobject_release) from [<c0395c94>] (wm9713_soc_remove+0x1c/0x24) (wm9713_soc_remove) from [<c0384884>] (soc_remove_component+0x50/0x7c) (soc_remove_component) from [<c0386c28>] (soc_remove_dai_links+0x118/0x228) (soc_remove_dai_links) from [<c038721c>] (snd_soc_register_card+0x4e4/0xdd4) (snd_soc_register_card) from [<c0393c54>] (devm_snd_soc_register_card+0x34/0x70) Fix this by replacing the devm_regmap initialization code with the non devm_() variant. Fixes: 700dadfefc3d ASoC: wm9713: convert to regmap Signed-off-by: Robert Jarzmik <[email protected]> Acked-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-23ASoC: hdac_hdmi: Add PM supportJeeja KP1-0/+76
The codec registers are reset during S3. So need to reconfigure all pins and DP1.2 feature again after resume from S3. Also reprogram the required registers if the S3 was triggered during playback. In suspended state ELD notify callback is not processed, So add ELD check for all pins as well. Also turn the codec power domain OFF which is kept ON during controller resequencing and codec reenumeration. Signed-off-by: Jeeja KP <[email protected]> Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-23ASoC: hdac_hdmi: Fix to wait for D3 before powering off codecSubhransu S. Prusty1-1/+11
Powering off codec immediately after sending D3 verb may not set the node to D3 state. So wait for a confirmation response before shutting down codec. Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-22ASoC: rt5640: add master clock handling for rt5640Sugar Zhang2-0/+33
enable/disable master clock when codec is active or not. Signed-off-by: Sugar Zhang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-21ASoC: max9867: Constify max9867_reg and max9867_regmapAxel Lin1-2/+2
Signed-off-by: Axel Lin <[email protected]> Acked-by: anish kumar <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-21ASoC: max9867: Make max9867_i2c_id NULL terminatedAxel Lin1-0/+1
Signed-off-by: Axel Lin <[email protected]> Acked-by: anish kumar <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-21ASoC: max9867: Add CONFIG_SND_SOC_MAX9867 to buildAxel Lin1-0/+1
Signed-off-by: Axel Lin <[email protected]> Acked-by: anish kumar <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-21ASoC: max98926: Constify max98926_reg and max98926_regmapAxel Lin1-2/+2
Signed-off-by: Axel Lin <[email protected]> Acked-by: anish kumar <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-21ASoC: wm_adsp: wm_coeff_{read|write}_control should use passed lengthCharles Keepax1-8/+8
wm_coeff_{read|write}_control were using the control length rather than the length parameter passed to them. This is not causing any issues as the two values are currently always the same, but this needs fixed to allow future improvements. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-21ASoC: wm_adsp: Fixup some odd line wrappingCharles Keepax1-16/+7
Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-21ASoC: wm_adsp: Explicitly set the control access flags in all casesCharles Keepax1-0/+3
In the case where the firmware does not tell us the access flags for the control, we let ALSA select a default (READWRITE). But really we should be applying the volatile flag in this case, as we will read the control from the DSP if it is on in this case. This patch explicitly sets the access flags in all cases. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-21ASoC: wm_adsp: Avoid narrow race condition on compr pointerCharles Keepax1-1/+1
There is a very small window between then wm_adsp_compr_free gets call and when the DSP is actually powered down. If we get an IRQ from the DSP in this window then the wm_adsp_compr pointer will be NULL. This patch adds a check for this into the IRQ handler to avoid any issues when this happens. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-20ASoC: hdac_hdmi: Fix to reconfigure registers in runtime resumeSubhransu S. Prusty1-13/+16
The register are reset during the D3 to D0 transition. So reconfigure them. Also as all DAIs are now supported, remove the dai id check in prepare. Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-20ASoC: hdac_hdmi: Fix to keep codec power active during enumeration.Ramesh Babu1-0/+12
The codec power is turned OFF in the first explicit call to pm_runtime_suspend to keep the i915 refcount balanced. During regular operation, the power is turned ON/OFF in runtime PM handlers. Signed-off-by: Ramesh Babu <[email protected]> Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-20ASoC: hdac_hdmi: Don't fail in dai startup to make userland happySubhransu S. Prusty1-13/+35
In dai startup, driver was checking for ELD and would fail if no monitor is connected. This causes userland like PA, CRAS to be unhappy as they scan the device list at bootup. So move the ELD check to hw_params and fail if valid ELD is not found. Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-20ASoC: hdac_hdmi: Fix possible memory leak in hw_paramsSubhransu S. Prusty1-5/+11
It's possible for hw_params to be called two times. So add NULL check to prevent memory leak. Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-18ASoC: max9867: Changed the if-else case to switch caseanish kumar1-6/+12
Signed-off-by: anish kumar <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-18ASoC: Add max9867 codec driveranish kumar4-0/+625
Signed-off-by: anish kumar <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-17ASoC: max98926: Fix blr_clk_ratio calculationAxel Lin1-2/+4
Current code calculates blr_clk_ratio before setting max98926->ch_size, fix it. Signed-off-by: Axel Lin <[email protected]> Acked-by: anish kumar <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-17ASoC: hdac_hdmi: Remove 'edev' NULL checkFabio Estevam1-3/+0
Commit 4a3478debf36 ("ASoC: hdac_hdmi: Add jack reporting") leads to the following Smatch complaint: sound/soc/codecs/hdac_hdmi.c:971 hdac_hdmi_present_sense() warn: variable dereferenced before check 'edev' (see line 967) As explained by Subhransu S. Prusty: "This NULL check is not required, can be removed. edev object is expected to be present when the present_sense is called. This is called from places where this edev object is already available." So remove the evdev NULL check. Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Acked-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-15ASoC: hdac_hdmi: Add infoframe support for dp audioSubhransu S. Prusty1-10/+64
For DP audio support, infoframe needs to be different. Based on get_conn_type result we pack either HDMI or DP infoframe. Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-15ASoC: hdac_hdmi: Enable playback on all enumerated portsSubhransu S. Prusty1-42/+132
Last patch added infrastructure to render over all the ports, PCM<->cvt<- pin mapping and user selection of controls. But we still have restriction of playback on the default port alone, so remove that. This patch removes the hardcoding of cvt<->pin map from the dai. Cvt and pin for a dai are now derived from the already stored pcm list of device opened. We query connection list of a pin from codec to validate the cvt<->pin map. If connection list returns zero, then monitor is not connected so fail playback. Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Jeeja KP <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-15ASoC: hdac_hdmi: Add jack reportingJeeja KP2-3/+163
Jack is created based on pcm devices enumerated, so we will create Jack as "HDMI/DP, pcm=x Jack". This style is expected by current usermode like PulseAudio and CRAS. This patch exports an API which can be used to register Jack based on PCM. This API also establishes the map between PCM and cvt. Further cvt to pin mapping is established with the help of usermode selection based on the board topology. During device probe as the PCMs may not be registered, initial pin sense don't report jack events. So, first time jack reporting is done during user selection of mux control. Signed-off-by: Jeeja KP <[email protected]> Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-15ASoC: hdac_hdmi: Create widget/route based on nodes enumeratedSubhransu S. Prusty1-22/+219
In skylake, HDMI codec enumerates 3 pins and 3 cvts. Stream can be routed from any cvt to any pin based on the connection list queried from the pin. This patch removes the static modelling of widget/route and creates it dynamically based on the codec widgets enumerated. Mux widgets are added to represent the map between a cvt and pin. Ideally the mux widgets should be created based on the connection list queried from the pin widget. But due to HW behavior, if an external display is not connected on a port, querying the connection list returns zero. So create mux widgets to map all the cvt to all pins. At runtime, playback support on a pin can be verified based on the connection list query. Few function in driver have additional arguments now to support this. Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-15ASoC: hdac_hdmi: create dais based on number of cvtsSubhransu S. Prusty1-32/+91
After enabling all pins/cvts, Skylake HDMI codec enumerates 3 converters. Three independent streams can be supported with 3 cvts. This patch removes the static dai creation and creates dais based on the number of cvts queried. Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-15ASoC: hdac_hdmi: Enable DP1.2 and all converters/pinsSubhransu S. Prusty1-0/+43
Skylake supports 3 pin and 3 converter widgets. But by default only one converter and pin widget are enabled. In skylake platform the DP port is on a different port which is not enabled by default. To enable playback on DP port, enable all pin and converter widget by sending a vendor VERB for a vendor widget to set required bits. As we are enabling the DP support enable the DP1.2 feature as well. Enabling DP1.2 and all widget changes are copied from patch_hdmi.c. Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-15ASoC: hdac_hdmi: Apply constraints based on ELDSubhransu S. Prusty2-3/+49
Uses the drm ELD core framework to apply rate and channel Also compute the format to be set based on ELD. Even though the channel constraint is based on ELD, infoframe is set with stereo only. Multichannel support will be added later. Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-15ASoC: hdac_hdmi: Add hotplug notification and read ELDSubhransu S. Prusty1-6/+211
This patch uses i915 component framework to register for hotplug notification. In the hotplug notification, driver reads pin sense and ELD by sending PIN_SENSE and ELD verbs over HDA bus. Once it identifies valid pin sense and valid ELD, store the ELD into the corresponding pin map buffer. Also read the monitor present sense during resume and ignore the ELD notify from graphics during PM as is done in legacy hda, commit 8ae743e82f0b ("ALSA: hda - Skip ELD notification during system suspend") Signed-off-by: Subhransu S. Prusty <[email protected]> Signed-off-by: Vinod Koul <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-10Merge remote-tracking branches 'asoc/fix/rt5659', 'asoc/fix/sigmadsp', ↵Mark Brown5-38/+40
'asoc/fix/simple', 'asoc/fix/wm5110' and 'asoc/fix/wm8960' into asoc-linus
2016-02-10Merge remote-tracking branches 'asoc/fix/imx-spdif', 'asoc/fix/mtk', ↵Mark Brown1-23/+3
'asoc/fix/mxs-saif', 'asoc/fix/qcom' and 'asoc/fix/rt286' into asoc-linus
2016-02-10Merge remote-tracking branches 'asoc/fix/amd', 'asoc/fix/arizona', ↵Mark Brown1-1/+42
'asoc/fix/dpcm', 'asoc/fix/dwc', 'asoc/fix/fsl' and 'asoc/fix/fsl-ssi' into asoc-linus
2016-02-10Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linusMark Brown1-1/+1
2016-02-10ASoC: arizona: fref must be limited in pseudo-fractional modeRichard Fitzgerald1-1/+42
When the FLL is in pseudo-fractional mode there is an additional limit on fref based on the fratio, to prevent aliasing around the Nyquist frequency. If fref exceeds this limit the refclk divider must be increased and the calculation tried again until a suitable combination of fref and fratio is found or we have to fall back to integer mode. This patch also adds some debug log prints around this code. Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-10ASoC: sigmadsp: Fix missleading return valuePascal Huerst1-1/+4
Forwarding the return value of i2c_master_send, leads to errors later on, since i2c_master_send returns the number of bytes transmittet. Check for ret < 0 instead and return 0 otherwise. Signed-off-by: Pascal Huerst <[email protected]> Acked-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-05ASoC: adau17x1: Cache writes when core clock is disabledAndreas Irestål1-0/+8
In some configurations, the dai registers get written before the bias level is changed in the codec driver. This leads to a situation where an initial write to the serial port register gets ignored, and future writes may as well, since regmap thinks that the codec already holds the value. More specifically, configuring the codec as i2s master would in fact result in the codec running as slave, a situation where no i2s clocks are generated and hence no data is transferred. This change makes sure that regmap only caches writes when the core clock is disabled, and syncs regmap whenever enabling the core clock again. Signed-off-by: Andreas Irestål <[email protected]> Acked-by: Lars-Peter Clausen <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-05ASoC: arizona: Add support for SNDRV_PCM_RATE_KNOTCharles Keepax7-51/+23
The Arizona CODECs support several rates that do not have simple defines in ALSA. This patch adds support for SNDRV_PCM_RATE_KNOT so that users can open stream at these rates. As part of this we should always set constraints in arizona_startup, currently we only set the constraints if we already have a clock to limit rates to that family of sample rates. This patch updates this to set a constraint of all rates supported by the chip if we do not already know which family of rates to limit to. Finally we also reduce the list of rates supported in the constraints to only include those that are supported on current parts. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-04ASoC: cs42xx8: fix the noise in the right dac channel with mono playbackZidan Wang1-2/+8
When playback mono wav with record in background, there will be some nosie in the right dac channel. It seems that the ADC data has been routed to the dac channel. The cs42888 have 8 dac channels, it's appropriate to mute the unused dac channels, and the noise will disappear. Steps to reproduce this issue: arecord -D hw:0,0 -f S16_LE -r 48000 -c 1 a.wav & aplay -Dhw:0,0 audio48k16M.wav Signed-off-by: Zidan Wang <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-03ASoC: rt5514: add rt5514 codec driverOder Chiou4-0/+1242
This is the initial codec driver for rt5514. The codec includes a low power DSP for voice wake up. The register address is incremental by 4 in the DSP memory map. In order to recover the codec settings in the codec mode and manipulate the DSP mode for voice wake up, we use the multi-level register map. One is for ALSA API in codec mode that can be recovered by cache before recording. Another is for DSP related settings that can be accessed with 32bit address of the DSP in the application of voice wake up. Signed-off-by: Oder Chiou <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-02ASoC: wm_adsp: Return sample rate in wm_adsp_compr_pointerCharles Keepax1-0/+5
We should return a valid sample rate from the pointer callback, this patch adds this into the driver. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-02-02ASoC: wm_adsp: Add missing const from region definitionsCharles Keepax1-2/+2
Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-29ASoC: cs47l24: Add voice control compressed streamRichard Fitzgerald1-2/+96
This patch adds firmware compressed stream capture support and DAI hookups for voice control firmware (based on the wm5110 implementation.) Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-29ASoC: wm5102: Add support for the audio trace firmwareCharles Keepax1-1/+84
wm5102 also supports the audio trace firmware, this patch adds support for this into the wm5102 driver. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>
2016-01-29ASoC: wm5110: Add support for audio trace firmwareCharles Keepax3-6/+40
Mainly this adds DAI links for the audio trace, however, it is also necessary to update the data IRQ handler to check more cores. We have the handler check every core so it should not be necessary to update this function if more compressed firmwares are added in the future. Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Mark Brown <[email protected]>