Commit graph

25474 commits

Author SHA1 Message Date
Linux Build Service Account
9b81f1aebb Merge "ASoC: msm: qdsp6v2: Fix AFE RTC set parameter" 2018-06-21 04:04:05 -07:00
Linux Build Service Account
726eec8d0e Merge "sdm660-internal: Fix DMIC3&4 mute in voice call during APSS sleep" 2018-06-21 04:04:04 -07:00
Aditya Bavanari
e4f474eb8e ASoC: msm: qdsp6v2: Fix AFE RTC set parameter
Fix offset address to use set parameter structure while
copying data from user instead of get parameter structure
for AFE_PORT_CMD_SET_PARAM_V3 case.

CRs-Fixed: 2256728
Change-Id: I61e41f366f365734a47080b79179fbe3021ee8a7
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
2018-06-19 19:01:12 +05:30
Vatsal Bucha
f57e402a5a sdm660-internal: Fix DMIC3&4 mute in voice call during APSS sleep
Add ignore sleep for DMIC 3 and 4 to fix mute in voice call.

CRs-Fixed: 2258957
Change-Id: Ia33aec6796e965080a978d3e158d78ae03f9b717
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-06-19 05:15:02 -07:00
Soumya Managoli
586a6ad358 asoc: codecs: sdm660_cdc: Fix LPASS register access during SSR
When AFE returns failure in setting the digital codec
core clock during SSR, it leads to LPASS register access
which results in NOC error and AHB timeout. Put the regmap
in cache only mode when clock enable fails to fix this.

Also fix watchdog bite failure during stability run
by returning from digclock control if cacheonly mode
is set. This is seen while SSR is in progress and teardown
of session happens, it will request for afe clock enable
continuously at digital clock control.

Change-Id: I952b667a5cffcb667154378102609b23ab0cee3d
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2018-06-18 22:29:38 -07:00
Srinivasa Rao Kuppala
2763b994a1 sound: rawmidi: Move spinlock under realloc_mutex
A merge conflict resolution of commit e57f781805f0 ("ANDROID: sound:
rawmidi: Hold lock around realloc") placed a realloc_mutex lock
inside of a runtime->lock irq spinlock. The mutex lock has to
encompass the spinlock to avoid attempts to sleep in an invalid
context.

Change-Id: I29723c5623db3b7145644f941ccc5226e3764f08
Signed-off-by: Srinivasa Rao Kuppala <srkupp@codeaurora.org>
2018-06-18 03:42:54 -07:00
Linux Build Service Account
51b2f06de2 Merge "ASoC: msm: qdsp6v2: add lsm support for tdm ports" 2018-06-15 03:06:20 -07:00
Linux Build Service Account
f8c3bac9ce Merge "ASoC: msm: qdsp6v2: Rx DTMF detection via voice stream callback" 2018-06-15 03:06:19 -07:00
Vatsal Bucha
b9e306af63 ASoC: qdsp6v2: Fix null pointer dereference for prtd pointer
Private data pointer may not be initialized before
access it in adsp_stream_cmd_put. NULL check for prtd
avoids the issue.

CRs-Fixed: 2252497
Change-Id: Ibd888be601d5b42ed4f4644ed22596a26b61f8fe
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
2018-06-13 22:59:54 -07:00
Timothy Sham
fe515e9936 ASoC: msm: qdsp6v2: Rx DTMF detection via voice stream callback
Allow msm-pcm-voice-v2 driver to enable Rx DTMF detection and
route the DTMF detection event from QDSP6 to a registered
mixer event callback.

Change-Id: I9ffb714d1ec5dd0f4e2c229830d7170324b295bb
Signed-off-by: Timothy Sham <tsham@codeaurora.org>
2018-06-12 14:00:49 -04:00
Derek Chen
e049020258 ASoC: msm: qdsp6v2: add lsm support for tdm ports
Add LSM routing and kcontrol support for TDM
backend ports.

Change-Id: Ie6d05691a3e763fe1b7f37dd86415091f7da0e6d
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2018-06-08 15:10:11 -07:00
Linux Build Service Account
ebae906ccd Merge "q6asm: retry asm open in case of session id conflict" 2018-06-08 10:20:25 -07:00
Linux Build Service Account
51c5c162c1 Merge "ASoC: msm: Add mixer controls for module enabling" 2018-06-05 20:30:51 -07:00
Han Lu
53c8faf4dc q6asm: retry asm open in case of session id conflict
The ADSP asm session ids are managed by the kernel driver. It's all right
for native use cases. But for virtualization use cases, there's no way to
synchronize the session ids' status among virtual machines.  Playing back
in one virtual machine is probably failed, because the session id may had
been occupied by a use case in another virtual machine.

The patch allowed audio playback stream to try all available session ids
in case of session id conflict error, to support concurrent playback from
multiple virtual machines.

Change-Id: If98d05898cec3f05d80c750ec8a014add3b1f34c
Signed-off-by: Han Lu <hanlu@codeaurora.org>
2018-06-04 00:32:36 -07:00
Linux Build Service Account
fd95dadf54 Merge "Merge android-4.4.133 (3f51ea2) into msm-4.4" 2018-06-02 01:13:34 -07:00
Srinivasarao P
9848856fe1 Merge android-4.4.133 (3f51ea2) into msm-4.4
* refs/heads/tmp-3f51ea2
  Linux 4.4.133
  x86/kexec: Avoid double free_page() upon do_kexec_load() failure
  hfsplus: stop workqueue when fill_super() failed
  cfg80211: limit wiphy names to 128 bytes
  gpio: rcar: Add Runtime PM handling for interrupts
  time: Fix CLOCK_MONOTONIC_RAW sub-nanosecond accounting
  dmaengine: ensure dmaengine helpers check valid callback
  scsi: zfcp: fix infinite iteration on ERP ready list
  scsi: sg: allocate with __GFP_ZERO in sg_build_indirect()
  scsi: libsas: defer ata device eh commands to libata
  s390: use expoline thunks in the BPF JIT
  s390: extend expoline to BC instructions
  s390: move spectre sysfs attribute code
  s390/kernel: use expoline for indirect branches
  s390/lib: use expoline for indirect branches
  s390: move expoline assembler macros to a header
  s390: add assembler macros for CPU alternatives
  ext2: fix a block leak
  tcp: purge write queue in tcp_connect_init()
  sock_diag: fix use-after-free read in __sk_free
  packet: in packet_snd start writing at link layer allocation
  net: test tailroom before appending to linear skb
  btrfs: fix reading stale metadata blocks after degraded raid1 mounts
  btrfs: fix crash when trying to resume balance without the resume flag
  Btrfs: fix xattr loss after power failure
  ARM: 8772/1: kprobes: Prohibit kprobes on get_user functions
  ARM: 8770/1: kprobes: Prohibit probing on optimized_callback
  ARM: 8769/1: kprobes: Fix to use get_kprobe_ctlblk after irq-disabed
  tick/broadcast: Use for_each_cpu() specially on UP kernels
  ARM: 8771/1: kprobes: Prohibit kprobes on do_undefinstr
  efi: Avoid potential crashes, fix the 'struct efi_pci_io_protocol_32' definition for mixed mode
  s390: remove indirect branch from do_softirq_own_stack
  s390/qdio: don't release memory in qdio_setup_irq()
  s390/cpum_sf: ensure sample frequency of perf event attributes is non-zero
  s390/qdio: fix access to uninitialized qdio_q fields
  mm: don't allow deferred pages with NEED_PER_CPU_KM
  powerpc/powernv: Fix NVRAM sleep in invalid context when crashing
  procfs: fix pthread cross-thread naming if !PR_DUMPABLE
  proc read mm's {arg,env}_{start,end} with mmap semaphore taken.
  tracing/x86/xen: Remove zero data size trace events trace_xen_mmu_flush_tlb{_all}
  cpufreq: intel_pstate: Enable HWP by default
  signals: avoid unnecessary taking of sighand->siglock
  mm: filemap: avoid unnecessary calls to lock_page when waiting for IO to complete during a read
  mm: filemap: remove redundant code in do_read_cache_page
  proc: meminfo: estimate available memory more conservatively
  vmscan: do not force-scan file lru if its absolute size is small
  powerpc: Don't preempt_disable() in show_cpuinfo()
  cpuidle: coupled: remove unused define cpuidle_coupled_lock
  powerpc/powernv: remove FW_FEATURE_OPALv3 and just use FW_FEATURE_OPAL
  powerpc/powernv: Remove OPALv2 firmware define and references
  powerpc/powernv: panic() on OPAL < V3
  spi: pxa2xx: Allow 64-bit DMA
  ALSA: control: fix a redundant-copy issue
  ALSA: hda: Add Lenovo C50 All in one to the power_save blacklist
  ALSA: usb: mixer: volume quirk for CM102-A+/102S+
  usbip: usbip_host: fix bad unlock balance during stub_probe()
  usbip: usbip_host: fix NULL-ptr deref and use-after-free errors
  usbip: usbip_host: run rebind from exit when module is removed
  usbip: usbip_host: delete device from busid_table after rebind
  usbip: usbip_host: refine probe and disconnect debug msgs to be useful
  kernel/exit.c: avoid undefined behaviour when calling wait4()
  futex: futex_wake_op, fix sign_extend32 sign bits
  pipe: cap initial pipe capacity according to pipe-max-size limit
  l2tp: revert "l2tp: fix missing print session offset info"
  Revert "ARM: dts: imx6qdl-wandboard: Fix audio channel swap"
  lockd: lost rollback of set_grace_period() in lockd_down_net()
  xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM)
  futex: Remove duplicated code and fix undefined behaviour
  futex: Remove unnecessary warning from get_futex_key
  arm64: Add work around for Arm Cortex-A55 Erratum 1024718
  arm64: introduce mov_q macro to move a constant into a 64-bit register
  audit: move calcs after alloc and check when logging set loginuid
  ALSA: timer: Call notifier in the same spinlock
  sctp: delay the authentication for the duplicated cookie-echo chunk
  sctp: fix the issue that the cookie-ack with auth can't get processed
  tcp: ignore Fast Open on repair mode
  bonding: do not allow rlb updates to invalid mac
  tg3: Fix vunmap() BUG_ON() triggered from tg3_free_consistent().
  sctp: use the old asoc when making the cookie-ack chunk in dupcook_d
  sctp: handle two v4 addrs comparison in sctp_inet6_cmp_addr
  r8169: fix powering up RTL8168h
  qmi_wwan: do not steal interfaces from class drivers
  openvswitch: Don't swap table in nlattr_set() after OVS_ATTR_NESTED is found
  net: support compat 64-bit time in {s,g}etsockopt
  net_sched: fq: take care of throttled flows before reuse
  net/mlx4_en: Verify coalescing parameters are in range
  net: ethernet: sun: niu set correct packet size in skb
  llc: better deal with too small mtu
  ipv4: fix memory leaks in udp_sendmsg, ping_v4_sendmsg
  dccp: fix tasklet usage
  bridge: check iface upper dev when setting master via ioctl
  8139too: Use disable_irq_nosync() in rtl8139_poll_controller()
  BACKPORT, FROMLIST: fscrypt: add Speck128/256 support
  cgroup: Disable IRQs while holding css_set_lock
  Revert "cgroup: Disable IRQs while holding css_set_lock"
  cgroup: Disable IRQs while holding css_set_lock
  ANDROID: proc: fix undefined behavior in proc_uid_base_readdir
  x86: vdso: Fix leaky vdso linker with CC=clang.
  ANDROID: build: cuttlefish: Upgrade clang to newer version.
  ANDROID: build: cuttlefish: Upgrade clang to newer version.
  ANDROID: build: cuttlefish: Fix path to clang.
  UPSTREAM: dm bufio: avoid sleeping while holding the dm_bufio lock
  ANDROID: sdcardfs: Don't d_drop in d_revalidate

