-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demo application for accel operation. #26
base: master
Are you sure you want to change the base?
Demo application for accel operation. #26
Conversation
src/utils/caccel.c
Outdated
goto end_process_err; | ||
} | ||
|
||
if (ioctl(fd_accel, SNDRV_COMPRESS_TASK_STOP, &task.seqno) < 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
STOP ioctl should not wait for result. STATUS or poll()
should be used to wait for the task operation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep
Thank you for this example code, but the abstraction should be added to tinycompress library like we do for standard playback/capture modes. |
@@ -21,7 +21,7 @@ | |||
#include <linux/types.h> | |||
#include <sound/asound.h> | |||
#include <sound/compress_params.h> | |||
#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 2, 0) | |||
#define SNDRV_COMPRESS_VERSION SNDRV_PROTOCOL_VERSION(0, 3, 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heh! GH doesnt let comment on patchlog...
I guess it would make sense to say, move the header to version 0.3.0...
@@ -253,8 +253,16 @@ union snd_codec_options { | |||
struct snd_dec_wma wma_d; | |||
struct snd_dec_alac alac_d; | |||
struct snd_dec_ape ape_d; | |||
struct { | |||
__u32 out_sample_rate; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be folded into previos patch as both are coming from kernel header
@@ -1,11 +1,14 @@ | |||
bin_PROGRAMS = cplay crecord | |||
bin_PROGRAMS = cplay crecord caccel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we always build caccel?
yes, that is the primary comment for this change |
Merge header file compress_offload.h for the changes of adding accel operation. Merge header file compress_params.h for the changes of adding src codec. update libtinycompress for adding accel operations. Signed-off-by: Shengjiu Wang <[email protected]>
This 'caccel' applicaton is a demo to show how to call the new introduced accel interface. The kernel patch is: ALSA: compress_offload: introduce accel operation mode As there is conflict when using the API of alsa-lib, add alsa_wrap file to separate the header files: alsa/asoundlib.h sound/asound.h Signed-off-by: Shengjiu Wang <[email protected]>
89f4299
to
87f7e56
Compare
@perexg @vinodkoul I have update the commits, mainly for tinycompress library. |
This 'caccel' applicaton is a demo to show how to
call the new introduced accel interface.
The kernel patch is:
ALSA: compress_offload: introduce accel operation mode
As there is conflict when using the API of alsa-lib,
add alsa_wrap file to separate the header files:
alsa/asoundlib.h
sound/asound.h
command for conversion to 48kHz:
caccel -i in.wav -o out.wav -r 48000