mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
Fix up according to Coding Style
Only whitespace changes in here
This commit is contained in:
parent
5715b2af30
commit
ecf09f2cd6
60 changed files with 297 additions and 418 deletions
|
|
@ -39,22 +39,22 @@
|
|||
|
||||
#define MAX_BUFFER 4096
|
||||
static char *
|
||||
get_cpuinfo_line (char *cpuinfo, const char *tag) {
|
||||
get_cpuinfo_line(char *cpuinfo, const char *tag) {
|
||||
char *line, *end, *colon;
|
||||
|
||||
if (!(line = strstr (cpuinfo, tag)))
|
||||
if (!(line = strstr(cpuinfo, tag)))
|
||||
return NULL;
|
||||
|
||||
if (!(end = strchr (line, '\n')))
|
||||
if (!(end = strchr(line, '\n')))
|
||||
return NULL;
|
||||
|
||||
if (!(colon = strchr (line, ':')))
|
||||
if (!(colon = strchr(line, ':')))
|
||||
return NULL;
|
||||
|
||||
if (++colon >= end)
|
||||
return NULL;
|
||||
|
||||
return pa_xstrndup (colon, end - colon);
|
||||
return pa_xstrndup(colon, end - colon);
|
||||
}
|
||||
|
||||
static char *get_cpuinfo(void) {
|
||||
|
|
@ -80,7 +80,7 @@ static char *get_cpuinfo(void) {
|
|||
}
|
||||
#endif /* defined (__arm__) && defined (__linux__) */
|
||||
|
||||
pa_bool_t pa_cpu_init_arm (pa_cpu_arm_flag_t *flags) {
|
||||
pa_bool_t pa_cpu_init_arm(pa_cpu_arm_flag_t *flags) {
|
||||
#if defined (__arm__)
|
||||
#if defined (__linux__)
|
||||
char *cpuinfo, *line;
|
||||
|
|
@ -88,16 +88,16 @@ pa_bool_t pa_cpu_init_arm (pa_cpu_arm_flag_t *flags) {
|
|||
|
||||
/* We need to read the CPU flags from /proc/cpuinfo because there is no user
|
||||
* space support to get the CPU features. This only works on linux AFAIK. */
|
||||
if (!(cpuinfo = get_cpuinfo ())) {
|
||||
pa_log ("Can't read cpuinfo");
|
||||
if (!(cpuinfo = get_cpuinfo())) {
|
||||
pa_log("Can't read cpuinfo");
|
||||
return;
|
||||
}
|
||||
|
||||
*flags = 0;
|
||||
|
||||
/* get the CPU architecture */
|
||||
if ((line = get_cpuinfo_line (cpuinfo, "CPU architecture"))) {
|
||||
arch = strtoul (line, NULL, 0);
|
||||
if ((line = get_cpuinfo_line(cpuinfo, "CPU architecture"))) {
|
||||
arch = strtoul(line, NULL, 0);
|
||||
if (arch >= 6)
|
||||
*flags |= PA_CPU_ARM_V6;
|
||||
if (arch >= 7)
|
||||
|
|
@ -106,18 +106,18 @@ pa_bool_t pa_cpu_init_arm (pa_cpu_arm_flag_t *flags) {
|
|||
pa_xfree(line);
|
||||
}
|
||||
/* get the CPU features */
|
||||
if ((line = get_cpuinfo_line (cpuinfo, "Features"))) {
|
||||
if ((line = get_cpuinfo_line(cpuinfo, "Features"))) {
|
||||
const char *state = NULL;
|
||||
char *current;
|
||||
|
||||
while ((current = pa_split_spaces (line, &state))) {
|
||||
if (!strcmp (current, "vfp"))
|
||||
while ((current = pa_split_spaces(line, &state))) {
|
||||
if (!strcmp(current, "vfp"))
|
||||
*flags |= PA_CPU_ARM_VFP;
|
||||
else if (!strcmp (current, "edsp"))
|
||||
else if (!strcmp(current, "edsp"))
|
||||
*flags |= PA_CPU_ARM_EDSP;
|
||||
else if (!strcmp (current, "neon"))
|
||||
else if (!strcmp(current, "neon"))
|
||||
*flags |= PA_CPU_ARM_NEON;
|
||||
else if (!strcmp (current, "vfpv3"))
|
||||
else if (!strcmp(current, "vfpv3"))
|
||||
*flags |= PA_CPU_ARM_VFPV3;
|
||||
|
||||
pa_xfree(current);
|
||||
|
|
@ -125,7 +125,7 @@ pa_bool_t pa_cpu_init_arm (pa_cpu_arm_flag_t *flags) {
|
|||
}
|
||||
pa_xfree(cpuinfo);
|
||||
|
||||
pa_log_info ("CPU flags: %s%s%s%s%s%s",
|
||||
pa_log_info("CPU flags: %s%s%s%s%s%s",
|
||||
(*flags & PA_CPU_ARM_V6) ? "V6 " : "",
|
||||
(*flags & PA_CPU_ARM_V7) ? "V7 " : "",
|
||||
(*flags & PA_CPU_ARM_VFP) ? "VFP " : "",
|
||||
|
|
@ -134,7 +134,7 @@ pa_bool_t pa_cpu_init_arm (pa_cpu_arm_flag_t *flags) {
|
|||
(*flags & PA_CPU_ARM_VFPV3) ? "VFPV3 " : "");
|
||||
|
||||
if (*flags & PA_CPU_ARM_V6)
|
||||
pa_volume_func_init_arm (*flags);
|
||||
pa_volume_func_init_arm(*flags);
|
||||
|
||||
return TRUE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue