Codec specific metadata is sent only for first stream in gapless
playback. This causes incorrect configuration to be set for second
stream and distortions are observed due to framedrops in adsp.
Add support to send codec specific format during start of
next stream in gapless using set_next_track_param.
Change-Id: Ieec6b2afedec156e47873efcad9b3571160b0a29
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Conflicts:
include/sound/compress_driver.h
Add delay_blk() to pcm, platform and DAI ops.
The pcm delay_blk() op collects the audio DSP path
delays from the low-level drivers and sets the
runtime->delay field to their aggregate.
Change-Id: Ib7e10f44ab8ccb46dc2f5825081d0afef662d827
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
The SNDRV_RAWMIDI_STREAM_{OUTPUT,INPUT} ioctls may reallocate
runtime->buffer while other kernel threads are accessing it. If the
underlying krealloc() call frees the original buffer, then this can turn
into a use-after-free.
Most of these accesses happen while the thread is holding runtime->lock,
and can be fixed by just holding the same lock while replacing
runtime->buffer, however we can't hold this spinlock while
snd_rawmidi_kernel_{read1,write1} are copying to/from userspace. We
need to add and acquire a new mutex to prevent this from happening
concurrently with reallocation. We hold this mutex during the entire
reallocation process, to also prevent multiple concurrent reallocations
leading to a double-free.
Signed-off-by: Daniel Rosenberg <drosen@google.com>
bug: 64315347
Change-Id: I05764d4f1a38f373eb7c0ac1c98607ee5ff0eded
The overflow check is required to ensure that user space data
in kernel may not go beyond buffer boundary.
Bug: 28751152
CRs-Fixed: 1064411
Change-Id: I54c28a8942cf1a6a47a4e8272f3159b35d753ead
Signed-off-by: Karthik Reddy Katta <a_katta@codeaurora.org>
Signed-off-by: Biswajit Paul <biswajitpaul@codeaurora.org>
Currently lsm client data is deallocated when q6lsm_open() fails
which can cause memory corruption if lsm client data is accessed
after freed. Fix this issue by deallocating the client data only
in msm_lsm_close().
Bug: 30142668
Change-Id: If048c26a0ffd8a346a28622183cbf2ba1e7e5ff3
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
Signed-off-by: vivek mehta <mvivek@codeaurora.org>
Fix overwrite of updt_params allocated in heap, and stack overread
where param pointer is passed from user space.
Bug: 26876409
Change-Id: Ida8bdb7da2fcb97023dce3b6eafe4b899a51cb66
Signed-off-by: Ravi Kumar Alamanda <arkumar@codeaurora.org>
commit 97aff2c03a1e4d343266adadb52313613efb027f upstream.
There are 24 EQ registers not 25, I suspect this bug came about because
the registers start at EQ1 not zero. The bug is relatively harmless as
the extra register written is an unused one.
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Allocate the buffers required during session init time so that these
buffers are not allocated every time keyword is detected.
Bug: 23724357
Change-Id: I26d64f55d3547465ee22d868d71e4c0496e021c4
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
The buffer used for reading data from underlying hardware is allocated
in IOCTL since it is based on whether userspace wants buffering support
or not. It is possible that userspace may call this IOCTL multiple times
without calling the IOCTL that does free the buffer. Such a case will
result into memory leak eventually causing unexpected issues due to low
memory. Fix this issue by avoiding multiple allocations in driver and
re-use the allocation even if userspace invokes the IOCTL multiple
times.
Change-Id: I4251a8dd8467c8b5a6c248a2dd710c0691c1653a
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
It is observed that there is data loss during buffering for LAB due to
the sequence in which the AFE port is started and the data channel is
established. Fix the sequence to avoid data loss.
Change-Id: I95b365e20005d1cce0a62630417ba2f54489c4c4
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
During AFE Service registration, send the AFE mode command to indicate
that AFE_START is explicitly required for any data channel that will be
established.
Change-Id: Iabd3d6d810032b688810eded3732149040694fd5
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Add a new calibration type for audio volume
RTAC. Immeadiately apply audio volume
calibration when recieved.
Change-Id: I640297405087cb0450f4b5b2b4cec5daaf40dd68
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Signed-off-by: vivek mehta <mvivek@codeaurora.org>
commit 7241ea558c6715501e777396b5fc312c372e11d9 upstream.
Looks like audigy emu10k2 (probably emu10k1 - sb live too) support two
modes for DMA. Second mode is useful for 64 bit os with more then 2 GB
of ram (fixes problems with big soundfont loading)
1) 32MB from 2 GB address space using 8192 pages (used now as default)
2) 16MB from 4 GB address space using 4096 pages
Mode is set using HCFG_EXPANDED_MEM flag in HCFG register.
Also format of emu10k2 page table is then different.
Signed-off-by: Peter Zubaj <pzubaj@marticonet.sk>
Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
When audio samples are receviced during buffering, it is observed that
the initial part of buffered is lost during transimission. This results
into audio performance issue due to data loss. Fix this issue making
sure the data channel buffer is queued before transmission is started on
the channel.
Change-Id: Iaea26bc898733789b8e6022292a6acec04f393ac
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
* changes:
ASoC: msm-cpe-lsm: Add output AFE port for listen
ASoC: msm-cpe-lsm: Add support for listen output configuration
uapi: lsm_params: Add support for listen output format
ASoC: msm: Add 24 bit support for CPE buffering
ASoC: wcd9330: Update the codec MAD dai for 24 bit support
ASoC: msm-cpe-lsm: Add 24 bit support for buffering path
ASoC: wcd9330: Fix 24 bit format for codec dai's
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAABCAAGBQJVFBE+AAoJEDjbvchgkmk+oTkP/j2ipSvgXghFEipZbOJUQkqC
fa8elfoF7riTKpKOuDtDU2WI1ttCGYs5gmTNpd4KaEt23eJOQgVqIpV8GhAkW5Af
NVyGhjF3dXNqpBkxnyuIkk5OLrNKGRNS2xpz1U254iGObYrK+tr62IzGPxEcPAhX
Y+58xPVSjLtNdTJW3YLT3DohUbnbHG6Br9geI1IHtlxg1oDiTxtnX2FmOFzzDpP5
qu8gnPIekg/+1EE46nEiq0C59AwC3aCzNxwlYe1Kd41SY3LUFF1eZMzmOnnwyI5K
3FslAzT6x/sOmGJFTYrKjFA4GKsW67xHVkB/hp/Mu768RqxiQCxV4kgmPsAFLbXb
D5qbNwr3i0iQ/9AaD7h8HJkxC/KHmszMux00L/mgZ3SGdGMEIBxHg+oP8+nP8V6C
WfXKSWA94dpdRyULEfWdnKnUnp2860C7kt7ASTkOl8rIgU8HgaRqeu+U/KPM2ovD
ZJtXPVB5UXCRuVAhZwbvvrLOY8UMZTnv2auAaeLYG8YptcvGeN5Z398/8qdV/z7c
A9kOsgebs74X+lR3rbVgSDPQaq2AEiuIvtX77SfmrWXBXGmc99i9+PikuFggRprz
cJm5bCM9DaHu/3b77X9Fwl7vnpReB0zPHiwTdH/p7OPMf5m1uQt7SqegC6btLPHs
iYgjLd4oW+6uiV/2X1Vx
=L+mC
-----END PGP SIGNATURE-----
Merge commit 'v3.10.73' into LA.BF64.1.2.9
This merge brings us up to date with upstream kernel.org tag v3.10.73.
As part of the conflict resolution, changes introduced by commit 72684eae7
("arm64: Fix up /proc/cpuinfo") have been intentionally dropped, as they
conflict with Android changes msm-3.10 kernel to solve the problems
in a different way. Since userspace readers of this file may depend on
the existing msm-3.10 implementation, it's left as-is for now. The
commit may later be introduced if it is found to not impact userspaces
paired with this kernel.
* commit 'v3.10.73' (264 commits):
Linux 3.10.73
target: Allow Write Exclusive non-reservation holders to READ
target: Allow AllRegistrants to re-RESERVE existing reservation
target: Fix R_HOLDER bit usage for AllRegistrants
target/pscsi: Fix NULL pointer dereference in get_device_type
iscsi-target: Avoid early conn_logout_comp for iser connections
target: Fix reference leak in target_get_sess_cmd() error path
ARM: at91: pm: fix at91rm9200 standby
ipvs: rerouting to local clients is not needed anymore
ipvs: add missing ip_vs_pe_put in sync code
powerpc/smp: Wait until secondaries are active & online
x86/vdso: Fix the build on GCC5
x86/fpu: Drop_fpu() should not assume that tsk equals current
x86/fpu: Avoid math_state_restore() without used_math() in __restore_xstate_sig()
crypto: aesni - fix memory usage in GCM decryption
libsas: Fix Kernel Crash in smp_execute_task
xen-pciback: limit guest control of command register
nilfs2: fix deadlock of segment constructor during recovery
regulator: core: Fix enable GPIO reference counting
regulator: Only enable disabled regulators on resume
ALSA: hda - Treat stereo-to-mono mix properly
ALSA: hda - Add workaround for MacBook Air 5,2 built-in mic
ALSA: hda - Set single_adc_amp flag for CS420x codecs
ALSA: hda - Don't access stereo amps for mono channel widgets
ALSA: hda - Fix built-in mic on Compaq Presario CQ60
ALSA: control: Add sanity checks for user ctl id name string
spi: pl022: Fix race in giveback() leading to driver lock-up
tpm/ibmvtpm: Additional LE support for tpm_ibmvtpm_send
workqueue: fix hang involving racing cancel[_delayed]_work_sync()'s for PREEMPT_NONE
can: add missing initialisations in CAN related skbuffs
Change email address for 8250_pci
virtio_console: init work unconditionally
fuse: notify: don't move pages
fuse: set stolen page uptodate
drm/radeon: drop setting UPLL to sleep mode
drm/radeon: do a posting read in rs600_set_irq
drm/radeon: do a posting read in si_set_irq
drm/radeon: do a posting read in r600_set_irq
drm/radeon: do a posting read in r100_set_irq
drm/radeon: do a posting read in evergreen_set_irq
drm/radeon: fix DRM_IOCTL_RADEON_CS oops
tcp: make connect() mem charging friendly
net: compat: Update get_compat_msghdr() to match copy_msghdr_from_user() behaviour
tcp: fix tcp fin memory accounting
Revert "net: cx82310_eth: use common match macro"
rxrpc: bogus MSG_PEEK test in rxrpc_recvmsg()
caif: fix MSG_OOB test in caif_seqpkt_recvmsg()
inet_diag: fix possible overflow in inet_diag_dump_one_icsk()
rds: avoid potential stack overflow
net: sysctl_net_core: check SNDBUF and RCVBUF for min length
sparc64: Fix several bugs in memmove().
sparc: Touch NMI watchdog when walking cpus and calling printk
sparc: perf: Make counting mode actually work
sparc: perf: Remove redundant perf_pmu_{en|dis}able calls
sparc: semtimedop() unreachable due to comparison error
sparc32: destroy_context() and switch_mm() needs to disable interrupts.
Linux 3.10.72
ath5k: fix spontaneus AR5312 freezes
ACPI / video: Load the module even if ACPI is disabled
drm/radeon: fix 1 RB harvest config setup for TN/RL
Drivers: hv: vmbus: incorrect device name is printed when child device is unregistered
HID: fixup the conflicting keyboard mappings quirk
HID: input: fix confusion on conflicting mappings
staging: comedi: cb_pcidas64: fix incorrect AI range code handling
dm snapshot: fix a possible invalid memory access on unload
dm: fix a race condition in dm_get_md
dm io: reject unsupported DISCARD requests with EOPNOTSUPP
dm mirror: do not degrade the mirror on discard error
staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy back
clk: sunxi: Support factor clocks with N factor starting not from 0
fixed invalid assignment of 64bit mask to host dma_boundary for scatter gather segment boundary limit.
nilfs2: fix potential memory overrun on inode
IB/qib: Do not write EEPROM
sg: fix read() error reporting
ALSA: hda - Add pin configs for ASUS mobo with IDT 92HD73XX codec
ALSA: pcm: Don't leave PREPARED state after draining
tty: fix up atime/mtime mess, take four
sunrpc: fix braino in ->poll()
procfs: fix race between symlink removals and traversals
debugfs: leave freeing a symlink body until inode eviction
autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation
USB: serial: fix potential use-after-free after failed probe
TTY: fix tty_wait_until_sent on 64-bit machines
USB: serial: fix infinite wait_until_sent timeout
net: irda: fix wait_until_sent poll timeout
xhci: fix reporting of 0-sized URBs in control endpoint
xhci: Allocate correct amount of scratchpad buffers
usb: ftdi_sio: Add jtag quirk support for Cyber Cortex AV boards
USB: usbfs: don't leak kernel data in siginfo
USB: serial: cp210x: Adding Seletek device id's
KVM: MIPS: Fix trace event to save PC directly
KVM: emulate: fix CMPXCHG8B on 32-bit hosts
Btrfs:__add_inode_ref: out of bounds memory read when looking for extended ref.
Btrfs: fix data loss in the fast fsync path
btrfs: fix lost return value due to variable shadowing
iio: imu: adis16400: Fix sign extension
x86/asm/entry/64: Remove a bogus 'ret_from_fork' optimization
PM / QoS: remove duplicate call to pm_qos_update_target
target: Check for LBA + sectors wrap-around in sbc_parse_cdb
mm/memory.c: actually remap enough memory
mm/compaction: fix wrong order check in compact_finished()
mm/nommu.c: fix arithmetic overflow in __vm_enough_memory()
mm/mmap.c: fix arithmetic overflow in __vm_enough_memory()
mm/hugetlb: add migration entry check in __unmap_hugepage_range
team: don't traverse port list using rcu in team_set_mac_address
udp: only allow UFO for packets from SOCK_DGRAM sockets
usb: plusb: Add support for National Instruments host-to-host cable
macvtap: make sure neighbour code can push ethernet header
net: compat: Ignore MSG_CMSG_COMPAT in compat_sys_{send, recv}msg
team: fix possible null pointer dereference in team_handle_frame
net: reject creation of netdev names with colons
ematch: Fix auto-loading of ematch modules.
net: phy: Fix verification of EEE support in phy_init_eee
ipv4: ip_check_defrag should not assume that skb_network_offset is zero
ipv4: ip_check_defrag should correctly check return value of skb_copy_bits
gen_stats.c: Duplicate xstats buffer for later use
rtnetlink: call ->dellink on failure when ->newlink exists
ipv6: fix ipv6_cow_metrics for non DST_HOST case
rtnetlink: ifla_vf_policy: fix misuses of NLA_BINARY
Linux 3.10.71
libceph: fix double __remove_osd() problem
libceph: change from BUG to WARN for __remove_osd() asserts
libceph: assert both regular and lingering lists in __remove_osd()
MIPS: Export FP functions used by lose_fpu(1) for KVM
x86, mm/ASLR: Fix stack randomization on 64-bit systems
blk-throttle: check stats_cpu before reading it from sysfs
jffs2: fix handling of corrupted summary length
md/raid1: fix read balance when a drive is write-mostly.
md/raid5: Fix livelock when array is both resyncing and degraded.
metag: Fix KSTK_EIP() and KSTK_ESP() macros
gpio: tps65912: fix wrong container_of arguments
arm64: compat Fix siginfo_t -> compat_siginfo_t conversion on big endian
hx4700: regulator: declare full constraints
KVM: x86: update masterclock values on TSC writes
KVM: MIPS: Don't leak FPU/DSP to guest
ARC: fix page address calculation if PAGE_OFFSET != LINUX_LINK_BASE
ntp: Fixup adjtimex freq validation on 32-bit systems
kdb: fix incorrect counts in KDB summary command output
ARM: pxa: add regulator_has_full_constraints to poodle board file
ARM: pxa: add regulator_has_full_constraints to corgi board file
vt: provide notifications on selection changes
usb: core: buffer: smallest buffer should start at ARCH_DMA_MINALIGN
USB: fix use-after-free bug in usb_hcd_unlink_urb()
USB: cp210x: add ID for RUGGEDCOM USB Serial Console
tty: Prevent untrappable signals from malicious program
axonram: Fix bug in direct_access
cfq-iosched: fix incorrect filing of rt async cfqq
cfq-iosched: handle failure of cfq group allocation
iscsi-target: Drop problematic active_ts_list usage
NFSv4.1: Fix a kfree() of uninitialised pointers in decode_cb_sequence_args
Added Little Endian support to vtpm module
tpm/tpm_i2c_stm_st33: Fix potential bug in tpm_stm_i2c_send
tpm: Fix NULL return in tpm_ibmvtpm_get_desired_dma
tpm_tis: verify interrupt during init
ARM: 8284/1: sa1100: clear RCSR_SMR on resume
tracing: Fix unmapping loop in tracing_mark_write
MIPS: KVM: Deliver guest interrupts after local_irq_disable()
nfs: don't call blocking operations while !TASK_RUNNING
mmc: sdhci-pxav3: fix setting of pdata->clk_delay_cycles
power_supply: 88pm860x: Fix leaked power supply on probe fail
ALSA: hdspm - Constrain periods to 2 on older cards
ALSA: off by one bug in snd_riptide_joystick_probe()
lmedm04: Fix usb_submit_urb BOGUS urb xfer, pipe 1 != type 3 in interrupt urb
cpufreq: speedstep-smi: enable interrupts when waiting
PCI: Fix infinite loop with ROM image of size 0
PCI: Generate uppercase hex for modalias var in uevent
HID: i2c-hid: Limit reads to wMaxInputLength bytes for input events
iwlwifi: mvm: always use mac color zero
iwlwifi: mvm: fix failure path when power_update fails in add_interface
iwlwifi: mvm: validate tid and sta_id in ba_notif
iwlwifi: pcie: disable the SCD_BASE_ADDR when we resume from WoWLAN
fsnotify: fix handling of renames in audit
xfs: set superblock buffer type correctly
xfs: inode unlink does not set AGI buffer type
xfs: ensure buffer types are set correctly
Bluetooth: ath3k: workaround the compatibility issue with xHCI controller
Linux 3.10.70
rbd: drop an unsafe assertion
media/rc: Send sync space information on the lirc device
net: sctp: fix passing wrong parameter header to param_type2af in sctp_process_param
ppp: deflate: never return len larger than output buffer
ipv4: tcp: get rid of ugly unicast_sock
tcp: ipv4: initialize unicast_sock sk_pacing_rate
bridge: dont send notification when skb->len == 0 in rtnl_bridge_notify
ipv6: replacing a rt6_info needs to purge possible propagated rt6_infos too
ping: Fix race in free in receive path
udp_diag: Fix socket skipping within chain
ipv4: try to cache dst_entries which would cause a redirect
net: sctp: fix slab corruption from use after free on INIT collisions
netxen: fix netxen_nic_poll() logic
ipv6: stop sending PTB packets for MTU < 1280
net: rps: fix cpu unplug
ip: zero sockaddr returned on error queue
Linux 3.10.69
crypto: crc32c - add missing crypto module alias
x86,kvm,vmx: Preserve CR4 across VM entry
kvm: vmx: handle invvpid vm exit gracefully
smpboot: Add missing get_online_cpus() in smpboot_register_percpu_thread()
ALSA: ak411x: Fix stall in work callback
ASoC: sgtl5000: add delay before first I2C access
ASoC: atmel_ssc_dai: fix start event for I2S mode
lib/checksum.c: fix build for generic csum_tcpudp_nofold
ext4: prevent bugon on race between write/fcntl
arm64: Fix up /proc/cpuinfo
nilfs2: fix deadlock of segment constructor over I_SYNC flag
lib/checksum.c: fix carry in csum_tcpudp_nofold
mm: pagewalk: call pte_hole() for VM_PFNMAP during walk_page_range
MIPS: Fix kernel lockup or crash after CPU offline/online
MIPS: IRQ: Fix disable_irq on CPU IRQs
PCI: Add NEC variants to Stratus ftServer PCIe DMI check
gpio: sysfs: fix memory leak in gpiod_sysfs_set_active_low
gpio: sysfs: fix memory leak in gpiod_export_link
Linux 3.10.68
target: Drop arbitrary maximum I/O size limit
iser-target: Fix implicit termination of connections
iser-target: Handle ADDR_CHANGE event for listener cm_id
iser-target: Fix connected_handler + teardown flow race
iser-target: Parallelize CM connection establishment
iser-target: Fix flush + disconnect completion handling
iscsi,iser-target: Initiate termination only once
vhost-scsi: Add missing virtio-scsi -> TCM attribute conversion
tcm_loop: Fix wrong I_T nexus association
vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT
ib_isert: Add max_send_sge=2 minimum for control PDU responses
IB/isert: Adjust CQ size to HW limits
workqueue: fix subtle pool management issue which can stall whole worker_pool
gpio: squelch a compiler warning
efi-pstore: Make efi-pstore return a unique id
pstore/ram: avoid atomic accesses for ioremapped regions
pstore: Fix NULL pointer fault if get NULL prz in ramoops_get_next_prz
pstore: skip zero size persistent ram buffer in traverse
pstore: clarify clearing of _read_cnt in ramoops_context
pstore: d_alloc_name() doesn't return an ERR_PTR
pstore: Fail to unlink if a driver has not defined pstore_erase
ARM: 8109/1: mm: Modify pte_write and pmd_write logic for LPAE
ARM: 8108/1: mm: Introduce {pte,pmd}_isset and {pte,pmd}_isclear
ARM: DMA: ensure that old section mappings are flushed from the TLB
ARM: 7931/1: Correct virt_addr_valid
ARM: fix asm/memory.h build error
ARM: 7867/1: include: asm: use 'int' instead of 'unsigned long' for 'oldval' in atomic_cmpxchg().
ARM: 7866/1: include: asm: use 'long long' instead of 'u64' within atomic.h
ARM: lpae: fix definition of PTE_HWTABLE_PTRS
ARM: fix type of PHYS_PFN_OFFSET to unsigned long
ARM: LPAE: use phys_addr_t in alloc_init_pud()
ARM: LPAE: use signed arithmetic for mask definitions
ARM: mm: correct pte_same behaviour for LPAE.
ARM: 7829/1: Add ".text.unlikely" and ".text.hot" to arm unwind tables
drivers: net: cpsw: discard dual emac default vlan configuration
regulator: core: fix race condition in regulator_put()
spi/pxa2xx: Clear cur_chip pointer before starting next message
dm cache: fix missing ERR_PTR returns and handling
dm thin: don't allow messages to be sent to a pool target in READ_ONLY or FAIL mode
nl80211: fix per-station group key get/del and memory leak
NFSv4.1: Fix an Oops in nfs41_walk_client_list
nfs: fix dio deadlock when O_DIRECT flag is flipped
Input: i8042 - add noloop quirk for Medion Akoya E7225 (MD98857)
ALSA: seq-dummy: remove deadlock-causing events on close
powerpc/xmon: Fix another endiannes issue in RTAS call from xmon
can: kvaser_usb: Fix state handling upon BUS_ERROR events
can: kvaser_usb: Retry the first bulk transfer on -ETIMEDOUT
can: kvaser_usb: Send correct context to URB completion
can: kvaser_usb: Do not sleep in atomic context
ASoC: wm8960: Fix capture sample rate from 11250 to 11025
spi: dw-mid: fix FIFO size
Signed-off-by: Ian Maund <imaund@codeaurora.org>
In order for the buffering to be captured from CPE, the output AFE port
needs to be configured and started. Add support for configuring and
starting the output AFE port once buffering is started and stop the AFE
port when buffering is stopped.
Change-Id: Ie4e6460745cf3328d20d77317f314b3553f137eb
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Add support in the CPE LSM platform driver to accept the configuration
parameters for listen buffering output data. This is required when the
buffering data is transmitted to userspace with configuration that is
different from the actual underlying stream hardware parameters.
Change-Id: Ibdefda04ff7197c111bc416b1216933ad9ab851e
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Inorder to support AFE custom topology, make
changes in AFE driver to send AFE calibration
based on custom flag set.
Change-Id: I95391e12d93eca7385e249ad9eda323679e92388
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
openDSP feature is to enable 3rd party vendors to deploy custom
algorithms into qdsp6 LSM service and still be able to use the existing
LSM drivers to interact with the custom algorithm. Add support for
openDSP to qdsp6 LSM drivers.
Change-Id: Id794382b7aa23064fefcfa08135429e968f3016a
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Change to clean up the lsm drivers to handle the errors correctly and
log the errors per device. This will be useful to debug multi-session
issues.
Change-Id: I8897c52e15ada9bec472867d7a848aba725e31ab
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Listen version 1.0 is no longer supported, remove the corresponding
support from driver.
Change-Id: Ief8b8dc610bce65a0434ac8392ee1948b497d4d3
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Improve DTS Eagle driver to handle all possible inputs during
communications from user space.
CRs-fixed: 791160, 791162
Change-Id: I0d051b8439d85cf6b59d3e245b30051711cda84e
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
During concurrency testing scenario which starting multi channel playback
followed by multi channel recording, it was found that channel map of
recording is over written by channel map of playback. This results in
failure to open ADM COPP as wrong channel mapping is being passed.
Separate multi channel map to playback and recording and make explicit
check to decide on which channel map to use during adm open call.
Change-Id: Ib355b95632f0f20b2062eb38b906c9d17aa827e5
CRs-fixed: 799164
Signed-off-by: Patrick Lai <plai@codeaurora.org>
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Change DTS HPX custom topology ids into the allocated
range 0x10015000 - 0x10024FFF.
Change-Id: I8d6d6e4c7b9b8d68acc0c2958468a9fe8a9c921a
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
commit 4161b4505f1690358ac0a9ee59845a7887336b21 upstream.
When ak4114 work calls its callback and the callback invokes
ak4114_reinit(), it stalls due to flush_delayed_work(). For avoiding
this, control the reentrance by introducing a refcount. Also
flush_delayed_work() is replaced with cancel_delayed_work_sync().
The exactly same bug is present in ak4113.c and fixed as well.
Reported-by: Pavel Hofman <pavel.hofman@ivitera.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Tested-by: Pavel Hofman <pavel.hofman@ivitera.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
In case of CPE crash, it is possible to retrieve the SFR (Software
Failure Reason) details from CPE. Add the support in the CPE boot event
to parse the SFR buffer address and size after CPE bootup is done. In
case of crash, the SFR data will be read from this address.
Change-Id: I8802e844f10d15fd14080cc7597ebfde0e5073d7
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Add a new stream format for ultrasound proximity, which matches
the stream format in the aDSP.
Change-Id: Idd488b90ee082fcc58ff9d1dddf5087cba9af034
Signed-off-by: Lior Barenboim <liorb@codeaurora.org>
Add support to enable DTS HPX and SA+ modules exclusively when
both the modules are part of a single ASM topology in NT mode.
Change-Id: I2a90e9e1cd6e2f4d915d0c55a5a67a7abc19f503
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Handle DTS HPX get param for parameters of all data types and
check for overflow in get param compressed mixer kcontrol.
Change-Id: I12ed549e2d8187def2d33ca7aef24e2658b198e0
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
The sequence of commands from userspace cannot be assumed. Irrespective
of the sequence of IOCTL's from userspace, the driver needs to handle
the starting and stopping of the LAB (Look-Ahead Bufferring) gracefully
to avoid unexpected synchronization issues. Fix to synchronize
start/stop of LAB thread and LAB buffer allocation so that LAB thread
never accesses the LAB buffer when the buffer is de-allocated.
CRs-fixed: 764869
Change-Id: I7f484ab4450c29a1262fcc14d51d3446a1e16c39
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Add support to integrate the Eagle framework for DTS Headphone:X
audio post processing feature v1.1. Include DTS_EAGLE config for
8994 target to build the feature. It uses hwdep node to receive
required processing parameters from userspace.
Change-Id: I07cea22aa0324b0042353174a7c96e2b98a37b4b
Signed-off-by: Jitendra Naruka <jitendra.naruka@dts.com>
[alexyj@codeaurora.org: fix inclusion of header file
msm-dts-eagle.h in msm-dts-srs-tm-config.c, resolving
trivial merge conflicts]
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Integrate the kernel changes shared by DTS for the
latest DTS TM release 3.1.2.0. Include DTS_SRS_TM
config for 8994 target to build the feature.
Change-Id: I8d8e28486abac8e40741d7fee98d99dadaf12745
Signed-off-by: Sharad Sangle <assangle@codeaurora.org>
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
In order to read the data after keyword detection event, a thread is
created to read the buffers in ping-pong manner. When command to stop
buffering is received, it is possible that thread is not completely
exited before the buffers are de-allocated. In such case, the thread
results into an crash due to null-pointer dereference. Fix the crash by
making sure the buferring thread has exited before de-allocating the
buffers.
Change-Id: Ic0d5a851c5cc374ce472c53282a319aeceda1243
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Add api to enable setting the input stream's channel map based on
its channel mask
Change-Id: I19cff5bf8aed9d35b3d2e6a65e4ab37ad627dc40
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Currently, HLOS configures afe mux registers with the assumption
that AHB clock is always-on.
To save more power on msmzirc target, turn on the clock before configuring
mux registers, turn off the clock after finishing configuration.
Change-Id: Ide3e7fafefcbe985de3eda00f2ec20a5d2c48d58
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
Currently audio drivers use dev_set_name when the device's probe
function is invoked to change device name. However the device name
cannot be changed after the device is registered by the Kernel and
inside the probe functions. Using dev_set_name would cause random
memory corruption leading to kernel crashes.
dev_set_name is used in platform and cpu dai drivers to satisfy the
needs of the ALSA SoC framework. ASoC framework does make use of
platform and cpu dai names to check whether they are registered to
it or not for sound card instantiation. However, the framework has
an alternative way to compare the device's of_nodes against dai_link's
of_nodes to know whether the platform/cpu dai is registered or not.
Make changes in the driver to retrieve of_nodes and then assign to
dai_link's of_node so that we can get rid of using dev_set_name in
the drivers.
CRs-Fixed: 706768
Change-Id: I085cfbe4bc60e1b7ec3522508989e6536b1af126
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Add support for setting mute/latency on passthrough stream. The latency
and mute value is set on the latency and volume modules present on the
passthrough copp topology.
Change-Id: I06f1bdfb7e943822ec51282b7868cf0f777bb716
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
Signed-off-by: Pradnya Chaphekar <pradnyac@codeaurora.org>
Add support for compressed bitstream passthrough over HDMI
for DD/DDP contents. Use compressed driver to support
passthrough.
Change-Id: I01f9e4fa984a1f45d1f4de5250bed8f95d2a2dd0
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
It is possible to establish audio data path using slimbus between
application processor and codec. Add driver to support setup of slimbus
ports/channels for such data channels on the apps side. The codec driver
will be responsible of setting up the codec side ports/channels for the
data channel.
Change-Id: Ib2991bdb895bc0bdc5a6577c94f56a2d3215869d
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>