Skip to content

Improvements in audio upperhalf#17463

Draft
ByteTyper wants to merge 34 commits intoapache:masterfrom
ByteTyper:push-5
Draft

Improvements in audio upperhalf#17463
ByteTyper wants to merge 34 commits intoapache:masterfrom
ByteTyper:push-5

Conversation

@ByteTyper
Copy link

Note: Please adhere to Contributing Guidelines.

Summary

1、Add some log in upperhalf.
2、support more compressed data support in audio.
3、Add unregister audio devices support.

Impact

Upperhalf driver

Testing

We have conducted tests on the following platforms:
1、sim
2、bes
3、allwinnertech

yangyalei and others added 30 commits December 9, 2025 15:25
use AUDIOIOC_GETAUDIOINFO get current audio format

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
enable use AUDIOIOC_GETSTATE get lower driver state

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
support maintain apb buffer in upper half driver

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
support maintain apb buffer in upper driver

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
Add Hw pointer recored apb buffer read/write position

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
1. mmap hw_ptr_s,
2. mmap apb buffers;

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
protect hwpter in lock

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
support poll notify read/write enable

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
modify to keep code clean

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
relayout the code for easy modification

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
protect configure lower only once

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
support multiple applications using upper at the same time

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
update aplication pointer in enqueuebuffer

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
in some case, draining have done in audio_stop

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
if another application has already been initialized,
we do not stop the driver to facilitate a quick start.

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
memset apb buffer to zero when dequeue

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
notify POLLERR event if buffer drain

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
use AUDIOIOC_RESETSTATUS to reset application pointer

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
add 24 bit format define

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
memset audio info to zero when stop

Signed-off-by: cenzhanquan1 <cenzhanquan1@xiaomi.com>
bug fix

Signed-off-by: cenzhanquan1 <cenzhanquan1@xiaomi.com>
and compressed macros

Signed-off-by: wurui3 <wurui3@xiaomi.com>
change use file_get

Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
support upper driver check whether enqueue apb buffer to the lower
driver

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
clear buffer only during playback when executing audio_dequeuebuffer

Signed-off-by: yangyalei <yangyalei@xiaomi.com>
and lc3 enc & dec define

Signed-off-by: cenzhanquan1 <cenzhanquan1@xiaomi.com>
support multiple applications simultaneously calling ALLOCATE_BUFFER

Signed-off-by: fangyibo <fangyibo@xiaomi.com>
jump to ringbuffer tail in AUDIOIOC_RESETSTATUS

Signed-off-by: fangyibo <fangyibo@xiaomi.com>
add float define

Signed-off-by: fangyibo <fangyibo@xiaomi.com>
Inode_reserve will create intermediate directory automatically when
register driver.

Signed-off-by: wurui3 <wurui3@xiaomi.com>
Unregister an exsited audio device from filesystem.

Signed-off-by: wurui3 <wurui3@xiaomi.com>
Support compressed data with LC3 and speex fmt.

Signed-off-by: wurui3 <wurui3@xiaomi.com>
Compressed data with speex fmt is required to provide more info about
codec.

Signed-off-by: wurui3 <wurui3@xiaomi.com>
Sometimes cmd could not pass to lowerhalf if upperhalf is opened
serveral times, add log to see the tue cmd passed.

Signed-off-by: wurui3 <wurui3@xiaomi.com>
@ByteTyper ByteTyper requested a review from jerpelea as a code owner December 9, 2025 11:47
@github-actions github-actions bot added Area: Audio Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. labels Dec 9, 2025
Copy link
Contributor

@linguini1 linguini1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a lot of commits, this PR needs to be split into multiple PRs. Please include detailed testing information and format the PR titles according to the same format as the commit topics.

Copy link
Contributor

@jerpelea jerpelea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This amount of commits is hard to review
Please split the PR in logical blocks and submit separate PR for each one

@xiaoxiang781216 xiaoxiang781216 marked this pull request as draft December 15, 2025 02:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Audio Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants