summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2017-02-19Merge remote-tracking branch 'asoc/fix/intel' into asoc-linusMark Brown
2017-02-19Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linusMark Brown
2017-02-19ASoC: sun4i-spdif: drop unnessary snd_soc_unregister_component()Wei Yongjun
It's not necessary to unregister a component registered with devm_snd_soc_register_component(). Also removed pointness clk_disable_unprepare() from error path and snd_soc_unregister_platform() from the remove. Fixes: f8260afa444b ("ASoC: sunxi: Add support for the SPDIF block") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-17ASoC: Intel: bxt: Add jack port initialize in bxt_rt298 machineJeeja KP
After the pcm jack is created, create and initialize the pin switch widget for each port. Pin switch is to enable/disable the pin when monitor is connected/disconnected. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-17ASoC: nau8825: automatic BCLK and LRC divde in master modeJohn Hsu
configurable LRC and BCLK divide. The driver will make configurations of LRC and BCLK automatically according to BCLK and FS information in master mode. Signed-off-by: John Hsu <KCHSU0@nuvoton.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: hdac_hdmi: Add device id for GeminilakeVinod Koul
Geminilake is new Intel SoC, so add codec entry for HDMI Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: Intel: Skylake: Add Geminlake IDsVinod Koul
Geminilake is next gen SoC, so add the IDs for Geminilake. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: rt298: Add DMI match for Geminilake reference platformVinod Koul
Geminilake reference platform also uses combo jack for audio connector so we need to set codec pdata to use this based on DMI match for this board. Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: Intel: Skylake: Check device type to get endpoint configurationSenthilnathan Veppur
Geminilake has two different devices connected to the same SSP, so use device_type check to get correct device configuration. Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: Intel: bxt: Add jack port initialize in da7219_max98357a machineJeeja KP
After the pcm jack is created, create and initialize the pin switch widget for each port. Pin switch is to enable/disable the pin when monitor is connected/disconnected. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: Intel: Skylake: Add jack port initialize in nau88l25_ssm4567 machineJeeja KP
After the pcm jack is created, create and initialize the pin switch widget for each port. Pin switch is to enable/disable the pin when monitor is connected/disconnected. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: Intel: Skylake: Add jack port initialize in nau88l25_max98357a machineJeeja KP
After the pcm jack is created, create and initialize the pin switch widget for each port. Pin switch is to enable/disable the pin when monitor is connected/disconnected. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: Intel: Skylake: Add jack port initialize in rt286 machineJeeja KP
After the pcm jack is created, create and initialize the pin switch widget for each port. Pin switch is to enable/disable the pin when monitor is connected/disconnected. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: hdac_hdmi: Add machine pin widget for each portJeeja KP
Represent each port as machine DAPM pin widget. This helps in enable/disable pin when monitor is connected/disconnected in case pcm is rendered to multiple ports. Create machine pin widgets and pin switch kcontrol for each port and report based on the pin status Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_da7219_max98357 machineJeeja KP
Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize jack in bxt_da7219_max98357 machine Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: Intel: bxt: Create ASoC jack for hdmi in bxt_rt298 machineJeeja KP
Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize jack in bxt_rt298.c machine Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: Intel: Skylake: Create ASoC jack for hdmi in nau88l25_ssm4567 machineJeeja KP
Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize jack in skl_nau88l25_ssm4567 machine Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: Intel: Skylake: Create ASoC jack for hdmi in skl_nau88l25_max98357a ↵Jeeja KP
machine Creates ASoC jack for HDMI PCM and calls hdmi codec API to initialize jack in skl_nau88l25_max98357a machine Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: Intel: Skylake: Create ASoC jack for hdmi in rt286 machineJeeja KP
Creates ASoC jack for HDMI pcm and calls hdmi codec API to initialize jack in skl_rt268 machine Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: hdac_hdmi: Use ASoC jack instead of snd_jackJeeja KP
Use snd_soc_jack instead of snd_jack and create the jack in machine driver and pass the jack pointer to hdac_hdmi driver for jack reporting. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: hdac_hdmi: Add support for multiple ports to a PCMJeeja KP
Since we have the MST feature enabled and Pin-Port mux for user to select the converter routing, multiple port mapping to same converter needs to be supported. To support multiple port mapped to same converter following changes are done for this:. o Add port list to pcm, so that multiple ports can be mapped to a PCM. o Jack reporting in case where multiple port are attached to same PCM. o Change hdac_hdmi_get_port_from_cvt(), channel_map, remove functions to parse through all ports mapped to same the PCM. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoc: hdac_hdmi: Configure pin verbs for MSTJeeja KP
To enable stream on a specific port of a MST capable pin, the port needs to be selected before we configure the pin widget verb. When port is selected, all the pin widget verb controlling the sink device operation will be directed to selected port. So add port selection before configuring the pin widget verb. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: hdac_hdmi: Handle MST pin jack detection at boot/resumeJeeja KP
The ELD notification can be received asynchronously from the graphics side and this may happen just at the moment the sound driver is initializing and notification will be missed. Similarly at system resume, the notification is ignored as the ELD and connection states are updated in anyway at the end of the resume. So check the jack status in boot/resume by querying the port presence based on pin caps and report the jack status. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: hdac_hdmi: Add MST verb supportJeeja KP
To support DP MST audio, new pin verbs/params are added. This patch adds helper functions to do following: o To set a specific port o To get the currently selected port o To get the length of port. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ASoC: mediatek: add power-domain get/put ctrl for mt2701Garlic Tseng
add power-domain ctrl for audio driver Signed-off-by: Garlic Tseng <garlic.tseng@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-16ALSA: x86: Don't bail out from PCM ops when disconnectedTakashi Iwai
Currently the driver returns -ENODEV when the monitor is disconnected. But PA alsa module doesn't like this and it starts playing Juliet, kills itself as if it were a fatal tragedy. Since we protect the whole read/write at disconnection, just allow the PCM accesses even during disconnection. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-16ALSA: x86: Minor code rearrangementTakashi Iwai
Put the stuff in the right order; notification should be at the end of the action. Also dropped a superfluous debug print and incorrect comments. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-16ALSA: x86: Stop the stream when buffer is processed after disconnectionTakashi Iwai
This shouldn't happen, but just to be sure... Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-16ALSA: x86: Avoid register accesses during disconnectionTakashi Iwai
It seems that accessing registers during disconnection often leads to the GPU pipe error. The original driver had a similar check in the past, but it was lost through refactoring. Now put a connection check in the register access functions. One exception is the irq handler: it still needs to access the raw register even while disconnected, because it has to read and write to ACK the irq mask. Although the irq shouldn't be raised while disconnected (the stream should have been disabled), let's make it safer for now. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-16ALSA: x86: Don't return an error from chmap ctl at disconnectedTakashi Iwai
It's not wise to return an error at info/get callback when disconnected, which happens at any time. The chmap ctl is supposed to fill zero for such a case, instead. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-16ALSA: x86: Fix memory leak in had_build_channel_allocation_map()Takashi Iwai
The previously allocated chmap has to be released before setting the new one. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-16ALSA: x86: Use snd_pcm_stop_xrun() for connection / disconnection pathsTakashi Iwai
This seems more friendly to user-space, as it's notified at least as an error, instead of forcibly moving the PCM state to SETUP out of sudden. Moreover, snd_pcm_stop() needs an extra PCM spinlock I forgot, while snd_pcm_stop_xrun() takes the spinlock by itself. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-16ALSA: x86: Implement jack controlTakashi Iwai
This patch implements a jack interface for notifying HDMI/DP connection. PA listens to this, so it can handle the monitor connection more gracefully. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-16ALSA: hda/realtek - Cannot adjust speaker's volume on a Dell AIOKai-Heng Feng
The issue is the same as "dd9aa335c880 ALSA: hda/realtek - Can't adjust speaker's volume on a Dell AIO", the output requires to connect to a node with Amp-out capability. Applying the same fixup "ALC298_FIXUP_SPK_VOLUME" can fix the issue. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-15ALSA: hda - add sanity check to force the separate stream tagsJaroslav Kysela
It seems that newer Intel chipsets have more than 15 I/O streams (total). This patch forces the separate stream tags, when this hardware is detected to avoid SDxCTL.STRM field overflow and an unexpected behaviour. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-15ALSA: hda - fix Lewisburg audio issueJaroslav Kysela
Like for Sunrise Point, the total stream number of Lewisburg's input and output stream exceeds 15 (GCAP is 0x9701), which will cause some streams do not work because of the overflow on SDxCTL.STRM field if using the legacy stream tag allocation method. Fixes: 5cf92c8b3dc5 ("ALSA: hda - Add Intel Lewisburg device IDs Audio") Signed-off-by: Jaroslav Kysela <perex@perex.cz> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-14ALSA: hda/patch_sigmatel: Add AmigaOne X1000 pinconfigsDarren Stevens
The AmigaOne X1000 has a Sigmatel STAC92HD700 attached to the HD Audio on an ATI SB600. Add the required settings to enable sound. Signed-off-by: Darren Stevens <darren@stevens-zone.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-13ASoC: fsl_sai: support more than 2 channelsAlexandre Belloni
The FSL SAI can support up to 32 channels using TDM. Report that value so they can actually be used. Tested using 8 channels. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-13ALSA: x86: Drop unused stream.running fieldTakashi Iwai
The pcm_stream_info.running field is only set in the PCM trigger callback but never referred, thus it can be safely removed. Also, properly cover the spinlock in both the trigger START and STOP to protect had_enable_audio() calls. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-13ALSA: x86: Handle reset at prepare callbackTakashi Iwai
Currently the driver handles some reset procedure at the trigger STOP and the underrun functions, where both are executed in the interrupt context. Especially the underrun function has a sync-loop to clear the UNDERRUN status bit, and this is supposed to be one of plausible causes of GPU hangup. Since the job to be done in the interrupt handler should be minimum, we move the reset function out of trigger and underrun, and push it into the prepare (and hw_free) callbacks instead. Here a new flag, need_reset, is introduced to indicate the requirement of the reset procedure. This is for avoiding the multiple resets when PCM prepare is called sequentially. Also in the UNDERRUN bit-clear sync loop, take a longer pause to be in the safer side. Taking a longer delay is no longer a problem now because we're running in the normal context. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-10ALSA: x86: Support S16 formatTakashi Iwai
Now we support S16 PCM format in addition. For this, we need to set packet_mode=1 in AUD_CONFIG register. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-10ALSA: x86: Support S32 formatTakashi Iwai
The hardware has the support for the left-aligned 24bit format in 32bit packet. This corresponds to S32 format in ALSA. We need to set the msbits restriction as well to inform user-space that only MSB 24bit are available. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-10ALSA: x86: Allow no-period-wakeup setupTakashi Iwai
In the current implementation, the driver may update the BDs even at PCM pointer callback. This allows us to skip the period interrupt effectively. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-10ALSA: x86: Allow single period PCM operationTakashi Iwai
This is an implementation of PCM streaming with only 1 period. Since the hardware requires the refresh of BDs after each BD processing finishes, we'd need at least two BDs. The trick is that both BDs point to the same content: the address of the PCM buffer head, and the whole buffer size. Then it loops over to the whole buffer again after it finished once. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-10ALSA: x86: Don't pass SNDRV_PCM_INFO_BATCH flagTakashi Iwai
The PCM engine on LPE audio isn't like a batch-style process any longer, but rather it deals with the standard ring buffer. Remove the BATCH info flag so that PA can handle the buffer in timer-sched mode. Similarly, the DOUBLE flag is also superfluous. Drop both bits. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-09ASoC: zx-i2s: introduce pclk for zx2967 familyBaoyou Xie
The pclk is necessary for zx2967 I2S controller. the driver currently doesn't handle it. This is something we need to fix. In turn, the driver supports zx296718's I2S controller. By the way, this patch also change the clock name from tx to wclk to make it clear. Signed-off-by: Baoyou Xie <baoyou.xie@linaro.org> Reviewed-by: Shawn Guo <shawnguo@kernel.org> Reviewed-by: Jun Nie <jun.nie@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-09ALSA: hda - adding a new NV HDMI/DP codec ID in the driverHui Wang
Without this change, the HDMI/DP codec will be recognised as a generic codec, and there is no sound when playing through this codec. As suggested by NVidia side, after adding the new ID in the driver, the sound playing works well. Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-08ASoC: hdmi-codec: remove HDMI device unregisterVincent Abriou
While unregistering the hdmi-codec, the hdmi device list must be cleaned up. It avoid kernel page fault when registering again the hdmi-codec. Signed-off-by: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-08ASoC: sunxi: allow the analog codec driver to be built on ARM64Icenowy Zheng
As the 64-bit Allwinner H5 SoC has the same analog codec part (also the same digital part) as H3, enable the driver to be built on ARM64 Allwinner platform, so that it can be used on H5. Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2017-02-08ASoC: hdac_hdmi: Add support to handle MST capable pinJeeja KP
To handle jack event and configuration of the pin widget for MST capable pin, this patch adds: o Flag to identify the pin is MST capable. o In notify callback(), based on the pipe and port information marks if the port is mst_capable. In case of non MST, port is defaulted to zero. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>