Commit graph

25139 commits

Author SHA1 Message Date
Linux Build Service Account
fa33f6bd9a Merge "SoC: msm: change the MAX value of "App Type Config" kcontrol" 2017-09-24 19:54:04 -07:00
Linux Build Service Account
b95d667366 Merge "ALSA: info: Protect list access of new entry" 2017-09-24 11:54:02 -07:00
Linux Build Service Account
fd84661ff9 Merge "ASoc: msm: Support primary TDM interface" 2017-09-24 11:54:01 -07:00
Linux Build Service Account
3e07e9cdb5 Merge "ASoC: msm: qdsp6v2: change to no-wait command for RTIC event" 2017-09-22 17:26:42 -07:00
Linux Build Service Account
ba64f1b64f Merge "ASoC: msm: qdsp6v2: Fix dangling pointer access" 2017-09-22 09:13:40 -07:00
Cong Tang
516bd75a2a ASoc: msm: Support primary TDM interface
Support primary TDM interface dai link and export kcontrols to update
primary TDM interface slot configuration.

CRs-fixed: 2095930
Change-Id: I693b99f295f6476c96d681e10459842c0011467f
Signed-off-by: Cong Tang <congt@codeaurora.org>
2017-09-21 20:10:27 -07:00
Aditya Bavanari
adc8d80a00 ASoC: msm: qdsp6v2: Fix dangling pointer access
Fix access of a dangling pointer by assigning it to NULL.

CRs-Fixed: 2096407
Change-Id: I22c1d55ea611ac59cdca51924787f6831bad8c2b
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2017-09-13 10:57:17 +05:30
Linux Build Service Account
14f6bfeeeb Merge "Merge android-4.4@610af85 (v4.4.85) into msm-4.4" 2017-09-12 14:41:58 -07:00
Linux Build Service Account
53b5648fac Merge "ASoc: msm: Add pm_qos_request_active condition check" 2017-09-12 05:25:34 -07:00
Vatsal Bucha
d3c53d2a43 ASoC: sdm660_cdc: Fix mute if compander is disabled
Compander disable sequence does not get called
after headphone playback on fm. This results in
mute at one channel and low volume at other channel.
Low volume is resolved by setting analog mode to manual
while compander is off.
Also compander clock should be disabled at the end to
resolve mute issue.

CRs-Fixed: 2102126
Change-Id: I68e72f3b333117a8fdf379db30dc24de9bed7270
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2017-09-11 02:59:08 -07:00
Linux Build Service Account
ef93f7a163 Merge "Merge android-4.4@4b8fc9f (v4.4.82) into msm-4.4" 2017-09-08 22:04:15 -07:00
Linux Build Service Account
b92b0cea6d Merge "ASoC: wsa881x: Fix wsa881x speaker damage" 2017-09-06 01:42:39 -07:00
Laxminath Kasam
faf60ba74f ALSA: info: Protect list access of new entry
At bootup, two different contexts access same list
result in crash. Add mutex lock protect around list access.

CRs-Fixed: 2060390
Change-Id: I648db0a96c507c7e3ad9a5bb7d59021ebf86b27e
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-09-06 00:08:30 -07:00
Blagovest Kolenichev
03f50f905f Merge android-4.4@610af85 (v4.4.85) into msm-4.4
* refs/heads/tmp-610af85
  Linux 4.4.85
  ACPI / APEI: Add missing synchronize_rcu() on NOTIFY_SCI removal
  ACPI: ioapic: Clear on-stack resource before using it
  ntb_transport: fix bug calculating num_qps_mw
  ntb_transport: fix qp count bug
  ASoC: rsnd: don't call update callback if it was NULL
  ASoC: rsnd: ssi: 24bit data needs right-aligned settings
  ASoC: rsnd: Add missing initialization of ADG req_rate
  ASoC: rsnd: avoid pointless loop in rsnd_mod_interrupt()
  ASoC: rsnd: disable SRC.out only when stop timing
  ASoC: simple-card: don't fail if sysclk setting is not supported
  staging: rtl8188eu: add RNX-N150NUB support
  iio: hid-sensor-trigger: Fix the race with user space powering up sensors
  iio: imu: adis16480: Fix acceleration scale factor for adis16480
  ANDROID: binder: fix proc->tsk check.
  binder: Use wake up hint for synchronous transactions.
  binder: use group leader instead of open thread
  Bluetooth: bnep: fix possible might sleep error in bnep_session
  Bluetooth: cmtp: fix possible might sleep error in cmtp_session
  Bluetooth: hidp: fix possible might sleep error in hidp_session_thread
  perf/core: Fix group {cpu,task} validation
  nfsd: Limit end of page list when decoding NFSv4 WRITE
  cifs: return ENAMETOOLONG for overlong names in cifs_open()/cifs_lookup()
  cifs: Fix df output for users with quota limits
  tracing: Fix freeing of filter in create_filter() when set_str is false
  drm: rcar-du: Fix H/V sync signal polarity configuration
  drm: rcar-du: Fix display timing controller parameter
  drm: rcar-du: Fix crash in encoder failure error path
  drm: rcar-du: lvds: Rename PLLEN bit to PLLON
  drm: rcar-du: lvds: Fix PLL frequency-related configuration
  drm/atomic: If the atomic check fails, return its value first
  drm: Release driver tracking before making the object available again
  i2c: designware: Fix system suspend
  ARCv2: PAE40: Explicitly set MSB counterpart of SLC region ops addresses
  ALSA: hda - Add stereo mic quirk for Lenovo G50-70 (17aa:3978)
  ALSA: core: Fix unexpected error at replacing user TLV
  Input: elan_i2c - add ELAN0602 ACPI ID to support Lenovo Yoga310
  Input: trackpoint - add new trackpoint firmware ID
  mei: me: add lewisburg device ids
  mei: me: add broxton pci device ids
  net_sched: fix order of queue length updates in qdisc_replace()
  net: sched: fix NULL pointer dereference when action calls some targets
  irda: do not leak initialized list.dev to userspace
  tcp: when rearming RTO, if RTO time is in past then fire RTO ASAP
  ipv6: repair fib6 tree in failure case
  ipv6: reset fn->rr_ptr when replacing route
  tipc: fix use-after-free
  sctp: fully initialize the IPv6 address in sctp_v6_to_addr()
  ipv4: better IP_MAX_MTU enforcement
  net_sched/sfq: update hierarchical backlog when drop packet
  ipv4: fix NULL dereference in free_fib_info_rcu()
  dccp: defer ccid_hc_tx_delete() at dismantle time
  dccp: purge write queue in dccp_destroy_sock()
  af_key: do not use GFP_KERNEL in atomic contexts
  ANDROID: NFC: st21nfca: Fix memory OOB and leak issues in connectivity events handler
  Linux 4.4.84
  usb: qmi_wwan: add D-Link DWM-222 device ID
  usb: optimize acpi companion search for usb port devices
  perf/x86: Fix LBR related crashes on Intel Atom
  pids: make task_tgid_nr_ns() safe
  Sanitize 'move_pages()' permission checks
  irqchip/atmel-aic: Fix unbalanced refcount in aic_common_rtc_irq_fixup()
  irqchip/atmel-aic: Fix unbalanced of_node_put() in aic_common_irq_fixup()
  x86/asm/64: Clear AC on NMI entries
  xen: fix bio vec merging
  mm: revert x86_64 and arm64 ELF_ET_DYN_BASE base changes
  mm/mempolicy: fix use after free when calling get_mempolicy
  ALSA: usb-audio: Add mute TLV for playback volumes on C-Media devices
  ALSA: usb-audio: Apply sample rate quirk to Sennheiser headset
  ALSA: seq: 2nd attempt at fixing race creating a queue
  Input: elan_i2c - Add antoher Lenovo ACPI ID for upcoming Lenovo NB
  Input: elan_i2c - add ELAN0608 to the ACPI table
  crypto: x86/sha1 - Fix reads beyond the number of blocks passed
  parisc: pci memory bar assignment fails with 64bit kernels on dino/cujo
  audit: Fix use after free in audit_remove_watch_rule()
  netfilter: nf_ct_ext: fix possible panic after nf_ct_extend_unregister
  ANDROID: check dir value of xfrm_userpolicy_id
  ANDROID: NFC: Fix possible memory corruption when handling SHDLC I-Frame commands
  ANDROID: nfc: fdp: Fix possible buffer overflow in WCS4000 NFC driver
  ANDROID: NFC: st21nfca: Fix out of bounds kernel access when handling ATR_REQ
  UPSTREAM: usb: dwc3: gadget: don't send extra ZLP
  BACKPORT: usb: dwc3: gadget: handle request->zero
  ANDROID: usb: gadget: assign no-op request complete callbacks
  ANDROID: usb: gadget: configfs: fix null ptr in android_disconnect
  ANDROID: uid_sys_stats: Fix implicit declaration of get_cmdline()
  uid_sys_stats: log task io with a debug flag
  Linux 4.4.83
  pinctrl: samsung: Remove bogus irq_[un]mask from resource management
  pinctrl: sunxi: add a missing function of A10/A20 pinctrl driver
  pnfs/blocklayout: require 64-bit sector_t
  iio: adc: vf610_adc: Fix VALT selection value for REFSEL bits
  usb:xhci:Add quirk for Certain failing HP keyboard on reset after resume
  usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter
  usb: core: unlink urbs from the tail of the endpoint's urb_list
  USB: Check for dropped connection before switching to full speed
  uas: Add US_FL_IGNORE_RESIDUE for Initio Corporation INIC-3069
  iio: light: tsl2563: use correct event code
  iio: accel: bmc150: Always restore device to normal mode after suspend-resume
  staging:iio:resolver:ad2s1210 fix negative IIO_ANGL_VEL read
  USB: hcd: Mark secondary HCD as dead if the primary one died
  usb: musb: fix tx fifo flush handling again
  USB: serial: pl2303: add new ATEN device id
  USB: serial: cp210x: add support for Qivicon USB ZigBee dongle
  USB: serial: option: add D-Link DWM-222 device ID
  nfs/flexfiles: fix leak of nfs4_ff_ds_version arrays
  fuse: initialize the flock flag in fuse_file on allocation
  iscsi-target: Fix iscsi_np reset hung task during parallel delete
  iscsi-target: fix memory leak in iscsit_setup_text_cmd()
  mm: ratelimit PFNs busy info message
  cpuset: fix a deadlock due to incomplete patching of cpusets_enabled()
  ANDROID: Use sk_uid to replace uid get from socket file
  UPSTREAM: arm64: smp: Prevent raw_smp_processor_id() recursion
  UPSTREAM: arm64: restore get_current() optimisation
  ANDROID: arm64: Fix a copy-paste error in prior init_thread_info build fix

Conflicts:
	drivers/misc/Kconfig
	drivers/usb/dwc3/gadget.c
	include/linux/sched.h
	mm/migrate.c
	net/netfilter/xt_qtaguid.c

Change-Id: I3a0107fcb5c7455114b316426c9d669bb871acd1
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2017-09-04 17:20:09 -07:00
Vidyakumar Athota
a135611457 ASoC: msm: qdsp6v2: change to no-wait command for RTIC event
RTIC(runtime check) event ack command can execute asynchronously
along with other ASM commands. Using common cmd_state variable
to wake up the thread results synchronization issues. So use
no-wait command for RTIC event ack command.

Change-Id: Ie55ac6d50f83112e72de65c68340f7f7ba0923da
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2017-09-01 12:19:51 -07:00
Blagovest Kolenichev
901bf6ddcc Merge android-4.4@4b8fc9f (v4.4.82) into msm-4.4
* refs/heads/tmp-4b8fc9f
  UPSTREAM: locking: avoid passing around 'thread_info' in mutex debugging code
  ANDROID: arm64: fix undeclared 'init_thread_info' error
  UPSTREAM: kdb: use task_cpu() instead of task_thread_info()->cpu
  Linux 4.4.82
  net: account for current skb length when deciding about UFO
  ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output
  mm/mempool: avoid KASAN marking mempool poison checks as use-after-free
  KVM: arm/arm64: Handle hva aging while destroying the vm
  sparc64: Prevent perf from running during super critical sections
  udp: consistently apply ufo or fragmentation
  revert "ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output"
  revert "net: account for current skb length when deciding about UFO"
  packet: fix tp_reserve race in packet_set_ring
  net: avoid skb_warn_bad_offload false positives on UFO
  tcp: fastopen: tcp_connect() must refresh the route
  net: sched: set xt_tgchk_param par.nft_compat as 0 in ipt_init_target
  bpf, s390: fix jit branch offset related to ldimm64
  net: fix keepalive code vs TCP_FASTOPEN_CONNECT
  tcp: avoid setting cwnd to invalid ssthresh after cwnd reduction states
  ANDROID: keychord: Fix for a memory leak in keychord.
  ANDROID: keychord: Fix races in keychord_write.
  Use %zu to print resid (size_t).
  ANDROID: keychord: Fix a slab out-of-bounds read.
  Linux 4.4.81
  workqueue: implicit ordered attribute should be overridable
  net: account for current skb length when deciding about UFO
  ipv4: Should use consistent conditional judgement for ip fragment in __ip_append_data and ip_finish_output
  mm: don't dereference struct page fields of invalid pages
  signal: protect SIGNAL_UNKILLABLE from unintentional clearing.
  lib/Kconfig.debug: fix frv build failure
  mm, slab: make sure that KMALLOC_MAX_SIZE will fit into MAX_ORDER
  ARM: 8632/1: ftrace: fix syscall name matching
  virtio_blk: fix panic in initialization error path
  drm/virtio: fix framebuffer sparse warning
  scsi: qla2xxx: Get mutex lock before checking optrom_state
  phy state machine: failsafe leave invalid RUNNING state
  x86/boot: Add missing declaration of string functions
  tg3: Fix race condition in tg3_get_stats64().
  net: phy: dp83867: fix irq generation
  sh_eth: R8A7740 supports packet shecksumming
  wext: handle NULL extra data in iwe_stream_add_point better
  sparc64: Measure receiver forward progress to avoid send mondo timeout
  xen-netback: correctly schedule rate-limited queues
  net: phy: Fix PHY unbind crash
  net: phy: Correctly process PHY_HALTED in phy_stop_machine()
  net/mlx5: Fix command bad flow on command entry allocation failure
  sctp: fix the check for _sctp_walk_params and _sctp_walk_errors
  sctp: don't dereference ptr before leaving _sctp_walk_{params, errors}()
  dccp: fix a memleak for dccp_feat_init err process
  dccp: fix a memleak that dccp_ipv4 doesn't put reqsk properly
  dccp: fix a memleak that dccp_ipv6 doesn't put reqsk properly
  net: ethernet: nb8800: Handle all 4 RGMII modes identically
  ipv6: Don't increase IPSTATS_MIB_FRAGFAILS twice in ip6_fragment()
  packet: fix use-after-free in prb_retire_rx_blk_timer_expired()
  openvswitch: fix potential out of bound access in parse_ct
  mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled
  rtnetlink: allocate more memory for dev_set_mac_address()
  ipv4: initialize fib_trie prior to register_netdev_notifier call.
  ipv6: avoid overflow of offset in ip6_find_1stfragopt
  net: Zero terminate ifr_name in dev_ifname().
  ipv4: ipv6: initialize treq->txhash in cookie_v[46]_check()
  saa7164: fix double fetch PCIe access condition
  drm: rcar-du: fix backport bug
  f2fs: sanity check checkpoint segno and blkoff
  media: lirc: LIRC_GET_REC_RESOLUTION should return microseconds
  mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries
  iser-target: Avoid isert_conn->cm_id dereference in isert_login_recv_done
  iscsi-target: Fix delayed logout processing greater than SECONDS_FOR_LOGOUT_COMP
  iscsi-target: Fix initial login PDU asynchronous socket close OOPs
  iscsi-target: Fix early sk_data_ready LOGIN_FLAGS_READY race
  iscsi-target: Always wait for kthread_should_stop() before kthread exit
  target: Avoid mappedlun symlink creation during lun shutdown
  media: platform: davinci: return -EINVAL for VPFE_CMD_S_CCDC_RAW_PARAMS ioctl
  ARM: dts: armada-38x: Fix irq type for pca955
  ext4: fix overflow caused by missing cast in ext4_resize_fs()
  ext4: fix SEEK_HOLE/SEEK_DATA for blocksize < pagesize
  mm/page_alloc: Remove kernel address exposure in free_reserved_area()
  KVM: async_pf: make rcu irq exit if not triggered from idle task
  ASoC: do not close shared backend dailink
  ALSA: hda - Fix speaker output from VAIO VPCL14M1R
  workqueue: restore WQ_UNBOUND/max_active==1 to be ordered
  libata: array underflow in ata_find_dev()
  ANDROID: binder: don't queue async transactions to thread.
  ANDROID: binder: don't enqueue death notifications to thread todo.
  ANDROID: binder: call poll_wait() unconditionally.
  android: configs: move quota-related configs to recommended
  BACKPORT: arm64: split thread_info from task stack
  UPSTREAM: arm64: assembler: introduce ldr_this_cpu
  UPSTREAM: arm64: make cpu number a percpu variable
  UPSTREAM: arm64: smp: prepare for smp_processor_id() rework
  BACKPORT: arm64: move sp_el0 and tpidr_el1 into cpu_suspend_ctx
  UPSTREAM: arm64: prep stack walkers for THREAD_INFO_IN_TASK
  UPSTREAM: arm64: unexport walk_stackframe
  UPSTREAM: arm64: traps: simplify die() and __die()
  UPSTREAM: arm64: factor out current_stack_pointer
  BACKPORT: arm64: asm-offsets: remove unused definitions
  UPSTREAM: arm64: thread_info remove stale items
  UPSTREAM: thread_info: include <current.h> for THREAD_INFO_IN_TASK
  UPSTREAM: thread_info: factor out restart_block
  UPSTREAM: kthread: Pin the stack via try_get_task_stack()/put_task_stack() in to_live_kthread() function
  UPSTREAM: sched/core: Add try_get_task_stack() and put_task_stack()
  UPSTREAM: sched/core: Allow putting thread_info into task_struct
  UPSTREAM: printk: when dumping regs, show the stack, not thread_info
  UPSTREAM: fix up initial thread stack pointer vs thread_info confusion
  UPSTREAM: Clarify naming of thread info/stack allocators
  ANDROID: sdcardfs: override credential for ioctl to lower fs

Conflicts:
	android/configs/android-base.cfg
	arch/arm64/Kconfig
	arch/arm64/include/asm/suspend.h
	arch/arm64/kernel/head.S
	arch/arm64/kernel/smp.c
	arch/arm64/kernel/suspend.c
	arch/arm64/kernel/traps.c
	arch/arm64/mm/proc.S
	kernel/fork.c
	sound/soc/soc-pcm.c

Change-Id: I273e216c94899a838bbd208391c6cbe20b2bf683
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2017-09-01 11:47:49 -07:00
Zhiqiang Tu
c140ef0eee Merge branch 'dev/msm-4.4-8996au' into msm-4.4
Change-Id: I9736089c23ce5dca4e4341406671269f19b7515f
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-09-01 10:30:44 +08:00
Kuninori Morimoto
4ec0b2c2d2 ASoC: rsnd: don't call update callback if it was NULL
commit d7289565483c65094d0473555625a4acd89567d3 upstream.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-30 10:19:28 +02:00
Kuninori Morimoto
95fc5ef854 ASoC: rsnd: ssi: 24bit data needs right-aligned settings
commit f46a93b820eb3707faf238cd769a004e2504515f upstream.

Data left/right aligned is controlled by PDTA bit on SSICR.
But default is left-aligned. Thus 24bit sound will be very small sound
without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-30 10:19:28 +02:00
Geert Uytterhoeven
fd504621fa ASoC: rsnd: Add missing initialization of ADG req_rate
commit 8b27418f300cafbdbbb8cfa9c29d398ed34d6723 upstream.

If the "clock-frequency" DT property is not found, req_rate is used
uninitialized, and the "audio_clkout" clock will be created with an
arbitrary clock rate.

This uninitialized kernel stack data may leak to userspace through
/sys/kernel/debug/clk/clk_summary, cfr. the value in the "rate" column:

       clock     enable_cnt  prepare_cnt        rate   accuracy   phase
    --------------------------------------------------------------------
     audio_clkout         0            0  4001836240          0 0

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-30 10:19:28 +02:00
Kuninori Morimoto
e974777b2e ASoC: rsnd: avoid pointless loop in rsnd_mod_interrupt()
commit 2daf71ad8da6cb57f919c9c876ee7e42530371df upstream.

Current Renesas sound driver doesn't have 1:1 relationship between
stream <-> mod because it is supporting MIX. Because of this reason
rsnd_mod_interrupt() is searching correspond mod by for loop.
But this loop is not needed, because each mod has own type.
This patch avoid pointless loop by using mod->type.

This patch is good for SSI-parent support, because stream might have
2 SSI as SSI-parent/child. SSI interrupt handler will be called twice
if stream has SSI-parent without this patch.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-30 10:19:28 +02:00
Kuninori Morimoto
fdc568a422 ASoC: rsnd: disable SRC.out only when stop timing
commit b761bf272bce6dff4d8a7ccf4385c9f3d4018094 upstream.

