Commit graph

24076 commits

Author SHA1 Message Date
Simmi Pateriya
433d226263 ASoC: wcd: set maximum limit for impedance for lineout detection
Due to slow insertion of headset, it can get detected as headphone
momentarily and the impedance is also very high which makes the
headset to be detected as lineout. Set a maximum limit for impedance
and do not report it as lineout in report plug if the value is very
high.

Change-Id: I3257c8f117fdb596a4aa9e743d39d517ad109c79
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
2016-03-23 21:12:49 -07:00
Venkata Narendra Kumar Gutta
fbf1d2a65a ASoC: msm: Fix Incall recording downlink failure
In Voice call, Incall recording in downlink path isn't working.
This is due to dpcm capture flag isn't set for "Incall Record
Downlink" backend DAI link. Update this flag to fix this issue
and also, update the naming convention of Incall recording DAI
links to avoid confusion.

CRs-Fixed: 943349
Change-Id: I788b8718699c3d0ec4de257a57e01f6438bb04a9
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
2016-03-23 21:12:30 -07:00
Bhalchandra Gajare
56ed9e43b7 ASoC: msm-cpe-lsm: Fix out of memory on buffer allocation
The buffer used for look-ahead-buffering is allocated during IOCTL from
userspace. It is possible that userspace can invoke this IOCTL multiple
times without invoking the IOCTL to de-allocate the buffer. This results
in out of memory issue for buffer allocation during stress testing. Fix
this issue by avoiding multiple buffer allocations.

CRs-fixed: 942452
Change-Id: Id9eb99dc2c8527fbbe1fe79fca1cdcea232c33da
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-03-23 21:12:29 -07:00
Phani Kumar Uppalapati
5371285772 ASoC: wcd9335: Clear TX HOLD for ANC input MUX'es
Clear TX HOLD when ANC is enabled and decimator
10 to 13 are selected.

Change-Id: I18c1ddeacc59c1ae7d88daf371c84140c0459693
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23 21:12:26 -07:00
Phani Kumar Uppalapati
2f3bde0fa0 ASoC: wcd9335: Update low hifi and low power modes for headphones
Update register sequence for low hifi and low power modes
for headphones on wcd9335 codec to achieve better performance.

Change-Id: Icf543df7c4e8ab4cc9222a39bf1df4e6af4ab8ec
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23 21:12:25 -07:00
Phani Kumar Uppalapati
b7f1874102 ASoC: wcd9335: Update HIFI mode sequence for headphones
Update HIFI mode register sequence for headphones on
wcd9335 codec for better performance.

Change-Id: I277a38847d02c4500cc3d2c77b00fbe4a63e2f83
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23 21:12:24 -07:00
Bhalchandra Gajare
be06d38f28 ASoC: wcd_cpe_services: Fix DRAM size for WCD9335
The DRAM size used for codec WCD9335 is incorrect, this is causing the
dumps to be wrong. Update the DRAM size for WCD9335 as per the memory
map.

CRs-fixed: 929517
Change-Id: Ie4815b4cedf429b0d7045b84381d945bde62d5ce
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-03-23 21:12:05 -07:00
Bhalchandra Gajare
625bbd03d8 ASoC: wcd_cpe_core: Fix address and size for ramdumps
Since the underlying codec can have different memory map, it is possible
the starting offset and size for DRAM can be different as well. This
causes the collected dumps to be incorrect on some platforms. Fix the
ramdump collection to obtain DRAM offset and size from CPE services
which is aware of the codec being used.

CRs-fixed: 929517
Change-Id: I6a592d8f97da117d1e58154460cd0b8f3cbf62c7
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2016-03-23 21:12:05 -07:00
Ben Romberger
f72230df47 ASoC: msm: qdsp6v2: Enable AFE RTAC topology support
Populate the AFE topology for the RTAC
voice and device structures which allows
retrival of AFE topologies for RTAC
clients.

Change-Id: Ib47e6b04cdfe7146315a800a3f54f9932d54cadc
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2016-03-23 21:11:53 -07:00
Deven Patel
9f1c58fa3a ASoC: wcd9335: Add I2S/I2C interface support for codec
WCD9335 can transport data to and from device through I2S and I2C.
Update the change to support I2S/I2C interface.

Change-Id: Ifdec293510adf685410a4fb6ef6a3e939c4ee04b
Signed-off-by: Deven Patel <cdevenp@codeaurora.org>
2016-03-23 21:11:51 -07:00
Rohit Vaswani
91a1dd684f drivers: iommu, leds, input, clk, devfreq: fix warnings
Fix some variable initializations which would otherwise cause
forbidden warnings.

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2016-03-23 20:57:40 -07:00
David Keitel
f2b1fed1bd Merge remote-tracking branch 'lsk-44/linux-linaro-lsk-v4.4' into 44rc2
* lsk-44/linux-linaro-lsk-v4.4:
  Linux 4.4.3
  modules: fix modparam async_probe request
  module: wrapper for symbol name.
  itimers: Handle relative timers with CONFIG_TIME_LOW_RES proper
  posix-timers: Handle relative timers with CONFIG_TIME_LOW_RES proper
  timerfd: Handle relative timers with CONFIG_TIME_LOW_RES proper
  prctl: take mmap sem for writing to protect against others
  xfs: log mount failures don't wait for buffers to be released
  Revert "xfs: clear PF_NOFREEZE for xfsaild kthread"
  xfs: inode recovery readahead can race with inode buffer creation
  libxfs: pack the agfl header structure so XFS_AGFL_SIZE is correct
  ovl: setattr: check permissions before copy-up
  ovl: root: copy attr
  ovl: check dentry positiveness in ovl_cleanup_whiteouts()
  ovl: use a minimal buffer in ovl_copy_xattr
  ovl: allow zero size xattr
  futex: Drop refcount if requeue_pi() acquired the rtmutex
  devm_memremap_release(): fix memremap'd addr handling
  ipc/shm: handle removed segments gracefully in shm_mmap()
  intel_scu_ipcutil: underflow in scu_reg_access()
  mm,thp: khugepaged: call pte flush at the time of collapse
  dump_stack: avoid potential deadlocks
  radix-tree: fix oops after radix_tree_iter_retry
  drivers/hwspinlock: fix race between radix tree insertion and lookup
  radix-tree: fix race in gang lookup
  MAINTAINERS: return arch/sh to maintained state, with new maintainers
  memcg: only free spare array when readers are done
  numa: fix /proc/<pid>/numa_maps for hugetlbfs on s390
  fs/hugetlbfs/inode.c: fix bugs in hugetlb_vmtruncate_list()
  scripts/bloat-o-meter: fix python3 syntax error
  dma-debug: switch check from _text to _stext
  m32r: fix m32104ut_defconfig build fail
  xhci: Fix list corruption in urb dequeue at host removal
  Revert "xhci: don't finish a TD if we get a short-transfer event mid TD"
  iommu/vt-d: Clear PPR bit to ensure we get more page request interrupts
  iommu/vt-d: Fix 64-bit accesses to 32-bit DMAR_GSTS_REG
  iommu/vt-d: Fix mm refcounting to hold mm_count not mm_users
  iommu/amd: Correct the wrong setting of alias DTE in do_attach
  iommu/vt-d: Don't skip PCI devices when disabling IOTLB
  Input: vmmouse - fix absolute device registration
  string_helpers: fix precision loss for some inputs
  Input: i8042 - add Fujitsu Lifebook U745 to the nomux list
  Input: elantech - mark protocols v2 and v3 as semi-mt
  mm: fix regression in remap_file_pages() emulation
  mm: replace vma_lock_anon_vma with anon_vma_lock_read/write
  mm: fix mlock accouting
  libnvdimm: fix namespace object confusion in is_uuid_busy()
  mm: soft-offline: check return value in second __get_any_page() call
  perf kvm record/report: 'unprocessable sample' error while recording/reporting guest data
  KVM: PPC: Fix ONE_REG AltiVec support
  KVM: PPC: Fix emulation of H_SET_DABR/X on POWER8
  KVM: arm/arm64: Fix reference to uninitialised VGIC
  arm64: dma-mapping: fix handling of devices registered before arch_initcall
  ARM: OMAP2+: Fix ppa_zero_params and ppa_por_params for rodata
  ARM: OMAP2+: Fix save_secure_ram_context for rodata
  ARM: OMAP2+: Fix l2dis_3630 for rodata
  ARM: OMAP2+: Fix l2_inv_api_params for rodata
  ARM: OMAP2+: Fix wait_dll_lock_timed for rodata
  ARM: dts: at91: sama5d4ek: add phy address and IRQ for macb0
  ARM: dts: at91: sama5d4 xplained: fix phy0 IRQ type
  ARM: dts: at91: sama5d4: fix instance id of DBGU
  ARM: dts: at91: sama5d4 xplained: properly mux phy interrupt
  ARM: dts: omap5-board-common: enable rtc and charging of backup battery
  ARM: dts: Fix omap5 PMIC control lines for RTC writes
  ARM: dts: Fix wl12xx missing clocks that cause hangs
  ARM: nomadik: fix up SD/MMC DT settings
  ARM: 8517/1: ICST: avoid arithmetic overflow in icst_hz()
  ARM: 8519/1: ICST: try other dividends than 1
  arm64: mm: avoid calling apply_to_page_range on empty range
  ARM: mvebu: remove duplicated regulator definition in Armada 388 GP
  powerpc/ioda: Set "read" permission when "write" is set
  powerpc/powernv: Fix stale PE primary bus
  powerpc/eeh: Fix stale cached primary bus
  powerpc/eeh: Fix PE location code
  SUNRPC: Fixup socket wait for memory
  udf: Check output buffer length when converting name to CS0
  udf: Prevent buffer overrun with multi-byte characters
  udf: limit the maximum number of indirect extents in a row
  pNFS/flexfiles: Fix an XDR encoding bug in layoutreturn
  nfs: Fix race in __update_open_stateid()
  pNFS/flexfiles: Fix an Oopsable typo in ff_mirror_match_fh()
  NFS: Fix attribute cache revalidation
  cifs: fix erroneous return value
  cifs_dbg() outputs an uninitialized buffer in cifs_readdir()
  cifs: fix race between call_async() and reconnect()
  cifs: Ratelimit kernel log messages
  iio: inkern: fix a NULL dereference on error
  iio: pressure: mpl115: fix temperature offset sign
  iio: light: acpi-als: Report data as processed
  iio: dac: mcp4725: set iio name property in sysfs
  iio: add IIO_TRIGGER dependency to STK8BA50
  iio: add HAS_IOMEM dependency to VF610_ADC
  iio-light: Use a signed return type for ltr501_match_samp_freq()
  iio:adc:ti_am335x_adc Fix buffered mode by identifying as software buffer.
  iio: adis_buffer: Fix out-of-bounds memory access
  scsi: fix soft lockup in scsi_remove_target() on module removal
  SCSI: Add Marvell Console to VPD blacklist
  scsi_dh_rdac: always retry MODE SELECT on command lock violation
  drivers/scsi/sg.c: mark VMA as VM_IO to prevent migration
  SCSI: fix crashes in sd and sr runtime PM
  iscsi-target: Fix potential dead-lock during node acl delete
  scsi: add Synology to 1024 sector blacklist
  klist: fix starting point removed bug in klist iterators
  tracepoints: Do not trace when cpu is offline
  tracing: Fix freak link error caused by branch tracer
  perf tools: tracepoint_error() can receive e=NULL, robustify it
  tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines
  ptrace: use fsuid, fsgid, effective creds for fs access checks
  Btrfs: fix direct IO requests not reporting IO error to user space
  Btrfs: fix hang on extent buffer lock caused by the inode_paths ioctl
  Btrfs: fix page reading in extent_same ioctl leading to csum errors
  Btrfs: fix invalid page accesses in extent_same (dedup) ioctl
  btrfs: properly set the termination value of ctx->pos in readdir
  Revert "btrfs: clear PF_NOFREEZE in cleaner_kthread()"
  Btrfs: fix fitrim discarding device area reserved for boot loader's use
  btrfs: handle invalid num_stripes in sys_array
  ext4: don't read blocks from disk after extents being swapped
  ext4: fix potential integer overflow
  ext4: fix scheduling in atomic on group checksum failure
  serial: omap: Prevent DoS using unprivileged ioctl(TIOCSRS485)
  serial: 8250_pci: Add Intel Broadwell ports
  tty: Add support for PCIe WCH382 2S multi-IO card
  pty: make sure super_block is still valid in final /dev/tty close
  pty: fix possible use after free of tty->driver_data
  staging/speakup: Use tty_ldisc_ref() for paste kworker
  phy: twl4030-usb: Fix unbalanced pm_runtime_enable on module reload
  phy: twl4030-usb: Relase usb phy on unload
  ALSA: seq: Fix double port list deletion
  ALSA: seq: Fix leak of pool buffer at concurrent writes
  ALSA: pcm: Fix rwsem deadlock for non-atomic PCM stream
  ALSA: hda - Cancel probe work instead of flush at remove
  x86/mm: Fix vmalloc_fault() to handle large pages properly
  x86/uaccess/64: Handle the caching of 4-byte nocache copies properly in __copy_user_nocache()
  x86/uaccess/64: Make the __copy_user_nocache() assembly code more readable
  x86/mm/pat: Avoid truncation when converting cpa->numpages to address
  x86/mm: Fix types used in pgprot cacheability flags translations
  Linux 4.4.2
  HID: multitouch: fix input mode switching on some Elan panels
  mm, vmstat: fix wrong WQ sleep when memory reclaim doesn't make any progress
  zsmalloc: fix migrate_zspage-zs_free race condition
  zram: don't call idr_remove() from zram_remove()
  zram: try vmalloc() after kmalloc()
  zram/zcomp: use GFP_NOIO to allocate streams
  rtlwifi: rtl8821ae: Fix 5G failure when EEPROM is incorrectly encoded
  rtlwifi: rtl8821ae: Fix errors in parameter initialization
  crypto: marvell/cesa - fix test in mv_cesa_dev_dma_init()
  crypto: atmel-sha - remove calls of clk_prepare() from atomic contexts
  crypto: atmel-sha - fix atmel_sha_remove()
  crypto: algif_skcipher - Do not set MAY_BACKLOG on the async path
  crypto: algif_skcipher - Do not dereference ctx without socket lock
  crypto: algif_skcipher - Do not assume that req is unchanged
  crypto: user - lock crypto_alg_list on alg dump
  EVM: Use crypto_memneq() for digest comparisons
  crypto: algif_hash - wait for crypto_ahash_init() to complete
  crypto: shash - Fix has_key setting
  crypto: chacha20-ssse3 - Align stack pointer to 64 bytes
  crypto: caam - make write transactions bufferable on PPC platforms
  crypto: algif_skcipher - sendmsg SG marking is off by one
  crypto: algif_skcipher - Load TX SG list after waiting
  crypto: crc32c - Fix crc32c soft dependency
  crypto: algif_skcipher - Fix race condition in skcipher_check_key
  crypto: algif_hash - Fix race condition in hash_check_key
  crypto: af_alg - Forbid bind(2) when nokey child sockets are present
  crypto: algif_skcipher - Remove custom release parent function
  crypto: algif_hash - Remove custom release parent function
  crypto: af_alg - Allow af_af_alg_release_parent to be called on nokey path
  ahci: Intel DNV device IDs SATA
  libata: disable forced PORTS_IMPL for >= AHCI 1.3
  crypto: algif_skcipher - Add key check exception for cipher_null
  crypto: skcipher - Add crypto_skcipher_has_setkey
  crypto: algif_hash - Require setkey before accept(2)
  crypto: hash - Add crypto_ahash_has_setkey
  crypto: algif_skcipher - Add nokey compatibility path
  crypto: af_alg - Add nokey compatibility path
  crypto: af_alg - Fix socket double-free when accept fails
  crypto: af_alg - Disallow bind/setkey/... after accept(2)
  crypto: algif_skcipher - Require setkey before accept(2)
  sched: Fix crash in sched_init_numa()
  ext4 crypto: add missing locking for keyring_key access
  iommu/io-pgtable-arm: Ensure we free the final level on teardown
  tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)
  tty: Retry failed reopen if tty teardown in-progress
  tty: Wait interruptibly for tty lock on reopen
  n_tty: Fix unsafe reference to "other" ldisc
  usb: xhci: apply XHCI_PME_STUCK_QUIRK to Intel Broxton-M platforms
  usb: xhci: handle both SSIC ports in PME stuck quirk
  usb: phy: msm: fix error handling in probe.
  usb: cdc-acm: send zero packet for intel 7260 modem
  usb: cdc-acm: handle unlinked urb in acm read callback
  USB: option: fix Cinterion AHxx enumeration
  USB: serial: option: Adding support for Telit LE922
  USB: cp210x: add ID for IAI USB to RS485 adaptor
  USB: serial: ftdi_sio: add support for Yaesu SCU-18 cable
  usb: hub: do not clear BOS field during reset device
  USB: visor: fix null-deref at probe
  USB: serial: visor: fix crash on detecting device without write_urbs
  ASoC: rt5645: fix the shift bit of IN1 boost
  saa7134-alsa: Only frees registered sound cards
  ALSA: dummy: Implement timer backend switching more safely
  ALSA: hda - Fix bad dereference of jack object
  ALSA: hda - Fix speaker output from VAIO AiO machines
  Revert "ALSA: hda - Fix noise on Gigabyte Z170X mobo"
  ALSA: hda - Fix static checker warning in patch_hdmi.c
  ALSA: hda - Add fixup for Mac Mini 7,1 model
  ALSA: timer: Fix race between stop and interrupt
  ALSA: timer: Fix wrong instance passed to slave callbacks
  ALSA: timer: Fix race at concurrent reads
  ALSA: timer: Fix link corruption due to double start or stop
  ALSA: timer: Fix leftover link at closing
  ALSA: timer: Code cleanup
  ALSA: seq: Fix lockdep warnings due to double mutex locks
  ALSA: seq: Fix race at closing in virmidi driver
  ALSA: seq: Fix yet another races among ALSA timer accesses
  ASoC: dpcm: fix the BE state on hw_free
  ALSA: pcm: Fix potential deadlock in OSS emulation
  ALSA: hda/realtek - Support Dell headset mode for ALC225
  ALSA: hda/realtek - Support headset mode for ALC225
  ALSA: hda/realtek - New codec support of ALC225
  ALSA: rawmidi: Fix race at copying & updating the position
  ALSA: rawmidi: Remove kernel WARNING for NULL user-space buffer check
  ALSA: rawmidi: Make snd_rawmidi_transmit() race-free
  ALSA: seq: Degrade the error message for too many opens
  ALSA: seq: Fix incorrect sanity check at snd_seq_oss_synth_cleanup()
  ALSA: dummy: Disable switching timer backend via sysfs
  ALSA: compress: Disable GET_CODEC_CAPS ioctl for some architectures
  ALSA: hda - disable dynamic clock gating on Broxton before reset
  ALSA: Add missing dependency on CONFIG_SND_TIMER
  ALSA: bebob: Use a signed return type for get_formation_index
  ALSA: usb-audio: avoid freeing umidi object twice
  ALSA: usb-audio: Add native DSD support for PS Audio NuWave DAC
  ALSA: usb-audio: Fix OPPO HA-1 vendor ID
  ALSA: usb-audio: Add quirk for Microsoft LifeCam HD-6000
  ALSA: usb-audio: Fix TEAC UD-501/UD-503/NT-503 usb delay
  hrtimer: Handle remaining time proper for TIME_LOW_RES
  md/raid: only permit hot-add of compatible integrity profiles
  media: i2c: Don't export ir-kbd-i2c module alias
  parisc: Fix __ARCH_SI_PREAMBLE_SIZE
  parisc: Protect huge page pte changes with spinlocks
  printk: do cond_resched() between lines while outputting to consoles
  tracing/stacktrace: Show entire trace if passed in function not found
  tracing: Fix stacktrace skip depth in trace_buffer_unlock_commit_regs()
  PCI: Fix minimum allocation address overwrite
  PCI: host: Mark PCIe/PCI (MSI) IRQ cascade handlers as IRQF_NO_THREAD
  mtd: nand: assign reasonable default name for NAND drivers
  wlcore/wl12xx: spi: fix NULL pointer dereference (Oops)
  wlcore/wl12xx: spi: fix oops on firmware load
  ocfs2/dlm: clear refmap bit of recovery lock while doing local recovery cleanup
  ocfs2/dlm: ignore cleaning the migration mle that is inuse
  ALSA: hda - Implement loopback control switch for Realtek and other codecs
  block: fix bio splitting on max sectors
  base/platform: Fix platform drivers with no probe callback
  HID: usbhid: fix recursive deadlock
  ocfs2: NFS hangs in __ocfs2_cluster_lock due to race with ocfs2_unblock_lock
  block: split bios to max possible length
  NFSv4.1/pnfs: Fixup an lo->plh_block_lgets imbalance in layoutreturn
  crypto: sun4i-ss - add missing statesize
  Linux 4.4.1
  arm64: kernel: fix architected PMU registers unconditional access
  arm64: kernel: enforce pmuserenr_el0 initialization and restore
  arm64: mm: ensure that the zero page is visible to the page table walker
  arm64: Clear out any singlestep state on a ptrace detach operation
  powerpc/module: Handle R_PPC64_ENTRY relocations
  scripts/recordmcount.pl: support data in text section on powerpc
  powerpc: Make {cmp}xchg* and their atomic_ versions fully ordered
  powerpc: Make value-returning atomics fully ordered
  powerpc/tm: Check for already reclaimed tasks
  batman-adv: Drop immediate orig_node free function
  batman-adv: Drop immediate batadv_hard_iface free function
  batman-adv: Drop immediate neigh_ifinfo free function
  batman-adv: Drop immediate batadv_neigh_node free function
  batman-adv: Drop immediate batadv_orig_ifinfo free function
  batman-adv: Avoid recursive call_rcu for batadv_nc_node
  batman-adv: Avoid recursive call_rcu for batadv_bla_claim
  team: Replace rcu_read_lock with a mutex in team_vlan_rx_kill_vid
  net/mlx5_core: Fix trimming down IRQ number
  bridge: fix lockdep addr_list_lock false positive splat
  ipv6: update skb->csum when CE mark is propagated
  net: bpf: reject invalid shifts
  phonet: properly unshare skbs in phonet_rcv()
  dwc_eth_qos: Fix dma address for multi-fragment skbs
  bonding: Prevent IPv6 link local address on enslaved devices
  net: preserve IP control block during GSO segmentation
  udp: disallow UFO for sockets with SO_NO_CHECK option
  net: pktgen: fix null ptr deref in skb allocation
  sched,cls_flower: set key address type when present
  tcp_yeah: don't set ssthresh below 2
  ipv6: tcp: add rcu locking in tcp_v6_send_synack()
  net: sctp: prevent writes to cookie_hmac_alg from accessing invalid memory
  vxlan: fix test which detect duplicate vxlan iface
  unix: properly account for FDs passed over unix sockets
  xhci: refuse loading if nousb is used
  usb: core: lpm: fix usb3_hardware_lpm sysfs node
  USB: cp210x: add ID for ELV Marble Sound Board 1
  rtlwifi: fix memory leak for USB device
  ASoC: compress: Fix compress device direction check
  ASoC: wm5110: Fix PGA clear when disabling DRE
  ALSA: timer: Handle disconnection more safely
  ALSA: hda - Flush the pending probe work at remove
  ALSA: hda - Fix missing module loading with model=generic option
  ALSA: hda - Fix bass pin fixup for ASUS N550JX
  ALSA: control: Avoid kernel warnings from tlv ioctl with numid 0
  ALSA: hrtimer: Fix stall by hrtimer_cancel()
  ALSA: pcm: Fix snd_pcm_hw_params struct copy in compat mode
  ALSA: seq: Fix snd_seq_call_port_info_ioctl in compat mode
  ALSA: hda - Add fixup for Dell Latitidue E6540
  ALSA: timer: Fix double unlink of active_list
  ALSA: timer: Fix race among timer ioctls
  ALSA: hda - fix the headset mic detection problem for a Dell laptop
  ALSA: timer: Harden slave timer list handling
  ALSA: usb-audio: Fix mixer ctl regression of Native Instrument devices
  ALSA: hda - Fix white noise on Dell Latitude E5550
  ALSA: seq: Fix race at timer setup and close
  ALSA: usb-audio: Avoid calling usb_autopm_put_interface() at disconnect
  ALSA: seq: Fix missing NULL check at remove_events ioctl
  ALSA: hda - Fixup inverted internal mic for Lenovo E50-80
  ALSA: usb: Add native DSD support for Oppo HA-1
  x86/mm: Improve switch_mm() barrier comments
  x86/mm: Add barriers and document switch_mm()-vs-flush synchronization
  x86/boot: Double BOOT_HEAP_SIZE to 64KB
  x86/reboot/quirks: Add iMac10,1 to pci_reboot_dmi_table[]
  kvm: x86: Fix vmwrite to SECONDARY_VM_EXEC_CONTROL
  KVM: x86: correctly print #AC in traces
  KVM: x86: expose MSR_TSC_AUX to userspace
  x86/xen: don't reset vcpu_info on a cancelled suspend
  KEYS: Fix keyring ref leak in join_session_keyring()

