Add EC reference support for USB audio ADSP solution so that
the USB audio rx can be used for echo cancellation.
Change-Id: If99081c1fd356e69710c94441affec92fac24075
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
Enable HDMI RX for 8996, otherwise soundcard
will not get registered for the flavors which
supports HDMI.
CRs-Fixed: 1023892
Change-Id: I0d2442c7b3d156ad919626a6015f0fbbf2116c3f
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Parameter fragments and fragment_size are type of u32. U32_MAX is
the correct check.
CRs-Fixed: 1014726
Change-Id: Ia6d4755408646ac4a75724f3c6f2177651875da3
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
Currently the AFE input port is connected to LSM while sending operation
mode parameter to CPE. It is possible that in certain cases, the operation
mode does not need to be sent at all. In such case, the input port still
needs to be connected. Fix this by moving the connection to AFE input port
during LSM_START so everytime LSM is started, it is connected to the
correct AFE port.
CRs-fixed: 1012715
Change-Id: I6dbc344d5d7063c7cfd2fb29c2c39fdee1250bbf
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Change all qdsp6v2 audio driver to use %pK instead
of %p. %pK hides addresses when the users doesn't
have kernel permissions. If address information
is needed echo 0 > /proc/sys/kernel/kptr_restrict.
Change-Id: I7baa9f127266726fecf9238167a1e0128a258847
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Request device ungroup of speaker channels for independent
disable. It is possible that stereo speaker channels can be
disabled one after other, so remove them from group otherwise
speaker can be left in enabled state.
CRs-fixed: 1007465
Change-Id: I358ab4edcb85ec65b064ca28368ad744f2d36870
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add support for 48x2 frame structure in soundwire
so that when slave device data path is not enabled,
all control messaging will happen with 48x2 frame.
Soundwire slave devices send an explicit request to
enable data path which in turn change the frame
structure to 48x16.
CRs-fixed: 996586
Change-Id: Ia4329ac982eb2a29a2b925897cd87ca9711c30e3
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add slimbus 6 playback hostless and slimbus_6_rx back-end
dai-link to enable independent backend for different devices
during audio playback.
Change-Id: Idac26ac45f1177db96fc3fb5d4a5e2f837f86d1b
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
Add USB audio via ADSP support in the machine driver.
Change-Id: I9773555fb025a41afd27e078f6ef23a4d140128f
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
commit addacd801e1638f41d659cb53b9b73fc14322cb1 upstream.
The HD-audio reconfig function got broken in the recent kernels,
typically resulting in a failure like:
snd_hda_intel 0000:00:1b.0: control 3:0:0:Playback Channel Map:0 is already present
This is because of the code restructuring to move the PCM and control
instantiation into the codec drive probe, by the commit [bcd96557bd:
ALSA: hda - Build PCMs and controls at codec driver probe]. Although
the commit above removed the calls of snd_hda_codec_build_pcms() and
*_build_controls() at the controller driver probe, the similar calls
in the reconfig were still left forgotten. This caused the
conflicting and duplicated PCMs and controls.
The fix is trivial: just remove these superfluous calls from
reconfig_codec().
Fixes: bcd96557bd ('ALSA: hda - Build PCMs and controls at codec driver probe')
Reported-by: Jochen Henneberg <jh@henneberg-systemdesign.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 2da2dc9ead232f25601404335cca13c0f722d41b upstream.
For reducing the noise from the headset output on ASUS UX501VW,
call the existing fixup, alc_fixup_headset_mode_alc668(), additionally.
Thread: https://bbs.archlinux.org/viewtopic.php?id=209554
Signed-off-by: Kaho Ng <ngkaho1234@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 84add303ef950b8d85f54bc2248c2bc73467c329 upstream.
Phoenix Audio has yet another device with another id (even a different
vendor id, 0556:0014) that requires the same quirk for the sample
rate.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110221
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 2d2c038a9999f423e820d89db2b5d7774b67ba49 upstream.
Phoenix Audio MT202pcs (1de7:0114) and MT202exe (1de7:0013) need the
same workaround as TMX320 for avoiding the firmware bug. It fixes the
frequent error about the sample rate inquiries and the slow device
probe as consequence.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=117321
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fixup callback is added for dais which
do not follow the FE and BE convention
and is directly controlled by userspace
such as hostless dais. This will restrict
the hw_params based on what is supported by
hardware rather than blindly setting what
is given by userspace.
Change-Id: I401c70ab5de1df10363ec808cb68f72d8d74af96
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
While setting up route for a particular device, compare
stream name of CPU DAI and Backend DAI to find the correct
Backend DAI.
Change-Id: Ic3f7c0e5b2a1055e7fdf52c78ded797a9a126d03
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Add new USB rx and tx afe ports and routing to different
fe dais to enable USB audio via ADSP.
Change-Id: I4f82ba27becee1f3b62c410be0d00876961f9b18
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
Debugfs directory creation failure are not critical error.
However, the failure messages might be misleading and might
be interpreted as geniune failure in ASoC functionality.
Mark the failure messages as debug level.
Change-Id: Id61c81753d493b6508cbe87c59077adda4675ada
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Add machine driver code to support audio on MSMCOBALT based
boards with WCN3990 BT/FM chipset.
Change-Id: Ia23572f44775a04c8f8c67e9a61d6b9be8869b82
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Add a new mixer control for volume control for SLIMBUS_8_TX AFE port
loopback.
Change-Id: Ifbf1778255edbe4901bd0860216ba1dd5a786047
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
SLIMBUS_7 and SLIMBUS_8 would be used for BT-SCO and FM use
cases when using the second Slimbus instance. Add routes
to support voice call over BT-SCO and FM playbacki and capture
with these ports.
Change-Id: I5c558ee2dbe2de20b9ac3f042ae45a9431590778
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
SLIMBUS_8 ports can be used for hostless audio playback and
capture use cases. Add Hostless Front-end DAI definitions
with Slimbus 8 ports.
Change-Id: Idc56625bb8fea263c3d530c8a9488eeb81fdd7e5
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Add support for SLIMBUS_7 and SLIMBUS_8 Rx and Tx ports for
MSM audio drivers.
Change-Id: I839ac07a3ee1e1e778c4d1e43d0bac89f01bd21a
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Fix overwrite of updt_params allocated in heap, and stack overread
where param pointer is passed from user space.
CRs-Fixed: 989628
Change-Id: Ida8bdb7da2fcb97023dce3b6eafe4b899a51cb66
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
In SSR with recording, race condition which reduces micb_ref to -1
is seen. SSR sets micb_ref to 0, further recording widgets power
down can reduce it to -1. During power up, it is increased to 0,
micbias is not getting enabled for recording since micb_ref is 0.
To prevent this micb_ref is checked for non zero value before
decrementing it.
CRs-Fixed: 994268
Change-Id: I6ea23fdf8b119cfd178c4f5b79b9d1c01c267a82
Signed-off-by: dojha <dojha@codeaurora.org>
During SSR(subsystem restart), add a delay when ADSP state
is not yet ready. This will avoid excessive logging when
ADSP state is not ready.
CRs-Fixed: 1001242
Change-Id: I2f3d1bdb3ca1ba05c014c26bbc87879f549098d8
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
Update the Slmbus6 downlink hostless routing so it can connect
to Slimbus0 Hostess FE.
Change-Id: Iaeb3e148af57e9d484a31820993cf7e5b6466dd2
CRs-fixed: 991759
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
During temperature read, resource acquire can fail
if mclk is not enabled successfully. In such case,
clock and bandgap control counters are not incremented.
But resource release is still happening resulting
in counters going negative and warn_on messages.
Fix it by handling resource acquire failure case.
CRs-Fixed: 1003365
Change-Id: If2371e06866a615ca7d7dad64a5d7a17f258b3b6
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Add check to avoid out of bound access.
Check return value of get_user api.
CRs-Fixed: 997025
Change-Id: Ibbace116ac206007fa1928555838285304737737
Signed-off-by: Ashish Jain <ashishj@codeaurora.org>
VOC_EXT_EC MUX kcontrol, which is being used for external EC
reference, returning incorrect values when requested. Update
the logic to fix this issue.
CRs-Fixed: 999158
Change-Id: If05a54ca2539ef452312548bfcaf7f3fadd1de87
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
Voice calls are not working over quinary rx path. Required rx
controls are not present, hence it's not working. Fix this
by updating quinary rx controls and routing map.
CRs-Fixed: 999811
Change-Id: Id566359e381b69acfccff406c7448708701530e7
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
During Compress offload session open, a private data structure
is allocated and registered as parameter for a callback to the
compressed offload driver. All parameters inside the structure
must be initialized before the structure is passed to ASM driver.
This private data structure is sent back as param to the callback
function registered with ASM. The initialization is needed to avoid
NULL pointer dereference inside the callback function, in case ADSP
SSR is triggered right after registering the callback with ASM and
before rest of the initialization of the private data is complete.
CRs-fixed: 989822
Change-Id: I8a64539a6a64fb8c75d06f933a735c70049bce7b
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Mute observed in WFD playback during ADSP SSR. This is due to
playback session isn't being restarted post SSR. Fix this by
listening to reset events and propagate the appropriate error
back to userspace in case of SSR.
CRs-Fixed: 986757
Change-Id: I4c2fdf70e518310157d81d527afff4436dd42140
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
Set token value with port index and copp id so that
correct wait queue handle can be deduced in the
callback of adm_set_stereo_to_custom_stereo command.
Change-Id: Ica4c1442c1143f46de2baa6eaf1890ad0cb4b742
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Incorrect pointer is used while allocating memory
for 'cal_block' pointer. Use proper pointer in kzalloc().
Memory of 'cal_block->cal_info' is not initialized to ZERO.
Use kzalloc() instead of kmalloc() to initialize this memory.
CRs-Fixed: 983585
Change-Id: Ifbe1d91d68da81d058197af2a403c4b832b019fb
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
- Ignore stream volume and pp params calls
for compress passthrough playback.
- Use correct COPP index for compress passthrough
playback in adm_send_compressed_device_mute.
Signed-off-by: Mingming Yin <mingming@codeaurora.org>
Change-Id: I10d1aaf3bb6cbf6358378667f93970e9eb21be1d
In function msm_compr_set_params few codec parameters are getting
used before being updated with values received in the call.
Prevent usage of incorrect param values by updating params before
they are accessed.
CRs-Fixed: 993882
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
Change-Id: Ia3d3e13d4bd7975a11cbeb96929fb224e8271916
Characteristics of 3pole extn cable is, MIC is grounded
and HPHL and HPHR are floating. In current SW, if
there is GND_MIC SWAP with button press cable is reported
as unsupported. Hence report cable as headset if there is
GND_MIC SWAP with button press.
CRs-Fixed: 963833
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Change-Id: Ie6b467292661358699fcab6263653139cda87c33
Even if the first measurement of hs_comp_result is 0 after
micbias is increased to 2.7v, it should be reported as special
headset. Fix the condition in driver to handle this scenario.
CRs-Fixed: 993103
Change-Id: I859e9de29436af12ef1af0e2ed85bcbb51d2e27a
Signed-off-by: Yeleswarapu Nagaradhesh <nagaradh@codeaurora.org>
Audio subsystem could reside in different DSP processor based on
architecture design. Use subsystem status check instead of explicitly
check for modem status.
CRs-fixed: 988942
Change-Id: I7c28a11f67517e5072e67c9bc2b99900a79879c1
Signed-off-by: Deven Patel <cdevenp@codeaurora.org>
commit 653aa4645244042826f105aab1be3d01b3d493ca upstream.
this patch corrects the interface adc/dac control register definition
according to datasheet.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 47325078f2a3e543150e7df967e45756b2fff7ec upstream.
The dummy component is reused for all cards so we special case and don't
bind it to any of them. This means that code like that displaying the
component widgets that tries to look at the card will crash. In the
future we will fix this by ensuring that the dummy component looks like
other components but that is invasive and so not suitable for a fix.
Instead add a special case check here.
Reported-by: Harry Pan <harry.pan@intel.com>
Suggested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 712a8038cc24dba668afe82f0413714ca87184e0 upstream.
When the ssm4567 is powered up the driver calles regcache_sync() to restore
the register map content. regcache_sync() assumes that the device is in its
power-on reset state. Make sure that this is the case by explicitly
resetting the ssm4567 register map before calling regcache_sync() otherwise
we might end up with a incorrect register map which leads to undefined
behaviour.
One such undefined behaviour was observed when returning from system
suspend while a playback stream is active, in that case the ssm4567 was
kept muted after resume.
Fixes: 1ee44ce030 ("ASoC: ssm4567: Add driver for Analog Devices SSM4567 amplifier")
Reported-by: Harsha Priya <harshapriya.n@intel.com>
Tested-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit ba4bc32eaa39ba7687f0958ae90eec94da613b46 upstream.
An older patch to convert the API in the s3c i2s driver
ended up passing a const pointer into a function that takes
a non-const pointer, so we now get a warning:
sound/soc/samsung/s3c2412-i2s.c: In function 's3c2412_iis_dev_probe':
sound/soc/samsung/s3c2412-i2s.c:172:9: error: passing argument 3 of 's3c_i2sv2_register_component' discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
However, the s3c_i2sv2_register_component() function again
passes the pointer into another function taking a const, so
we just need to change its prototype.
Fixes: eca3b01d08 ("ASoC: switch over to use snd_soc_register_component() on s3c i2s")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 037e119738120c1cdc460c6ae33871c3000531f3 upstream.
Fixes audio output on a ThinkPad X260, when using Lenovo CES 2013
docking station series (basic, pro, ultra).
Signed-off-by: Conrad Kostecki <ck+linuxkernel@bl4ckb0x.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 67f3754b51f22b18c4820fb84062f658c30e8644 upstream.
The commit [9bef72bdb2: ALSA: pcxhr: Use nonatomic PCM ops]
converted to non-atomic PCM ops, but shamelessly with an unbalanced
mutex locking, which leads to the hangup easily. Fix it.
Fixes: 9bef72bdb2 ('ALSA: pcxhr: Use nonatomic PCM ops')
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116441
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit 9859a971ca228725425238756ee89c6133306ec8 upstream.
Add HD Audio Device PCI ID for the Intel Broxton-T platform.
It is an HDA Intel PCH controller.
Signed-off-by: Lu, Han <han.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit de3df8a986b635082a1d94bae2c361d043c57106 upstream.
Although one weird behavior about the input path (inconsistent D0/D3
switch) on Cirrus CS420x codecs was fixed in the previous commit,
there is still an issue on some Mac machines: the capture stream
stalls when switching the ADCs on the fly. More badly, this keeps
stuck until the next reboot.
The dynamic ADC switching is already a bit fragile and assuming
optimistically that the chip accepts the frequent power changes. On
Cirrus codecs, this doesn't seem applicable.
As a quick workaround, we pin down the ADCs to keep up in D0 when
spec->dyn_adc_switch is set. In this way, the ADCs are kept up only
for the system that were confirmed to be broken.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116171
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
commit afecb146d8d8a60a1dde9cdf570c278649617fde upstream.
The Optiplex 9020m with Haswell-DT processor needs a quirk for the
headset jack at the front of the machine to be able to use microphones.
A quirk for this model was originally added in 3127899, but c77900e
removed it in favour of a more generic version.
Unfortunately, pin configurations can changed based on firmware/BIOS
versions, and the generic version doesn't have any effect on newer
versions of the machine/firmware anymore.
With help from David Henningsson <diwic@ubuntu.com>
Signed-off-by: Bastien Nocera <hadess@hadess.net>
Tested-by: Bastien Nocera <hadess@hadess.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>