Because SRC is connected to DMA and DMA want to keep dreq when stop
timing. This patch makes SRC stop SRC.out only when stop timing. And
it stops both SRC.out/SRC.in when quit timing

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-30 10:19:27 +02:00
Aaro Koskinen
bfba69dc30 ASoC: simple-card: don't fail if sysclk setting is not supported
commit ee43a1a0cd2a8f33cddfa1323a60b5cfcf865ba0 upstream.

Commit e22579713a ("ASoC: simple card: set cpu-dai sysclk
with mclk-fs") added sysclk / SND_SOC_CLOCK_OUT setting, that makes
asoc_simple_card_hw_params fail if the operation is not supported,
although the intention clearly was to ignore ENOTSUPP. Fix it.

The patch fixes audio playback on Kirkwood / OpenRD client,
where the following errors are seen:

	asoc-simple-card sound: ASoC: machine hw_params failed: -524
	alsa-lib: /alsa-lib-1.0.28/src/pcm/pcm_hw.c:327:(snd_pcm_hw_hw_params) SNDRV_PCM_IOCTL_HW_PARAMS failed (-524): Unknown error 524

Fixes: e22579713a ("ASoC: simple card: set cpu-dai sysclk with mclk-fs")
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Thong Ho <thong.ho.px@rvc.renesas.com>
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-30 10:19:27 +02:00
Takashi Iwai
6b1c81dd7f ALSA: hda - Add stereo mic quirk for Lenovo G50-70 (17aa:3978)
commit bbba6f9d3da357bbabc6fda81e99ff5584500e76 upstream.

Lenovo G50-70 (17aa:3978) with Conexant codec chip requires the
similar workaround for the inverted stereo dmic like other Lenovo
models.

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1020657
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-30 10:19:22 +02:00
Takashi Iwai
099e57fcb0 ALSA: core: Fix unexpected error at replacing user TLV
commit 88c54cdf61f508ebcf8da2d819f5dfc03e954d1d upstream.

When user tries to replace the user-defined control TLV, the kernel
checks the change of its content via memcmp().  The problem is that
the kernel passes the return value from memcmp() as is.  memcmp()
gives a non-zero negative value depending on the comparison result,
and this shall be recognized as an error code.

The patch covers that corner-case, return 1 properly for the changed
TLV.

Fixes: 8aa9b586e4 ("[ALSA] Control API - more robust TLV implementation")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-30 10:19:22 +02:00
Linux Build Service Account
318fe3ca8b Merge "ASoC: remove error prints and warning at bootup log" 2017-08-29 21:19:23 -07:00
Vatsal Bucha
7a068e6f02 ASoC: wsa881x: Fix wsa881x speaker damage
wsa881x speaker damage has been reported due to DC at
wsa output. Add a register setting which will reset
the soundwire when there are any
DC or synchronization issues.

CRs-Fixed: 2086505
Change-Id: I929d2eb7d096005e5089f3bfabded6901d81439e
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2017-08-27 23:41:04 -07:00
Takashi Iwai
669c8ab896 ALSA: usb-audio: Add mute TLV for playback volumes on C-Media devices
commit 0f174b3525a43bd51f9397394763925e0ebe7bc7 upstream.

C-Media devices (at least some models) mute the playback stream when
volumes are set to the minimum value.  But this isn't informed via TLV
and the user-space, typically PulseAudio, gets confused as if it's
still played in a low volume.

This patch adds the new flag, min_mute, to struct usb_mixer_elem_info
for indicating that the mixer element is with the minimum-mute volume.
This flag is set for known C-Media devices in
snd_usb_mixer_fu_apply_quirk() in turn.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=196669
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-24 17:02:35 -07:00
Takashi Iwai
f600f9c433 ALSA: usb-audio: Apply sample rate quirk to Sennheiser headset
commit a8e800fe0f68bc28ce309914f47e432742b865ed upstream.

A Senheisser headset requires the typical sample-rate quirk for
avoiding spurious errors from inquiring the current sample rate like:
 usb 1-1: 2:1: cannot get freq at ep 0x4
 usb 1-1: 3:1: cannot get freq at ep 0x83

The USB ID 1395:740a has to be added to the entries in
snd_usb_get_sample_rate_quirk().

Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1052580
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-24 17:02:35 -07:00
Daniel Mentz
735aa043bf ALSA: seq: 2nd attempt at fixing race creating a queue
commit 7e1d90f60a0d501c8503e636942ca704a454d910 upstream.

commit 4842e98f26dd80be3623c4714a244ba52ea096a8 ("ALSA: seq: Fix race at
creating a queue") attempted to fix a race reported by syzkaller. That
fix has been described as follows:

"
When a sequencer queue is created in snd_seq_queue_alloc(),it adds the
new queue element to the public list before referencing it.  Thus the
queue might be deleted before the call of snd_seq_queue_use(), and it
results in the use-after-free error, as spotted by syzkaller.

The fix is to reference the queue object at the right time.
"

Even with that fix in place, syzkaller reported a use-after-free error.
It specifically pointed to the last instruction "return q->queue" in
snd_seq_queue_alloc(). The pointer q is being used after kfree() has
been called on it.

It turned out that there is still a small window where a race can
happen. The window opens at
snd_seq_ioctl_create_queue()->snd_seq_queue_alloc()->queue_list_add()
and closes at
snd_seq_ioctl_create_queue()->queueptr()->snd_use_lock_use(). Between
these two calls, a different thread could delete the queue and possibly
re-create a different queue in the same location in queue_list.

This change prevents this situation by calling snd_use_lock_use() from
snd_seq_queue_alloc() prior to calling queue_list_add(). It is then the
caller's responsibility to call snd_use_lock_free(&q->use_lock).

Fixes: 4842e98f26dd ("ALSA: seq: Fix race at creating a queue")
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Daniel Mentz <danielmentz@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-08-24 17:02:35 -07:00
Linux Build Service Account
bbc14406b1 Merge "ASoC: msm: qdsp6v2: Implement downmix control support for compr driver" 2017-08-24 06:13:58 -07:00
Zhiqiang Tu
9df1d44946 Merge branch 'msm-4.4' into dev/msm-4.4-8996au
Conflicts:
	drivers/iommu/arm-smmu.c
	drivers/media/platform/msm/ais/fd/msm_fd_dev.c
	drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.c
	drivers/soc/qcom/glink.c
	include/uapi/linux/msm_ipa.h

Change-Id: Id007a850fa2df09f08c413ffcd447a6532fad83c
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2017-08-24 16:39:56 +08:00
Linux Build Service Account
f61a791dc1 Merge "ASoC: msm: qdspv2: add an API to destroy ion client" 2017-08-23 20:24:47 -07:00
Varun Balaraj
e453c121c5 ASoC: msm: qdsp6v2: Implement downmix control support for compr driver
Add support for downmix mixer control for multi channel primary and
interactive for a stereo device concurrent use case in which
primary is expected to be downmix accordingly mix matrix coefficientsw.

Change-Id: I8d6e72cdac1eea6cdfbc9922e484abaeb36021db
CRs-Fixed: 2093120
Signed-off-by: Varun Balaraj <varunb@codeaurora.org>
2017-08-22 21:30:53 -07:00
Meng Wang
214496cb3d ASoC: core: Fix possible NULL pointer dereference
When SSR is triggered when the system does not have a sound card
registered, but has codecs. The pointer card sent from codec driver
to snd_soc_card_change_online_state is NULL. Add null check for soc_card
before dereferencing.

Change-Id: I23342a6cbd9d53e62b2ea11dfe79aad3759df6f0
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2017-08-21 23:05:03 -07:00
Linux Build Service Account
afd2fd3441 Merge "ASoC: msm: qdsp6v2: Do not reset backend pass-through mode" 2017-08-21 12:16:35 -07:00
Vidyakumar Athota
e4faef1e35 ASoC: msm: qdspv2: add an API to destroy ion client
Currently ion fd is used to extract ion handle to free ion client.
ION FD is not valid if user-space application is crashed so ion handle
is returned to the client during msm_audio_ion_phys_assign() API which
is used to destroy ion client in msm_audio_ion_phys_free() API.

Change-Id: Idcc4ca838741aac26662a679117af9d9c935e630
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
2017-08-21 10:56:56 -07:00
Sergey Dolgov
9dbcd8c1c9 SoC: msm: change the MAX value of "App Type Config" kcontrol
Max value 0xFFFFFFFF in int type will be changed to negative
value in alsa library, change it to positive max value.

Change-Id: I3bb9e0dad4ffffb00c8dade27c0a715c890e8523
CRs-Fixed: 2087136
Signed-off-by: Erin Yan <xinyey@codeaurora.org>
2017-08-21 02:27:05 -07:00
Linux Build Service Account
468ba7b8f9 Merge "Merge android-4.4@9f764bb (v4.4.80) into msm-4.4" 2017-08-21 00:20:14 -07:00
Linux Build Service Account
1067bf088e Merge "ASoC: wcd-dsp-mgr: fix race during subsystem restart" 2017-08-21 00:20:00 -07:00
Linux Build Service Account
6afe3a8c3b Merge "ASoc: wcd934x-dsp-cntl: notify online event after clocks are disabled" 2017-08-21 00:19:59 -07:00
Manish Dewangan
aa91dc149f ASoC: msm: qdsp6v2: Do not reset backend pass-through mode
Backend pass-through mode is reset to LEGACY_PCM during routing close.
This results in opening of adm with non pass-through path type for
pass-through session if device switch is done during pass-through
session.
Fix this by avoid resetting Backend passthrough-mode.

Change-Id: Ia1ea10ce68ba04a72416827661b6fdc2abd48b3c
Signed-off-by: Manish Dewangan <manish@codeaurora.org>
2017-08-20 21:05:13 -07:00
Linux Build Service Account
4c73d9ccde Merge changes I914c68a9,I2003e40c into msm-4.4
* changes:
  ASoC: msm: qdsp6v2: latency mode support for transcode loopback
  ASoC: msm: volume control support for DSP transcode loopback
2017-08-20 01:17:41 -07:00
Linux Build Service Account
d7d541d471 Merge changes I144bd8ad,Ic73cbec2 into msm-4.4
* changes:
  ASoC: msm: Quat MI2S capture dai update for 88.2 and 176.4 Khz rates
  ASoC: msm8998: Add 88.2 and 176.4 khz support for MI2S Interface
2017-08-20 01:17:30 -07:00
Linux Build Service Account
0f9dd1be13 Merge "ASoC: msm: Fix pan control param gain to accommodate Q28 format" into msm-4.4 2017-08-20 01:17:14 -07:00
Yonghui Zhang
4f13f491be Asoc: msm: add configuration for virtual platform
add depends on MSM_GVM_QUIN for SND_SOC_MSM8996
and remove SND_SOC_MSM_HDMI_CODEC_RX for virtual platform

CRs-Fixed: 2085351
Change-Id: I1e911ffa5b34d69c9286f22d7b2c001a065cbfc1
Signed-off-by: Yonghui Zhang <yonghuiz@codeaurora.org>
2017-08-17 19:00:39 -07:00
Varun Balaraj
a935e0c8f8 ASoC: msm: Fix pan control param gain to accommodate Q28 format
Fix pan control gain param to accommodate Q28 format.
Convert 32bit gain to be inlined with 16bit mixer coefficients
of ADSP.

Change-Id: I85ebd11c49b4af982f34091937acabb9e6580e8f
Signed-off-by: Varun Balaraj <varunb@codeaurora.org>
2017-08-17 09:32:42 -07:00
Laxminath Kasam
7ef94d84d5 ASoC: remove error prints and warning at bootup log
Cleanup for errors and warning print in audio drivers.

CRs-Fixed: 2080345
Change-Id: I78cd9aaffe38d59c1483f2029338f10d0bc8edac
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
2017-08-16 08:47:29 -07:00
Siddartha Shaik
97390bee20 ASoC: msm: qdsp6v2: latency mode support for transcode loopback
Add metadata to configure latency mode for DSP transcode
loopback to set legacy or low latency path. Userspace API
introduced to configure the same.

CRs-Fixed: 2092562
Change-Id: I914c68a9e9d8647530b72c42548e571b7508c423
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
2017-08-16 21:03:23 +05:30
Siddartha Shaik
dd32d9226c ASoC: msm: volume control support for DSP transcode loopback
Add stream volume control support for DSP transcode
loopback to support mute configuration requirement.

CRs-Fixed: 2092562
Change-Id: I2003e40c9888245c1b12f0e7fbd364170d5008cf
Signed-off-by: Siddartha Shaik <sshaik@codeaurora.org>
2017-08-16 21:03:23 +05:30