Conflicts:
	arch/arm64/kernel/perf_event.c
	drivers/scsi/sd.c
	sound/core/compress_offload.c

Change-Id: I9f77fe42aaae249c24cd6e170202110ab1426878
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
2016-03-23 20:51:00 -07:00
Sudheer Papothi
cb8b39f631 ASoC: msm8996: Remove WCD9330 codec support
Remove WCD9330 codec support on 8996 target.

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:48:11 -07:00
Sudheer Papothi
ea4f5e1b02 ARM: dts: msm: Disable hdmi audio on kernel 4.4
Disable HDMI audio functionality on kernel 4.4 till the HDMI
driver is ready.

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:33 -07:00
Sudheer Papothi
52488f1300 ASoC: msm: qdsp6v2: cleanup of header files from voice driver
Battery monitor service(BMS) is not supported on kernel 4.4.
So, remove battery monitor services header file from voice
driver.

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:30 -07:00
Sudheer Papothi
fc21a2b173 ASoC: wcd: Remove WCD9320 codec support
Remove WCD9320 codec support on kernel 4.4.

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:29 -07:00
Sudheer Papothi
8dc812f2d4 ASoC: Audio codec driver changes for kernel 4.4
Audio codec driver changes for kernel 4.4.

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:29 -07:00
Sudheer Papothi
03f5d7efe2 ASoC: wcd: Add Audio codec drivers for MSM targets
Add snapshot of audio codec drivers for MSM targets. The
code is migrated from msm-3.18 kernel at the below commit/AU level-

AU_LINUX_ANDROID_LA.HB.1.3.1.06.00.00.187.056
(e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1)
(Promotion of kernel.lnx.3.18-151201.)

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:28 -07:00
Sudheer Papothi
5a20e4b489 ASoC: msm: Update audio drivers for kernel 4.4
Update audio drivers for kernel 4.4

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:27 -07:00
Sudheer Papothi
3287ab783e ASoC: msm: Cleanup of machine drivers for kernel 4.4
Remove machine drivers that does not support kernel 4.4 currently.

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:26 -07:00
Sudheer Papothi
be1a516dcb ASoC: msm: Add Audio drivers for MSM targets
Add snapshot for audio drivers for MSM targets. The code is
migrated from msm-3.18 kernel at the below commit/AU level -

AU_LINUX_ANDROID_LA.HB.1.3.1.06.00.00.187.056
(e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1)
(Promotion of kernel.lnx.3.18-151201.)

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:25 -07:00
Sudheer Papothi
658e9b6abe ASoC: msm: qdsp6v2: Prevent ASM callback when client freed
Set EOS flag in compress driver for partial drain
and reorder ASM client free function to prevent
callback from being signaled after ASM client is
freed.

Change-Id: Ib68bd3fa175af78d10e02e227563c44e9367f4fe
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:23 -07:00
Sudheer Papothi
a48f38a287 ASoC: msm: qdsp6v2: Make separate ASM cal function
Remove set ASM cal function from ASM run functions.
Define separate function for compress and pcm driver
clients to call. Call function in compress driver after
setting gain since soft volume in ASM table must be
set after gain.

Change-Id: I26ad33c0ef5dbbf3a79848179d371a583e381cf8
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:22 -07:00
Weiyin Jiang
194f41adfe ASoC: msm: qdsp6v2: force sending stereo volume for mono
Certain AAC has channel switch, so DSP decoder might reconfigure output
from mono to stereo in runtime. If only volume of FC is sent, output
pcm won't get applied with volume setting properly. We should force
sending FL/FR/FC volume gain for mono clips.

Change-Id: I656080f32053f1dc866d8cd981a9d5f03c2d963a
CRs-Fixed: 924685
Signed-off-by: Weiyin Jiang <wjiang@codeaurora.org>
2016-03-23 20:11:21 -07:00
Ben Romberger
24102570c8 ASoC: msm: Interrupt events in compress free
Interrupt any wait events during free of the compress driver
and move spinlock unlock to after the ASM client is freed.

Change-Id: Idb865ebbb47b86ac32043ba4562053d3f9795b4d
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
2016-03-23 20:11:20 -07:00
Sudheer Papothi
60ae3d3db4 ASoC: msm: qdsp6v2: Handle additional codec specific metadata
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.
Add bit rate to wma codec data structure as it can vary between
streams in gapless.

Change-Id: I39f34ea1addff720612fe3e06257e7d75889e574
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:20 -07:00
Dhananjay Kumar
3e6ed249e1 ASoC: msm: fix integer overflow for long duration offload playback
32 bit variable is used for storing number of bytes copied to DSP,
which can overflow when playback duration goes beyond 24 hours.
Change data type for this variable to uint64_t, to prevent overflow
and related playback anomaly.

