This reverts commit ea5aa7a3fe.
The issue has been fixed properly in Idafc26a739df1831d04ea2fde4625e8f9ca1a0ae
Change-Id: I8275c11660af6cd03907970dea020897b66ceaa3
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
If the driver is not yet initialized, return EPROBE_DEFER to the
external driver trying to register a notification, so that we
don't miss any.
Change-Id: Idafc26a739df1831d04ea2fde4625e8f9ca1a0ae
Enable interrupt request only when the interrupt is
in disabled state.
Change-Id: I67795bf0ee344661e02b0fec3181cd7980d56652
Signed-off-by: Vignesh Kulothungan <vigneshk@codeaurora.org>
Update SOC_SINGLE_SX_TLV to SOC_SINGLE_S8_TLV to make codec
driver compatiable with upstream driver.
Change-Id: I4061b015d715978f3b294ad630f53b64bf66c2b7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
[dereference23: Backport to msm-4.14]
Signed-off-by: Alexander Winkowski <dereference23@outlook.com>
Avoid copy to user more than requested buffer size
to avoid memory corruption.
Change-Id: Ibf1607f777a358ebd16fd8b8728809afda34eba7
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
tinycap test can attempt with different size to
read from driver and need to avoid access more
than period size.
Change-Id: Ifa4ddfb086bd83aa981da62e88da3a9395f5aabc
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Sometimes during device switch in recording,
observe size 0 is return from DSP due to EOS
handling. For ALSA pcm_read to unblock, buffer
appl_ptr is elapsed without actually updating
the buffer. And userspace copies the stale
data(old buffer) causing issue sometimes.
Reset the buffer for that period_size in
such cases instead of transfer stale data.
Change-Id: I0d3ac133a8d95fad0710586e3e947410a41c9c5a
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Current logic copies user buf size of data
from the avail dsp buf at a given offset.
If this offset returned from DSP in READ_DONE event
goes out of bounds or is corrupted, then it can lead to
out of bounds DSP buffer access, resulting in memory fault.
Fix is to add check for this buf offset, if it is within
the buf size range.
Original-Change-Id: I7753cc6db394704dbb959477150141d42b836bef
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
Change-Id: I5c945b6570ccd348659b2e8ee889368e7f4f6f80
Add check for the max hpcm_buf_node size before copy to avoid
buffer out of bounds issue.
Change-Id: Id647888430ce302359a857ef54d321bee99889bf
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
Check for the proper param size before copying,
to avoid buffer overflow.
Original-Change-Id: I70c52e6ab76f528ea3714784ab9013b070839c40
Signed-off-by: Shalini Manjunatha <quic_c_shalma@quicinc.com>
Change-Id: Ic7fa9b3dd047d8eeba3cea02b99d6bc5b9df8daf
Conversion of negative "num_modules" var value
will result in max possible unsigned int value
and hence can cause mem corruption when accessed.
Resolve this by assigning the same data type
to "num_modules" var as used in the calling fn.
Original-Change-Id: I4c9d7215b9c7345637e1eb3a1992a41fef71c5cb
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
Change-Id: I55fd3ea6bf214e3852c58f8dcae9ada4723fa7d8
Check if payload data is big enough before accessing
the data in it.
Change-Id: I939f205a8cebf6ef4859f81fae5429bca013d540
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Check for the proper param size before copying,
to avoid buffer overflow.
Change-Id: I70c52e6ab76f528ea3714784ab9013b070839c40
Signed-off-by: Shalini Manjunatha <quic_c_shalma@quicinc.com>
Conversion of negative "num_modules" var value
will result in max possible unsigned int value
and hence can cause mem corruption when accessed.
Resolve this by assigning the same data type
to "num_modules" var as used in the calling fn.
Change-Id: I4c9d7215b9c7345637e1eb3a1992a41fef71c5cb
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
Current logic copies user buf size of data
from the avail dsp buf at a given offset.
If this offset returned from DSP in READ_DONE event
goes out of bounds or is corrupted, then it can lead to
out of bounds DSP buffer access, resulting in memory fault.
Fix is to add check for this buf offset, if it is within
the buf size range.
Change-Id: I7753cc6db394704dbb959477150141d42b836bef
Signed-off-by: Soumya Managoli <quic_c_smanag@quicinc.com>
Our DSP is supposed to support this.
Change-Id: Ib93ee2ec1b0c1a2fd1269f64d5f133db65d1b4a0
Suggested-by: Steve Kondik <shade@chemlab.org>
Signed-off-by: Panchajanya1999 <panchajanya@azure-dev.live>
Seeing as we shut this down intentionally, I don't see why we need
to be alerted it's failure, repeatedly, and from multiple drivers.
Signed-off-by: Adam W. Willis <return.of.octobot@gmail.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
../techpack/audio/asoc/codecs/wcd_cpe_services.c:1349:8: error: implicit conversion from enumeration type 'enum cpe_svc_result' to different enumeration type 'enum cpe_process_result' [-Werror,-Wenum-conversion]
rc = cpe_send_msg_to_inbox(t_info, 0, m);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Signed-off-by: Joel Gómez <nahuelgomez329@gmail.com>
Fixes warns on clang 15.0.0:
../techpack/data/drivers/rmnet/perf/rmnet_perf_opt.c:715:27: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
rmnet_perf_free_hash_table()
^
void
CC net/bluetooth/hci_conn.o
CC drivers/base/attribute_container.o
1 error generated.
../drivers/staging/qcacld-3.0/../qca-wifi-host-cmn/target_if/core/src/target_if_main.c:91:40: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
struct target_if_ctx *target_if_get_ctx()
^
void
1 error generated.
CC drivers/staging/qcacld-3.0/../qca-wifi-host-cmn/umac/dfs/core/src/misc/dfs_nol.o
make[4]: *** [../scripts/Makefile.build:364: drivers/staging/qcacld-3.0/../qca-wifi-host-cmn/target_if/core/src/target_if_main.o] Error 1
make[4]: *** Waiting for unfinished jobs....
../drivers/staging/qcacld-3.0/../qca-wifi-host-cmn/hif/src/ce/ce_service_legacy.c:1320:34: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
struct ce_ops *ce_services_legacy()
^
void
1 error generated.
Signed-off-by: Fiqri Ardyansyah <fiqri15072019@gmail.com>
Signed-off-by: Pranav Temkar <pranavtemkar@gmail.com>
The non-blocking if-statement here causes the AUDIO_GET_AMRWB_ENC_CONFIG
ioctl to always return -EFAULT, even upon success. Fix it by correctly
guarding the -EFAULT return value.
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
This is expensive and unneeded, especially since the qos functions are
hot code paths. Mose of the cpumask functions use the bitmap API, which
is also more expensive than just doing some simple operations on a word.
Since we're operating with a CPU count that can fit within a word,
replace the expensive cpumask operations with plain bitwise operations
wherever possible to make the pm_qos framework more efficient.
Change-Id: Ida5f08d5c1e25aa790d814153f1c7fe7a5dd9850
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
* Use proper if guard so that compiler won't spam dumb warning
Change-Id: I6becfab82a6f15a2d6177af307b3fa3da4e7b4e3
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
When the cmi header is filled, it isn't zeroed out; it's updated, so the
previous value it contains is retained as part of a bitmask. This
constitutes uninitialized usage of the cmi header struct.
Fix it by zeroing out the header with a memset, as is done elsewhere in
this driver.
This fixes the following warnings:
sound/soc/codecs/wcd_cpe_core.c: In function 'wcd_cpe_lab_ch_setup':
include/sound/cpe_cmi.h:173:18: error: 'lab_eob.hdr_info' may be used uninitialized in this function [-Werror=maybe-uninitialized]
Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
[yaro: cpe_lab_enable fix is in place in 4.14 techpack]
Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
Shut the fuck up
You're a fucking cunt
Shut the fuck up
You're a stupid cunt, suck my dick
Shut the fuck up
Stop being a fucking cunt
Shut the fuck up
Nobody even wants you here
What?
I just want to let you know, you're a stupid fucking cunt
Go ahead and run your mouth, pussy, I don't give a fuck
You're a stupid piece of shit, you're a stupid fucking bitch
Get the fuck up off my dick, get the fuck up off my dick, like
Please end your fucking life, please end your fucking life
I really gotta emphasise, no one cares if you're alive
You're a fucking penis-hole, grab a dick and eat it whole
I need to know if you were dropped when you were just a fetus though
You're so fucking ugly and your face is fucking foul, jeez
You're so fucking loud, can you shut your fucking mouth, can you
Shut the fuck up
You're a fucking cunt
Shut the fuck up
You're a stupid cunt, suck my dick
Shut the fuck up
Stop being a fucking cunt
Shut the fuck up
Nobody even wants you here
Yeah
Close your fucking mouth, you're just really fucking dense
If you hate me, why you talking? You don't make no fucking sense
Got a sad life, sad life, go to fucking hell
Are you stupid or disabled, man, I can't fucking tell
Meh
You're a fucking dumb shit, you don't even run shit
Get the fuck up out of my face and go to hell and eat a dick
Come and catch these hands, boy
Come and match these bands, boy
I'm not crazy, I just do it all because I can, boy
I hope you fucking die in a high-speed car crash
I hope you fucking fall head-first and get your neck cracked
I hope you have some beautiful children that die from cancer
I hope you catch Zika when your wife gets pregnant
I hope you win the lottery and die the next day
And your daughter has to see you getting lowered in your grave
Like, uh, ooh- that was a little dark
I'm sorry. Tha-that was a little dark. Very poor taste
Shut the fuck up
I shouldn't have said that
You're a fucking cunt
Actually, no, I should have
Shut the fuck up
Actually, I didn't say enough
You're a stupid cunt, suck my dick
Shut the fuck up
Stop being a fucking cunt
Shut the fuck up
Nobody even wants you here
Signed-off-by: Yaroslav Furman <yaro330@gmail.com>
This causes parts of the audio module to be rebuilt during every
incremental build, even if there are no changes:
CC techpack/audio/ipc/apr.o - due to command line change
CC techpack/audio/ipc/apr_v2.o - due to command line change
CC techpack/audio/ipc/apr_tal_rpmsg.o - due to command line change
CC techpack/audio/ipc/wcd-dsp-glink.o - due to command line change
We're only experiencing this issue in techpack/audio/ipc at the moment,
but kill the timestamp injection in all the audio components to
eliminate the possibility of encountering this issue again in the
future. This is harmless since the injected BUILD_TIMESTAMP macro is
never used.
Change-Id: I35b588a2a902438b2c79ebbac31453f2e528bbbe
Signed-off-by: Danny Lin <danny@kdrag0n.dev>
These insane amount of debug flags added by Xiaomi in production kernel
is just horrible.
Signed-off-by: Albert I <kras@raphielgang.org>
Signed-off-by: UtsavisGreat <utsavbalar1231@gmail.com>