• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/libaudio


Commit MetaInfo

修訂f8ac0ee7e2edf5885a1901ea242b6d0957c17a2a (tree)
時間2016-07-27 02:21:33
作者Chih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

audio_hw: fix unused parameter warnings

Change Summary

差異

--- a/audio_hw.c
+++ b/audio_hw.c
@@ -526,12 +526,12 @@ static ssize_t read_frames(struct stream_in *in, void *buffer, ssize_t frames)
526526
527527 /* API functions */
528528
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)
530530 {
531531 return pcm_config_out.rate;
532532 }
533533
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)
535535 {
536536 return -ENOSYS;
537537 }
@@ -542,17 +542,17 @@ static size_t out_get_buffer_size(const struct audio_stream *stream)
542542 audio_stream_out_frame_size((struct audio_stream_out *)stream);
543543 }
544544
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)
546546 {
547547 return AUDIO_CHANNEL_OUT_STEREO;
548548 }
549549
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)
551551 {
552552 return AUDIO_FORMAT_PCM_16_BIT;
553553 }
554554
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)
556556 {
557557 return -ENOSYS;
558558 }
@@ -570,7 +570,7 @@ static int out_standby(struct audio_stream *stream)
570570 return 0;
571571 }
572572
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)
574574 {
575575 return 0;
576576 }
@@ -613,7 +613,7 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
613613 return ret;
614614 }
615615
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)
617617 {
618618 return strdup("");
619619 }
@@ -636,8 +636,8 @@ static uint32_t out_get_latency(const struct audio_stream_out *stream)
636636 return (pcm_config_out.period_size * period_count * 1000) / pcm_config_out.rate;
637637 }
638638
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)
641641 {
642642 return -ENOSYS;
643643 }
@@ -798,24 +798,24 @@ exit:
798798 return bytes;
799799 }
800800
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)
803803 {
804804 return -EINVAL;
805805 }
806806
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)
808808 {
809809 return 0;
810810 }
811811
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)
813813 {
814814 return 0;
815815 }
816816
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)
819819 {
820820 return -EINVAL;
821821 }
@@ -828,7 +828,7 @@ static uint32_t in_get_sample_rate(const struct audio_stream *stream)
828828 return in->requested_rate;
829829 }
830830
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)
832832 {
833833 return 0;
834834 }
@@ -850,17 +850,17 @@ static size_t in_get_buffer_size(const struct audio_stream *stream)
850850 return size * audio_stream_in_frame_size(&in->stream);
851851 }
852852
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)
854854 {
855855 return AUDIO_CHANNEL_IN_MONO;
856856 }
857857
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)
859859 {
860860 return AUDIO_FORMAT_PCM_16_BIT;
861861 }
862862
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)
864864 {
865865 return -ENOSYS;
866866 }
@@ -878,7 +878,7 @@ static int in_standby(struct audio_stream *stream)
878878 return 0;
879879 }
880880
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)
882882 {
883883 return 0;
884884 }
@@ -921,13 +921,13 @@ static int in_set_parameters(struct audio_stream *stream, const char *kvpairs)
921921 return ret;
922922 }
923923
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)
926926 {
927927 return strdup("");
928928 }
929929
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)
931931 {
932932 return 0;
933933 }
@@ -998,28 +998,28 @@ exit:
998998 return bytes;
999999 }
10001000
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)
10021002 {
10031003 return 0;
10041004 }
10051005
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)
10081008 {
10091009 return 0;
10101010 }
10111011
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)
10141014 {
10151015 return 0;
10161016 }
10171017
10181018
10191019 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,
10231023 struct audio_config *config,
10241024 struct audio_stream_out **stream_out)
10251025 {
@@ -1066,7 +1066,7 @@ err_open:
10661066 return ret;
10671067 }
10681068
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,
10701070 struct audio_stream_out *stream)
10711071 {
10721072 out_standby(&stream->common);
@@ -1122,28 +1122,28 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs)
11221122 return ret;
11231123 }
11241124
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)
11271127 {
11281128 return strdup("");
11291129 }
11301130
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)
11321132 {
11331133 return 0;
11341134 }
11351135
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)
11371137 {
11381138 return -ENOSYS;
11391139 }
11401140
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)
11421142 {
11431143 return -ENOSYS;
11441144 }
11451145
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)
11471147 {
11481148 return 0;
11491149 }
@@ -1166,7 +1166,7 @@ static int adev_get_mic_mute(const struct audio_hw_device *dev, bool *state)
11661166 return 0;
11671167 }
11681168
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,
11701170 const struct audio_config *config)
11711171 {
11721172 size_t size;
@@ -1184,8 +1184,8 @@ static size_t adev_get_input_buffer_size(const struct audio_hw_device *dev,
11841184 }
11851185
11861186 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,
11891189 struct audio_config *config,
11901190 struct audio_stream_in **stream_in)
11911191 {
@@ -1230,7 +1230,7 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
12301230 return 0;
12311231 }
12321232
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,
12341234 struct audio_stream_in *stream)
12351235 {
12361236 struct stream_in *in = (struct stream_in *)stream;
@@ -1239,7 +1239,7 @@ static void adev_close_input_stream(struct audio_hw_device *dev,
12391239 free(stream);
12401240 }
12411241
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)
12431243 {
12441244 return 0;
12451245 }