hardware/libaudio
修訂 | f8ac0ee7e2edf5885a1901ea242b6d0957c17a2a (tree) |
---|---|
時間 | 2016-07-27 02:21:33 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
audio_hw: fix unused parameter warnings
@@ -526,12 +526,12 @@ static ssize_t read_frames(struct stream_in *in, void *buffer, ssize_t frames) | ||
526 | 526 | |
527 | 527 | /* API functions */ |
528 | 528 | |
529 | -static uint32_t out_get_sample_rate(const struct audio_stream *stream) | |
529 | +static uint32_t out_get_sample_rate(const struct audio_stream *stream __unused) | |
530 | 530 | { |
531 | 531 | return pcm_config_out.rate; |
532 | 532 | } |
533 | 533 | |
534 | -static int out_set_sample_rate(struct audio_stream *stream, uint32_t rate) | |
534 | +static int out_set_sample_rate(struct audio_stream *stream __unused, uint32_t rate __unused) | |
535 | 535 | { |
536 | 536 | return -ENOSYS; |
537 | 537 | } |
@@ -542,17 +542,17 @@ static size_t out_get_buffer_size(const struct audio_stream *stream) | ||
542 | 542 | audio_stream_out_frame_size((struct audio_stream_out *)stream); |
543 | 543 | } |
544 | 544 | |
545 | -static uint32_t out_get_channels(const struct audio_stream *stream) | |
545 | +static uint32_t out_get_channels(const struct audio_stream *stream __unused) | |
546 | 546 | { |
547 | 547 | return AUDIO_CHANNEL_OUT_STEREO; |
548 | 548 | } |
549 | 549 | |
550 | -static audio_format_t out_get_format(const struct audio_stream *stream) | |
550 | +static audio_format_t out_get_format(const struct audio_stream *stream __unused) | |
551 | 551 | { |
552 | 552 | return AUDIO_FORMAT_PCM_16_BIT; |
553 | 553 | } |
554 | 554 | |
555 | -static int out_set_format(struct audio_stream *stream, audio_format_t format) | |
555 | +static int out_set_format(struct audio_stream *stream __unused, audio_format_t format __unused) | |
556 | 556 | { |
557 | 557 | return -ENOSYS; |
558 | 558 | } |
@@ -570,7 +570,7 @@ static int out_standby(struct audio_stream *stream) | ||
570 | 570 | return 0; |
571 | 571 | } |
572 | 572 | |
573 | -static int out_dump(const struct audio_stream *stream, int fd) | |
573 | +static int out_dump(const struct audio_stream *stream __unused, int fd __unused) | |
574 | 574 | { |
575 | 575 | return 0; |
576 | 576 | } |
@@ -613,7 +613,7 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs) | ||
613 | 613 | return ret; |
614 | 614 | } |
615 | 615 | |
616 | -static char * out_get_parameters(const struct audio_stream *stream, const char *keys) | |
616 | +static char *out_get_parameters(const struct audio_stream *stream __unused, const char *keys __unused) | |
617 | 617 | { |
618 | 618 | return strdup(""); |
619 | 619 | } |
@@ -636,8 +636,8 @@ static uint32_t out_get_latency(const struct audio_stream_out *stream) | ||
636 | 636 | return (pcm_config_out.period_size * period_count * 1000) / pcm_config_out.rate; |
637 | 637 | } |
638 | 638 | |
639 | -static int out_set_volume(struct audio_stream_out *stream, float left, | |
640 | - float right) | |
639 | +static int out_set_volume(struct audio_stream_out *stream __unused, float left __unused, | |
640 | + float right __unused) | |
641 | 641 | { |
642 | 642 | return -ENOSYS; |
643 | 643 | } |
@@ -798,24 +798,24 @@ exit: | ||
798 | 798 | return bytes; |
799 | 799 | } |
800 | 800 | |
801 | -static int out_get_render_position(const struct audio_stream_out *stream, | |
802 | - uint32_t *dsp_frames) | |
801 | +static int out_get_render_position(const struct audio_stream_out *stream __unused, | |
802 | + uint32_t *dsp_frames __unused) | |
803 | 803 | { |
804 | 804 | return -EINVAL; |
805 | 805 | } |
806 | 806 | |
807 | -static int out_add_audio_effect(const struct audio_stream *stream, effect_handle_t effect) | |
807 | +static int out_add_audio_effect(const struct audio_stream *stream __unused, effect_handle_t effect __unused) | |
808 | 808 | { |
809 | 809 | return 0; |
810 | 810 | } |
811 | 811 | |
812 | -static int out_remove_audio_effect(const struct audio_stream *stream, effect_handle_t effect) | |
812 | +static int out_remove_audio_effect(const struct audio_stream *stream __unused, effect_handle_t effect __unused) | |
813 | 813 | { |
814 | 814 | return 0; |
815 | 815 | } |
816 | 816 | |
817 | -static int out_get_next_write_timestamp(const struct audio_stream_out *stream, | |
818 | - int64_t *timestamp) | |
817 | +static int out_get_next_write_timestamp(const struct audio_stream_out *stream __unused, | |
818 | + int64_t *timestamp __unused) | |
819 | 819 | { |
820 | 820 | return -EINVAL; |
821 | 821 | } |
@@ -828,7 +828,7 @@ static uint32_t in_get_sample_rate(const struct audio_stream *stream) | ||
828 | 828 | return in->requested_rate; |
829 | 829 | } |
830 | 830 | |
831 | -static int in_set_sample_rate(struct audio_stream *stream, uint32_t rate) | |
831 | +static int in_set_sample_rate(struct audio_stream *stream __unused, uint32_t rate __unused) | |
832 | 832 | { |
833 | 833 | return 0; |
834 | 834 | } |
@@ -850,17 +850,17 @@ static size_t in_get_buffer_size(const struct audio_stream *stream) | ||
850 | 850 | return size * audio_stream_in_frame_size(&in->stream); |
851 | 851 | } |
852 | 852 | |
853 | -static uint32_t in_get_channels(const struct audio_stream *stream) | |
853 | +static uint32_t in_get_channels(const struct audio_stream *stream __unused) | |
854 | 854 | { |
855 | 855 | return AUDIO_CHANNEL_IN_MONO; |
856 | 856 | } |
857 | 857 | |
858 | -static audio_format_t in_get_format(const struct audio_stream *stream) | |
858 | +static audio_format_t in_get_format(const struct audio_stream *stream __unused) | |
859 | 859 | { |
860 | 860 | return AUDIO_FORMAT_PCM_16_BIT; |
861 | 861 | } |
862 | 862 | |
863 | -static int in_set_format(struct audio_stream *stream, audio_format_t format) | |
863 | +static int in_set_format(struct audio_stream *stream __unused, audio_format_t format __unused) | |
864 | 864 | { |
865 | 865 | return -ENOSYS; |
866 | 866 | } |
@@ -878,7 +878,7 @@ static int in_standby(struct audio_stream *stream) | ||
878 | 878 | return 0; |
879 | 879 | } |
880 | 880 | |
881 | -static int in_dump(const struct audio_stream *stream, int fd) | |
881 | +static int in_dump(const struct audio_stream *stream __unused, int fd __unused) | |
882 | 882 | { |
883 | 883 | return 0; |
884 | 884 | } |
@@ -921,13 +921,13 @@ static int in_set_parameters(struct audio_stream *stream, const char *kvpairs) | ||
921 | 921 | return ret; |
922 | 922 | } |
923 | 923 | |
924 | -static char * in_get_parameters(const struct audio_stream *stream, | |
925 | - const char *keys) | |
924 | +static char * in_get_parameters(const struct audio_stream *stream __unused, | |
925 | + const char *keys __unused) | |
926 | 926 | { |
927 | 927 | return strdup(""); |
928 | 928 | } |
929 | 929 | |
930 | -static int in_set_gain(struct audio_stream_in *stream, float gain) | |
930 | +static int in_set_gain(struct audio_stream_in *stream __unused, float gain __unused) | |
931 | 931 | { |
932 | 932 | return 0; |
933 | 933 | } |
@@ -998,28 +998,28 @@ exit: | ||
998 | 998 | return bytes; |
999 | 999 | } |
1000 | 1000 | |
1001 | -static uint32_t in_get_input_frames_lost(struct audio_stream_in *stream) | |
1001 | +static uint32_t in_get_input_frames_lost(struct audio_stream_in *stream __unused) | |
1002 | 1002 | { |
1003 | 1003 | return 0; |
1004 | 1004 | } |
1005 | 1005 | |
1006 | -static int in_add_audio_effect(const struct audio_stream *stream, | |
1007 | - effect_handle_t effect) | |
1006 | +static int in_add_audio_effect(const struct audio_stream *stream __unused, | |
1007 | + effect_handle_t effect __unused) | |
1008 | 1008 | { |
1009 | 1009 | return 0; |
1010 | 1010 | } |
1011 | 1011 | |
1012 | -static int in_remove_audio_effect(const struct audio_stream *stream, | |
1013 | - effect_handle_t effect) | |
1012 | +static int in_remove_audio_effect(const struct audio_stream *stream __unused, | |
1013 | + effect_handle_t effect __unused) | |
1014 | 1014 | { |
1015 | 1015 | return 0; |
1016 | 1016 | } |
1017 | 1017 | |
1018 | 1018 | |
1019 | 1019 | static int adev_open_output_stream(struct audio_hw_device *dev, |
1020 | - audio_io_handle_t handle, | |
1021 | - audio_devices_t devices, | |
1022 | - audio_output_flags_t flags, | |
1020 | + audio_io_handle_t handle __unused, | |
1021 | + audio_devices_t devices __unused, | |
1022 | + audio_output_flags_t flags __unused, | |
1023 | 1023 | struct audio_config *config, |
1024 | 1024 | struct audio_stream_out **stream_out) |
1025 | 1025 | { |
@@ -1066,7 +1066,7 @@ err_open: | ||
1066 | 1066 | return ret; |
1067 | 1067 | } |
1068 | 1068 | |
1069 | -static void adev_close_output_stream(struct audio_hw_device *dev, | |
1069 | +static void adev_close_output_stream(struct audio_hw_device *dev __unused, | |
1070 | 1070 | struct audio_stream_out *stream) |
1071 | 1071 | { |
1072 | 1072 | out_standby(&stream->common); |
@@ -1122,28 +1122,28 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs) | ||
1122 | 1122 | return ret; |
1123 | 1123 | } |
1124 | 1124 | |
1125 | -static char * adev_get_parameters(const struct audio_hw_device *dev, | |
1126 | - const char *keys) | |
1125 | +static char * adev_get_parameters(const struct audio_hw_device *dev __unused, | |
1126 | + const char *keys __unused) | |
1127 | 1127 | { |
1128 | 1128 | return strdup(""); |
1129 | 1129 | } |
1130 | 1130 | |
1131 | -static int adev_init_check(const struct audio_hw_device *dev) | |
1131 | +static int adev_init_check(const struct audio_hw_device *dev __unused) | |
1132 | 1132 | { |
1133 | 1133 | return 0; |
1134 | 1134 | } |
1135 | 1135 | |
1136 | -static int adev_set_voice_volume(struct audio_hw_device *dev, float volume) | |
1136 | +static int adev_set_voice_volume(struct audio_hw_device *dev __unused, float volume __unused) | |
1137 | 1137 | { |
1138 | 1138 | return -ENOSYS; |
1139 | 1139 | } |
1140 | 1140 | |
1141 | -static int adev_set_master_volume(struct audio_hw_device *dev, float volume) | |
1141 | +static int adev_set_master_volume(struct audio_hw_device *dev __unused, float volume __unused) | |
1142 | 1142 | { |
1143 | 1143 | return -ENOSYS; |
1144 | 1144 | } |
1145 | 1145 | |
1146 | -static int adev_set_mode(struct audio_hw_device *dev, audio_mode_t mode) | |
1146 | +static int adev_set_mode(struct audio_hw_device *dev __unused, audio_mode_t mode __unused) | |
1147 | 1147 | { |
1148 | 1148 | return 0; |
1149 | 1149 | } |
@@ -1166,7 +1166,7 @@ static int adev_get_mic_mute(const struct audio_hw_device *dev, bool *state) | ||
1166 | 1166 | return 0; |
1167 | 1167 | } |
1168 | 1168 | |
1169 | -static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev, | |
1169 | +static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev __unused, | |
1170 | 1170 | const struct audio_config *config) |
1171 | 1171 | { |
1172 | 1172 | size_t size; |
@@ -1184,8 +1184,8 @@ static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev, | ||
1184 | 1184 | } |
1185 | 1185 | |
1186 | 1186 | static int adev_open_input_stream(struct audio_hw_device *dev, |
1187 | - audio_io_handle_t handle, | |
1188 | - audio_devices_t devices, | |
1187 | + audio_io_handle_t handle __unused, | |
1188 | + audio_devices_t devices __unused, | |
1189 | 1189 | struct audio_config *config, |
1190 | 1190 | struct audio_stream_in **stream_in) |
1191 | 1191 | { |
@@ -1230,7 +1230,7 @@ static int adev_open_input_stream(struct audio_hw_device *dev, | ||
1230 | 1230 | return 0; |
1231 | 1231 | } |
1232 | 1232 | |
1233 | -static void adev_close_input_stream(struct audio_hw_device *dev, | |
1233 | +static void adev_close_input_stream(struct audio_hw_device *dev __unused, | |
1234 | 1234 | struct audio_stream_in *stream) |
1235 | 1235 | { |
1236 | 1236 | struct stream_in *in = (struct stream_in *)stream; |
@@ -1239,7 +1239,7 @@ static void adev_close_input_stream(struct audio_hw_device *dev, | ||
1239 | 1239 | free(stream); |
1240 | 1240 | } |
1241 | 1241 | |
1242 | -static int adev_dump(const audio_hw_device_t *device, int fd) | |
1242 | +static int adev_dump(const audio_hw_device_t *device __unused, int fd __unused) | |
1243 | 1243 | { |
1244 | 1244 | return 0; |
1245 | 1245 | } |