Conflicts:
	arch/arm64/include/asm/cputype.h
	fs/ext4/crypto.c
	fs/ext4/ext4.h
	kernel/cgroup.c
	mm/vmscan.c

Change-Id: Ic10c5722b6439af1cf423fd949c493f786764d7e
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-05-31 12:28:38 +05:30
Linux Build Service Account
addd4dab16 Merge "ASoC: msm: add boot marker for mi2s and auto sound card" 2018-05-29 05:07:37 -07:00
Rahul Sharma
e01d6aedaa ASoC: msm: Add mixer controls for module enabling
Mixer controls are added to enable or disable
ADSP modules.

Change-Id: Ia2471c3fc25429001ccf19d6b30d34d6e2cf9d27
Signed-off-by: Rahul Sharma <rahsha@codeaurora.org>
2018-05-27 16:24:45 +05:30
Linux Build Service Account
7879aadfcc Merge "asoc: msm8998: Add configuration for adaptive bitrate." 2018-05-26 13:26:51 -07:00
Wenwen Wang
59e3b28998 ALSA: control: fix a redundant-copy issue
commit 3f12888dfae2a48741c4caa9214885b3aaf350f9 upstream.

In snd_ctl_elem_add_compat(), the fields of the struct 'data' need to be
copied from the corresponding fields of the struct 'data32' in userspace.
This is achieved by invoking copy_from_user() and get_user() functions. The
problem here is that the 'type' field is copied twice. One is by
copy_from_user() and one is by get_user(). Given that the 'type' field is
not used between the two copies, the second copy is *completely* redundant
and should be removed for better performance and cleanup. Also, these two
copies can cause inconsistent data: as the struct 'data32' resides in
userspace and a malicious userspace process can race to change the 'type'
field between the two copies to cause inconsistent data. Depending on how
the data is used in the future, such an inconsistency may cause potential
security risks.

For above reasons, we should take out the second copy.

Signed-off-by: Wenwen Wang <wang6495@umn.edu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-26 08:48:52 +02:00
Hans de Goede
1b406c0d49 ALSA: hda: Add Lenovo C50 All in one to the power_save blacklist
commit c8beccc19b92f5172994c0732db689c08f4f98e5 upstream.

Power-saving is causing loud plops on the Lenovo C50 All in one, add it
to the blacklist.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1572975
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-26 08:48:52 +02:00
Federico Cuello
2444bdbebc ALSA: usb: mixer: volume quirk for CM102-A+/102S+
commit 21493316a3c4598f308d5a9fa31cc74639c4caff upstream.

Currently it's not possible to set volume lower than 26% (it just mutes).

Also fixes this warning:

  Warning! Unlikely big volume range (=9472), cval->res is probably wrong.
  [13] FU [PCM Playback Volume] ch = 2, val = -9473/-1/1

, and volume works fine for full range.

Signed-off-by: Federico Cuello <fedux@fedux.com.ar>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-26 08:48:52 +02:00
Takashi Iwai
bea8a671ce ALSA: timer: Call notifier in the same spinlock
commit f65e0d299807d8a11812845c972493c3f9a18e10 upstream.

snd_timer_notify1() is called outside the spinlock and it retakes the
lock after the unlock.  This is rather racy, and it's safer to move
snd_timer_notify() call inside the main spinlock.

The patch also contains a slight refactoring / cleanup of the code.
Now all start/stop/continue/pause look more symmetric and a bit better
readable.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-26 08:48:49 +02:00
Linux Build Service Account
4df80cc49c Merge "Merge android-4.4.132 (46155cc) into msm-4.4" 2018-05-25 08:58:07 -07:00
Linux Build Service Account
45c4f7d22f Merge "ASoC: msm: Modify buf size check to prevent OOB error" 2018-05-24 02:46:45 -07:00
Soumya Managoli
fd819b7aa3 asoc: msm8998: Add configuration for adaptive bitrate.
Add hostless front end DAI to trigger backend
configuration of BT backend dai required for
configuring BT ABR statistics. Add mixer ctrls
to independently configure TX and RX sample
rates to allow BT RX and TX backends.

Change-Id: Iac3cd5317db2653a87f106d43cfc7fe90e4f4875
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2018-05-23 22:21:52 -07:00
Srinivasarao P
a0cf9875da Merge android-4.4.132 (46155cc) into msm-4.4
* refs/heads/tmp-46155cc
  Linux 4.4.132
  perf/x86: Fix possible Spectre-v1 indexing for x86_pmu::event_map()
  perf/core: Fix possible Spectre-v1 indexing for ->aux_pages[]
  perf/x86/msr: Fix possible Spectre-v1 indexing in the MSR driver
  perf/x86/cstate: Fix possible Spectre-v1 indexing for pkg_msr
  perf/x86: Fix possible Spectre-v1 indexing for hw_perf_event cache_*
  tracing/uprobe_event: Fix strncpy corner case
  Revert "Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174"
  atm: zatm: Fix potential Spectre v1
  net: atm: Fix potential Spectre v1
  can: kvaser_usb: Increase correct stats counter in kvaser_usb_rx_can_msg()
  tracing: Fix regex_match_front() to not over compare the test string
  libata: Apply NOLPM quirk for SanDisk SD7UB3Q*G1001 SSDs
  rfkill: gpio: fix memory leak in probe error path
  xfrm_user: fix return value from xfrm_user_rcv_msg
  f2fs: fix a dead loop in f2fs_fiemap()
  bdi: Fix oops in wb_workfn()
  tcp: fix TCP_REPAIR_QUEUE bound checking
  perf: Remove superfluous allocation error check
  soreuseport: initialise timewait reuseport field
  dccp: initialize ireq->ir_mark
  net: fix uninit-value in __hw_addr_add_ex()
  net: initialize skb->peeked when cloning
  net: fix rtnh_ok()
  netlink: fix uninit-value in netlink_sendmsg
  crypto: af_alg - fix possible uninit-value in alg_bind()
  ipvs: fix rtnl_lock lockups caused by start_sync_thread
  usb: musb: host: fix potential NULL pointer dereference
  USB: serial: option: adding support for ublox R410M
  USB: serial: option: reimplement interface masking
  USB: Accept bulk endpoints with 1024-byte maxpacket
  USB: serial: visor: handle potential invalid device configuration
  test_firmware: fix setting old custom fw path back on exit, second try
  drm/vmwgfx: Fix a buffer object leak
  IB/mlx5: Use unlimited rate when static rate is not supported
  NET: usb: qmi_wwan: add support for ublox R410M PID 0x90b2
  RDMA/mlx5: Protect from shift operand overflow
  RDMA/ucma: Allow resolving address w/o specifying source address
  xfs: prevent creating negative-sized file via INSERT_RANGE
  Input: atmel_mxt_ts - add touchpad button mapping for Samsung Chromebook Pro
  Input: leds - fix out of bound access
  tracepoint: Do not warn on ENOMEM
  ALSA: aloop: Add missing cable lock to ctl API callbacks
  ALSA: aloop: Mark paused device as inactive
  ALSA: seq: Fix races at MIDI encoding in snd_virmidi_output_trigger()
  ALSA: pcm: Check PCM state at xfern compat ioctl
  USB: serial: option: Add support for Quectel EP06
  gpmi-nand: Handle ECC Errors in erased pages
  ath10k: rebuild crypto header in rx data frames
  ath10k: fix rfc1042 header retrieval in QCA4019 with eth decap mode
  mac80211: Add RX flag to indicate ICV stripped
  mac80211: allow same PN for AMSDU sub-frames
  mac80211: allow not sending MIC up from driver for HW crypto
  percpu: include linux/sched.h for cond_resched()
  KVM: s390: Enable all facility bits that are known good for passthrough
  bpf: map_get_next_key to return first key on NULL
  perf/core: Fix the perf_cpu_time_max_percent check
  goldfish: pipe: ANDROID: mark local functions static
  Revert "goldfish: pipe: ANDROID: Allocate memory with GFP_KERNEL."
  UPSTREAM: ANDROID: binder: prevent transactions into own process.
  goldfish: pipe: ANDROID: Add DMA support
  UPSTREAM: f2fs: clear PageError on writepage - part 2
  UPSTREAM: f2fs: avoid fsync() failure caused by EAGAIN in writepage()
  ANDROID: build.config: enforce trace_printk check
  ANDROID: x86_64_cuttlefish_defconfig: Disable KPTI
  UPSTREAM: mac80211: ibss: Fix channel type enum in ieee80211_sta_join_ibss()
  UPSTREAM: mac80211: Fix clang warning about constant operand in logical operation
  UPSTREAM: nl80211: Fix enum type of variable in nl80211_put_sta_rate()
  UPSTREAM: sysfs: remove signedness from sysfs_get_dirent
  UPSTREAM: tracing: Use cpumask_available() to check if cpumask variable may be used
  BACKPORT: clocksource: Use GENMASK_ULL in definition of CLOCKSOURCE_MASK
  UPSTREAM: netpoll: Fix device name check in netpoll_setup()
  FROMLIST: staging: Fix sparse warnings in vsoc driver.
  FROMLIST: staging: vsoc: Fix a i386-randconfig warning.
  FROMLIST: staging: vsoc: Create wc kernel mapping for region shm.
  Revert "goldfish: pipe: ANDROID: remove a redundant target"
  goldfish: pipe: ANDROID: Replace writel with gf_write_ptr
  goldfish: pipe: ANDROID: Use dev_ logging instead of pr_
  goldfish: pipe: ANDROID: fix checkpatch warnings
  goldfish: pipe: ANDROID: Update module license

Conflicts:
	drivers/net/wireless/ath/ath10k/core.c
	drivers/net/wireless/ath/ath10k/core.h
	drivers/net/wireless/ath/ath10k/htt_rx.c

Change-Id: If2ede1dea6a07b3fd498724e83071fd547170e1c
[spathi@codeaurora.org: resolved compilation errors in ath10k
by rebuilding crypto header in rx data frames]
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2018-05-22 15:23:13 +05:30
Zhiqiang Tu
996c86f94e ASoC: msm: add boot marker for mi2s and auto sound card
Add boot marker for booting KPI measurement.

Change-Id: I58fac2a1bed4f9c4e484b3dadb6a766c260f3f06
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
2018-05-22 13:33:41 +08:00
Linux Build Service Account
1ff291a124 Merge "ASoC: msm: check payload size before memory allocation" 2018-05-20 19:31:51 -07:00
Linux Build Service Account
e1c2b1f918 Merge "ASoC: msm: qdsp6v2: return the proper LPASS status" 2018-05-20 19:31:50 -07:00
Linux Build Service Account
99a11f15e4 Merge "Revert "sound: usb: Provide controller number in QMI response"" 2018-05-17 03:38:26 -07:00
Linux Build Service Account
45df31e9af Merge "ASoC: msm: qdsp6v2: increase max Rx DTMF duration" 2018-05-16 10:28:44 -07:00
Takashi Iwai
f1a41d44f1 ALSA: aloop: Add missing cable lock to ctl API callbacks
commit 76b3421b39bd610546931fc923edcf90c18fa395 upstream.

Some control API callbacks in aloop driver are too lazy to take the
loopback->cable_lock and it results in possible races of cable access
while it's being freed.  It eventually lead to a UAF, as reported by
fuzzer recently.

This patch covers such control API callbacks and add the proper mutex
locks.

Reported-by: DaeRyong Jeong <threeearcat@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-16 10:06:47 +02:00
Robert Rosengren
b57d9d72de ALSA: aloop: Mark paused device as inactive
commit 306a4f3ca7f3c7dfa473ebd19d66e40e59d99734 upstream.

Show paused ALSA aloop device as inactive, i.e. the control
"PCM Slave Active" set as false. Notification sent upon state change.

This makes it possible for client capturing from aloop device to know if
data is expected. Without it the client expects data even if playback
is paused.

Signed-off-by: Robert Rosengren <robert.rosengren@axis.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-16 10:06:47 +02:00
Takashi Iwai
d348efbffb ALSA: seq: Fix races at MIDI encoding in snd_virmidi_output_trigger()
commit 8f22e52528cc372b218b5f100457469615c733ce upstream.

The sequencer virmidi code has an open race at its output trigger
callback: namely, virmidi keeps only one event packet for processing
while it doesn't protect for concurrent output trigger calls.

snd_virmidi_output_trigger() tries to process the previously
unfinished event before starting encoding the given MIDI stream, but
this is done without any lock.  Meanwhile, if another rawmidi stream
starts the output trigger, this proceeds further, and overwrites the
event package that is being processed in another thread.  This
eventually corrupts and may lead to the invalid memory access if the
event type is like SYSEX.

The fix is just to move the spinlock to cover both the pending event
and the new stream.

The bug was spotted by a new fuzzer, RaceFuzzer.

BugLink: http://lkml.kernel.org/r/20180426045223.GA15307@dragonet.kaist.ac.kr
Reported-by: DaeRyong Jeong <threeearcat@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-16 10:06:47 +02:00
Takashi Iwai
cc68c7b02f ALSA: pcm: Check PCM state at xfern compat ioctl
commit f13876e2c33a657a71bcbb10f767c0951b165020 upstream.

Since snd_pcm_ioctl_xfern_compat() has no PCM state check, it may go
further and hit the sanity check pcm_sanity_check() when the ioctl is
called right after open.  It may eventually spew a kernel warning, as
triggered by syzbot, depending on kconfig.

The lack of PCM state check there was just an oversight.  Although
it's no real crash, the spurious kernel warning is annoying, so let's
add the proper check.

Reported-by: syzbot+1dac3a4f6bc9c1c675d4@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-16 10:06:47 +02:00
Linux Build Service Account
8269990c6f Merge "Revert "sound: usb: Update QMI indication message"" 2018-05-16 00:29:09 -07:00
Xiaojun Sang
ad40ee7b44 ASoC: msm: check payload size before memory allocation
Buffer from mixer ctl or ADSP is composed of payload size and
actual payload. On a 32 bit platform, we could have an overflow
if payload size is below UINT_MAX while payload size + sizeof(struct)
is over UINT_MAX. Allocated memory size would be less than expected.
Check payload size against limit before memory allocation.