CRs-Fixed: 877677
Change-Id: Ie4dfa630cf89559bb784d4712c52526665baeca6
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:11:19 -07:00
Chaithanya Krishna Bacharaju
72f334a91f SoC: msm: qdsp6v2: Enable gapless for pcm offload
Enable gapless for PCM offload format playback.

Change-Id: Ia010c96511f3e9208a00aa2896c4b63faa8a1505
Signed-off-by: Chaithanya Krishna Bacharaju <chaithan@codeaurora.org>
2016-03-23 20:11:18 -07:00
Dhananjay Kumar
2e17f7a8d8 ASoC: msm: qdsp6v2: fix incomplete playback issue for non-gapless formats
Fix data loss on auto switching of playback to next clip
when current playback format is not having gapless support
in compressed driver.
Media playback complete event is sent to framework on completion
of partial drain, this is supposed to be before actual renderer
EOS by duration equal to value of PARTIAL_DRAIN_ACK_EARLY_BY_MSEC,
but due to uninitialized frame size for non-gapless formats this
duration calculated is inaccurate and sometimes triggers drain
completion too early, leading to premature teardown of playback
session.
Fix this by disabling gapless on formats not having valid gapless
parameters.
Recalculate partial drain delay based on flac min block size
to avoid incorrect drain delay for FLAC format.

Change-Id: I7f70a6fc17cc9c339ea754fd21aae6865355bef2
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
2016-03-23 20:11:17 -07:00
Preetam Singh Ranawat
6343654319 ASoC: msm: qdsp6v2: add error handling on write done during partial drain
If there is any error on write done event during parital drain,
 compress driver does not return from partial drain and playback
 does not move to next clip.
 Add error handling in compress driver to return from partial
 drain on write done error.

Change-Id: I5f0c1f01d51185acf04837fc7380a1cb5a07bca9
Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
2016-03-23 20:11:16 -07:00
Sudheer Papothi
668e4c6567 ASoC: msm: qdsp6v2: delete ocmem drivers
ocmem drivers are deprecated, no plan to use in future.

Change-Id: Ie61f0b0bd404b8fdeee44d7839f6509e70776a9c
Signed-off-by: Fred Oh <fred@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:15 -07:00
Sudheer Papothi
fa4639d92b ASoC: msm: qdsp6v2: get component pointer properly
Due to ASoC's Componentization change, component pointer is required not
platform pointer.

Change-Id: Ieef25e482a766c9b0409f2ea806dc2016835025c
Signed-off-by: Fred Oh <fred@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:14 -07:00
Banajit Goswami
a88b3d846b ASoC: msm: qdsp6v2: Add controls using snd_soc_add_platform_controls
The elements ".control" and ".num_controls" have been
removed from snd_soc_platform_drivers. Hence add the
gapless control using snd_soc_add_platform_controls.

Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:11:13 -07:00
Sudheer Papothi
1155e5b8ea ASoC: msm: qdsp6v2: Merge changes from kernel upgrade
Snapshot of msm-compress-q6-v2.c file from msm-3.14 kernel
at the below commit/AU level -

AU_LINUX_ANDROID_LA.HB.1.1.1.05.00.02.063.080
3bc54cf86bdc7affa7cd4bf7faa3c57fe8f8819d
(Merge "msm: camera: Add dummy sub module in sensor pipeline")

Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:13 -07:00
Banajit Goswami
83731f8574 ASoC: soc-core: export function to find components
Drivers might need to use the ASoC core function to
find out whether a particular component is already
registered with ALSA core or not. Export the function
so that drivers can use it outside of the file.

Change-Id: I13e4a053de085974b0b53c392a9453e46f1aa66d
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:11:11 -07:00
Walter Yang
110ad9d27a ASoC: Cold start latency reduction
This patch parallelizes FE (front end) and BE (back end)
when playback/capture path is set up. FE's and BE's which can
be parallelized should be indicated in corresponding machine file.
All the operations can be started asynchronously provided the usecase
supports asynchronous operation.
Parallelizing reduces the startup latency as both FE and BE operations
run in parallel.

Change-Id: I17e7e1c3d406713cc728ec262cfe388f7251f7de
Signed-off-by: Walter Yang <yandongy@codeaurora.org>
Signed-off-by: Fred Oh <fred@codeaurora.org>

Conflicts:
	include/sound/soc.h
	sound/soc/soc-compress.c
	sound/soc/soc-pcm.c
2016-03-23 20:11:09 -07:00
Alexy Joseph
5579f105aa ALSA: compress: Add support to send codec specific data
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
2016-03-23 20:11:07 -07:00
Kenneth Westfield
579b5a9417 ASoC: pcm: Add delay_blk feature
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>
2016-03-23 20:11:06 -07:00
Sudheer Papothi
b21e23e099 ASoC: pcm: Check for capture path in all codec_dais
During soc_pcm_prepare, check for capture path for all
the codec_dais instead of the last codec_dai. This is
will help to set pcm start event for all the codec dais
that has capture_active set to high. Change checks for
all the codec_dais capture_active bit to set start stream
event.

Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:11:04 -07:00
Phani Kumar Uppalapati
3dea4c44db ALSA: core: Add an API to create and register module
Add an API to create a module under the given parent
directory and then register the info entry. This API
can be used to expose ID and version related
information.

Change-Id: I06f8bc1d8f649e6db37eb65303e948bc58eab7da
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
2016-03-23 20:11:03 -07:00
Vidyakumar Athota
2e4fca555e ALSA: pcm: add support for 384KHz sample rate
Currenlty HW params fails to set 384KHz sample rate
due to unsupported sample rate. Change to add 384KHz
sample rate support to ALSA.

Change-Id: I381f7cdcc69e6cf9339cec53aab3fa295760c17c
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2016-03-23 20:11:02 -07:00
Deepa Madiregama
8152f43f0a ALSA: usb-audio: Fix the mixer control range limiting issue
- mixer_ctl_set() function is limiting the volume level
  to particular range. This results in incorrect initial
  volume setting for that device.
- In USB mixer while calculating the dBmin/dBmax values
  resolution factor is hardcoded to 256 which results in
  populating the wrong values for dBmin/dBmax.
- Fix is to use appropriate resolution factor while
  calculating the dBmin/dBmax values.

CRs-Fixed: 515012
Change-Id: I502355af66f850bb65380c27333c3341fa43a947
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
2016-03-23 20:10:58 -07:00
Mayank Rana
f18c9be9d4 msm: usbaudio: Add check for NULL before dereferencing
kzalloc() and usb_ifnum_to_if() both APIs can return NULL. Current
code is not checking return value and derefencing which may crash
device if it is set to NULL. Fix this by checking return value
against NULL and handling the same.

CRs-Fixed: 562273
Change-Id: I0d2c910f43321e94fc447b19ae3e3207727e24f3
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:57 -07:00
Banajit Goswami
c336ae90fa ASoC: core: Remove sound card state check from read/write
Having sound card offline condition checks inside
register read/write functions will also avoid Asoc
cache writes. However, it is needed to update the
Asoc cache whenever user-space sends disable sequence
while sound card is in offline state. Remove the offline
check condition from ASoC read/writes and let the codec
driver take care of not sending bus read/writes if sound
card is in offline state.

Change-Id: I960b85a277a28dd05eb919c1c6abf7aa32a45265
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
2016-03-23 20:10:56 -07:00
Sudheer Papothi
a73f468d5e ASoC: pcm: update the start-up sequence for playback
Codec should be started before the CPU to ensure that there is no data
loss during playback.Current sequence enables the CPU first followed by
codec.This change updates the sequence prevent any playback data loss.

Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:10:55 -07:00
Anish Kumar
f1031ca0f7 ASoC: pcm: increase the hostless buffer size
PAGE_SIZE buffer is not enough in all use cases.This
limits the amount of buffer that can be passed from
userspace. Not increasing this causes failure in pcm_native
when rules are checked against all hw_params passed
from userspace.

Change-Id: Iddc280f78d54a1959be8718055bdb5ef0270653c
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
2016-03-23 20:10:54 -07:00
Anish Kumar
80e8ef2c04 ASoC: pcm: Add support for fixup callback
Fixup callback is added for dai's which
do not follow the FE and BE convention
and is directly controlled by userspace
such as hostless dai's. 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>
2016-03-23 20:10:54 -07:00
Sudheer Papothi
d57ab70296 ASoC: dapm: mark dapm_kcontrol_get_wlist as global function
dapm_kcontrol_get_wlist() function needs to be called from
driver other than the soc-dapm.c file itself. Mark this
function as global function, so it can be accessed from
other drivers.

Signed-off-by: Banajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
2016-03-23 20:10:53 -07:00
Abhimanyu Kapur
6aa90dc7dc sound: pcm: fix compilation warnings in snd_pcm_add_volume_ctls
Use explicit char* casting to fix compiler warning.

kernel/sound/core/pcm_lib.c: In function 'snd_pcm_add_volume_ctls':
kernel/sound/core/pcm_lib.c:2674:3: warning: passing argument 1 of 'snprintf' discards 'const' qualifier from pointer target type
   snprintf(knew.name, size, "%s %d %s",
   ^
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-23 20:10:52 -07:00
Aviral Gupta
6f88ba1a69 ASoC: compress: propagate the error code from the compress framework
Propagate the error code from the compress framework for the timestamp
query. This error code will be used by the client to handle the
error case scenarios gracefully.

CRs-Fixed: 683288
Change-Id: I68ad14d52327dd0156531fe8d17ac54ba110fdf6
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
2016-03-23 20:10:51 -07:00