#endif
#ifndef LIB_HAS_LOAD_STRING
-int snd_config_load_string(snd_config_t **config, const char *s, size_t size)
+static int snd_config_load_string(snd_config_t **config, const char *s,
+ size_t size)
{
snd_input_t *input;
snd_config_t *dst;
}
#endif
-void find_controls(void)
+static void find_controls(void)
{
char name[32];
int card, ctl, err;
* Block for up to timeout ms for an event, returns a negative value
* on error, 0 for no event and 1 for an event.
*/
-int wait_for_event(struct ctl_data *ctl, int timeout)
+static int wait_for_event(struct ctl_data *ctl, int timeout)
{
unsigned short revents;
snd_ctl_event_t *event;
return 1;
}
-bool ctl_value_index_valid(struct ctl_data *ctl, snd_ctl_elem_value_t *val,
- int index)
+static bool ctl_value_index_valid(struct ctl_data *ctl,
+ snd_ctl_elem_value_t *val,
+ int index)
{
long int_val;
long long int64_val;
* Check that the provided value meets the constraints for the
* provided control.
*/
-bool ctl_value_valid(struct ctl_data *ctl, snd_ctl_elem_value_t *val)
+static bool ctl_value_valid(struct ctl_data *ctl, snd_ctl_elem_value_t *val)
{
int i;
bool valid = true;
* Check that we can read the default value and it is valid. Write
* tests use the read value to restore the default.
*/
-void test_ctl_get_value(struct ctl_data *ctl)
+static void test_ctl_get_value(struct ctl_data *ctl)
{
int err;
ctl->card->card, ctl->elem);
}
-bool show_mismatch(struct ctl_data *ctl, int index,
- snd_ctl_elem_value_t *read_val,
- snd_ctl_elem_value_t *expected_val)
+static bool show_mismatch(struct ctl_data *ctl, int index,
+ snd_ctl_elem_value_t *read_val,
+ snd_ctl_elem_value_t *expected_val)
{
long long expected_int, read_int;
* the write to fail, for verifying that invalid writes don't corrupt
* anything.
*/
-int write_and_verify(struct ctl_data *ctl,
- snd_ctl_elem_value_t *write_val,
- snd_ctl_elem_value_t *expected_val)
+static int write_and_verify(struct ctl_data *ctl,
+ snd_ctl_elem_value_t *write_val,
+ snd_ctl_elem_value_t *expected_val)
{
int err, i;
bool error_expected, mismatch_shown;
* Make sure we can write the default value back to the control, this
* should validate that at least some write works.
*/
-void test_ctl_write_default(struct ctl_data *ctl)
+static void test_ctl_write_default(struct ctl_data *ctl)
{
int err;
ctl->card->card, ctl->elem);
}
-bool test_ctl_write_valid_boolean(struct ctl_data *ctl)
+static bool test_ctl_write_valid_boolean(struct ctl_data *ctl)
{
int err, i, j;
bool fail = false;
return !fail;
}
-bool test_ctl_write_valid_integer(struct ctl_data *ctl)
+static bool test_ctl_write_valid_integer(struct ctl_data *ctl)
{
int err;
int i;
return !fail;
}
-bool test_ctl_write_valid_integer64(struct ctl_data *ctl)
+static bool test_ctl_write_valid_integer64(struct ctl_data *ctl)
{
int err, i;
long long j, step;
return !fail;
}
-bool test_ctl_write_valid_enumerated(struct ctl_data *ctl)
+static bool test_ctl_write_valid_enumerated(struct ctl_data *ctl)
{
int err, i, j;
bool fail = false;
return !fail;
}
-void test_ctl_write_valid(struct ctl_data *ctl)
+static void test_ctl_write_valid(struct ctl_data *ctl)
{
bool pass;
int err;
ctl->card->card, ctl->elem);
}
-bool test_ctl_write_invalid_value(struct ctl_data *ctl,
- snd_ctl_elem_value_t *val)
+static bool test_ctl_write_invalid_value(struct ctl_data *ctl,
+ snd_ctl_elem_value_t *val)
{
int err;
long val_read;
return !ctl_value_valid(ctl, val);
}
-bool test_ctl_write_invalid_boolean(struct ctl_data *ctl)
+static bool test_ctl_write_invalid_boolean(struct ctl_data *ctl)
{
int err, i;
long val_read;
return !fail;
}
-bool test_ctl_write_invalid_integer(struct ctl_data *ctl)
+static bool test_ctl_write_invalid_integer(struct ctl_data *ctl)
{
int i;
bool fail = false;
return !fail;
}
-bool test_ctl_write_invalid_integer64(struct ctl_data *ctl)
+static bool test_ctl_write_invalid_integer64(struct ctl_data *ctl)
{
int i;
bool fail = false;
return !fail;
}
-bool test_ctl_write_invalid_enumerated(struct ctl_data *ctl)
+static bool test_ctl_write_invalid_enumerated(struct ctl_data *ctl)
{
int err, i;
unsigned int val_read;
}
-void test_ctl_write_invalid(struct ctl_data *ctl)
+static void test_ctl_write_invalid(struct ctl_data *ctl)
{
bool pass;
int err;
ctl->card->card, ctl->elem);
}
-void test_ctl_event_missing(struct ctl_data *ctl)
+static void test_ctl_event_missing(struct ctl_data *ctl)
{
ksft_test_result(!ctl->event_missing, "event_missing.%d.%d\n",
ctl->card->card, ctl->elem);
}
-void test_ctl_event_spurious(struct ctl_data *ctl)
+static void test_ctl_event_spurious(struct ctl_data *ctl)
{
ksft_test_result(!ctl->event_spurious, "event_spurious.%d.%d\n",
ctl->card->card, ctl->elem);