Change-Id: I0bf19ca7b8c93083177a21ad726122dc20f45551
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
2018-05-16 14:28:32 +08:00
Ajay Agarwal
c342078792 Revert "sound: usb: Provide controller number in QMI response"
This reverts commit 9730f9cdc0.

Remote entity does not require the controller number. Tunnel
mode audio will only work with the primary controller. Hence
remove support for providing controller num.

Change-Id: Ife8c0ca969334c57046a91bae428b5f89f9e0566
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-05-15 07:18:53 -07:00
Ajay Agarwal
74e61f1fd5 Revert "sound: usb: Pass device speed instead of dcba information"
This reverts commit 8177d0955d.

ADSP requires dcba memory information. Hence pass it from driver.

Change-Id: Ibaf120ba130a24329ef88c7755154e50ba3a7335
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-05-15 07:18:19 -07:00
Derek Chen
125ff102eb ASoC: msm: qdsp6v2: return the proper LPASS status
Allow the LPASS status check API to return
the proper status code.

CRs-fixed: 2126725
Change-Id: I6c34036ec30c7d4ce8aaefb70d19b04b211f7355
Signed-off-by: Derek Chen <chenche@codeaurora.org>
2018-05-14 17:28:59 -04:00
Soumya Managoli
1a9c85b25d asoc: sdm660: Add configuration for adaptive bitrate.
Add hostless front end DAI to trigger backend
configuration of BT backend dai required for
configuring BT ABR statistics. Add mixer ctrls
to independently configure TX and RX sample
rates to allow BT RX and TX backends.

Change-Id: I2370eccb10da666ecf267f2756b2efd66ecbf8f6
Signed-off-by: Soumya Managoli <smanag@codeaurora.org>
2018-05-14 05:04:45 -07:00
Linux Build Service Account
6e5dae3ae1 Merge "Merge android-4.4.131 (d5d6526) into msm-4.4" 2018-05-10 01:25:18 -07:00
Timothy Sham
6e3516ef4c ASoC: msm: qdsp6v2: increase max Rx DTMF duration
Increase the maximum value of the DTMF Rx Generate
mixer command and change the read to int16 to allow
for clients to be able to set '-1', infinite tone.

Change-Id: I44eed4712bb05a70b4464d9db38c348c131a3f61
Signed-off-by: Timothy Sham <tsham@codeaurora.org>
2018-05-08 14:27:20 -07:00
Linux Build Service Account
b4728dbe0e Merge "ASoC: msm: qdsp6v2 : Add AFE port validation for MULTICHAN_HDMI_RX" 2018-05-06 02:07:12 -07:00
Linux Build Service Account
86d96481ed Merge "ASoC: sdm660_cdc: Fix pop after PDR on SDM660 internal codec" 2018-05-06 02:07:11 -07:00
Linux Build Service Account
fb913f564f Merge "ASoC: msm: add TDM routing for DTMF driver and dtmf fe dai to apq8096" 2018-05-06 02:07:10 -07:00
Linux Build Service Account
5c49e73d6d Merge "ASoC: msm: qdsp6v2: enable DMA channel control" 2018-05-06 02:07:09 -07:00
Ajay Agarwal
7b2dab0613 Revert "sound: usb: Update QMI indication message"
This reverts commit 97097e7616.

Remote QMI client does not require controller number. Delete the
support from uaudio_disconnect_cb() to send usb core id. Also
remove USB_AUDIO_DEVICE_SPEED_SUPER_PLUS_V01 from speed enum.

Change-Id: Ie000a0497d714eab361a8c30d68289e2f5c884e8
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2018-05-05 09:33:29 +05:30
Timothy Sham
a98fd17446 ASoC: msm: add TDM routing for DTMF driver and dtmf fe dai to apq8096
Added DTMF mixer routing for QUAT_TDM_RX2 for automotive. Also added
the DTMF front-end dai to apq8096 driver.

Change-Id: I3652efd939774ff8cb7c40445747f0edbf6b3c7f
Signed-off-by: Timothy Sham <tsham@codeaurora.org>
2018-05-03 18:05:49 -04:00