-
Notifications
You must be signed in to change notification settings - Fork 25
Demo application for accel operation. #26
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
Open
TE-N-ShengjiuWang
wants to merge
2
commits into
alsa-project:master
Choose a base branch
from
TE-N-ShengjiuWang:demo_accel
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| } src_d; | ||
| }__attribute__((packed, aligned(4))); | ||
|
|
||
| struct snd_codec_desc_src { | ||
| __u32 out_sample_rate_min; | ||
| __u32 out_sample_rate_max; | ||
| } __attribute__((packed, aligned(4))); | ||
|
|
||
| struct snd_codec_desc { | ||
| __u32 max_ch; | ||
| __u32 sample_rates[MAX_NUM_SAMPLE_RATES]; | ||
|
|
@@ -266,7 +274,12 @@ struct snd_codec_desc { | |
| __u32 modes; | ||
| __u32 formats; | ||
| __u32 min_buffer; | ||
| __u32 reserved[15]; | ||
| __u32 pcm_formats; | ||
| union { | ||
| __u32 u_space[6]; | ||
| struct snd_codec_desc_src src; | ||
| } __attribute__((packed, aligned(4))); | ||
| __u32 reserved[8]; | ||
| }__attribute__((packed, aligned(4))); | ||
|
|
||
| struct snd_codec { | ||
|
|
@@ -282,7 +295,8 @@ struct snd_codec { | |
| __u32 format; | ||
| __u32 align; | ||
| union snd_codec_options options; | ||
| __u32 reserved[3]; | ||
| __u32 pcm_format; | ||
| __u32 reserved[2]; | ||
| }__attribute__((packed, aligned(4))); | ||
|
|
||
| #endif | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,14 @@ | ||
| bin_PROGRAMS = cplay crecord | ||
| bin_PROGRAMS = cplay crecord caccel | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we always build caccel? |
||
|
|
||
| cplay_SOURCES = cplay.c wave.c | ||
| crecord_SOURCES = crecord.c wave.c | ||
| caccel_SOURCES = caccel.c wave.c alsa_wrap.c | ||
|
|
||
| cplay_CFLAGS = -I$(top_srcdir)/include | ||
| crecord_CFLAGS = -I$(top_srcdir)/include | ||
| caccel_CFLAGS = -I$(top_srcdir)/include | ||
|
|
||
|
|
||
| cplay_LDADD = $(top_builddir)/src/lib/libtinycompress.la | ||
| crecord_LDADD = $(top_builddir)/src/lib/libtinycompress.la | ||
| caccel_LDADD = $(top_builddir)/src/lib/libtinycompress.la -lasound | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // SPDX-License-Identifier: (LGPL-2.1-only OR BSD-3-Clause) | ||
|
|
||
| #include <alsa/asoundlib.h> | ||
|
|
||
| snd_pcm_format_t alsa_snd_pcm_format_value(const char *name) | ||
| { | ||
| return snd_pcm_format_value(name); | ||
| } | ||
|
|
||
| int alsa_snd_pcm_format_physical_width(snd_pcm_format_t format) | ||
| { | ||
| return snd_pcm_format_physical_width(format); | ||
| } | ||
|
|
||
| int alsa_snd_pcm_format_width(snd_pcm_format_t format) | ||
| { | ||
| return snd_pcm_format_width(format); | ||
| } | ||
|
|
||
| int alsa_snd_pcm_format_linear(snd_pcm_format_t format) | ||
| { | ||
| return snd_pcm_format_linear(format); | ||
| } | ||
|
|
||
| int alsa_snd_pcm_format_signed(snd_pcm_format_t format) | ||
| { | ||
| return snd_pcm_format_signed(format); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /* SPDX-License-Identifier: (LGPL-2.1-only OR BSD-3-Clause) */ | ||
|
|
||
| #ifndef __ALSA_WRAP_API_H | ||
| #define __ALSA_WRAP_API_H | ||
|
|
||
| snd_pcm_format_t alsa_snd_pcm_format_value(const char *name); | ||
| int alsa_snd_pcm_format_physical_width(snd_pcm_format_t format); | ||
| int alsa_snd_pcm_format_width(snd_pcm_format_t format); | ||
| int alsa_snd_pcm_format_linear(snd_pcm_format_t format); | ||
| int alsa_snd_pcm_format_signed(snd_pcm_format_t format); | ||
| #endif | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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...