OSDN Git Service

Revert "Add dump() (i.e dumpsys media.audio_flinger) functionality to USB HAL"
authorPaul Mclean <pmclean@google.com>
Tue, 31 May 2016 20:49:14 +0000 (20:49 +0000)
committerPaul Mclean <pmclean@google.com>
Tue, 31 May 2016 20:49:14 +0000 (20:49 +0000)
This reverts commit 975806d761330577e7d19b26f6345601951286d2.

Change-Id: I265611c9c957826fc2cfd6fdaab84cf8212f94b8

alsa_utils/alsa_device_profile.c
alsa_utils/alsa_device_proxy.c
alsa_utils/include/alsa_device_profile.h
alsa_utils/include/alsa_device_proxy.h

index f3ee7bb..0d9bd88 100644 (file)
@@ -566,59 +566,3 @@ char * profile_get_channel_count_strs(alsa_device_profile* profile)
 
     return strdup(buffer);
 }
-
-void profile_dump(const alsa_device_profile* profile, int fd)
-{
-    if (profile == NULL) {
-        dprintf(fd, "  %s\n", "No USB Profile");
-        return; /* bail early */
-    }
-
-    if (!profile->is_valid) {
-        dprintf(fd, "  Profile is INVALID");
-    }
-
-    /* card/device/direction */
-    dprintf(fd, "  card:%d, device:%d - %s\n",
-                profile->card, profile->device, profile->direction == PCM_OUT ? "OUT" : "IN");
-
-    /* formats */
-    dprintf(fd, "  Formats: ");
-    for (int fmtIndex = 0;
-          profile->formats[fmtIndex] != PCM_FORMAT_INVALID && fmtIndex < MAX_PROFILE_FORMATS;
-          fmtIndex++) {
-        dprintf(fd, "%d ", profile->formats[fmtIndex]);
-    }
-    dprintf(fd, "\n");
-
-    /* sample rates */
-    dprintf(fd, "  Rates: ");
-    for (int rateIndex = 0;
-          profile->sample_rates[rateIndex] != 0 && rateIndex < MAX_PROFILE_SAMPLE_RATES;
-          rateIndex++) {
-        dprintf(fd, "%u ", profile->sample_rates[rateIndex]);
-    }
-    dprintf(fd, "\n");
-
-    // channel counts
-    dprintf(fd, "  Channel Counts: ");
-    for (int cntIndex = 0;
-          profile->channel_counts[cntIndex] != 0 && cntIndex < MAX_PROFILE_CHANNEL_COUNTS;
-          cntIndex++) {
-        dprintf(fd, "%u ", profile->channel_counts[cntIndex]);
-    }
-    dprintf(fd, "\n");
-
-    dprintf(fd, "  min/max period size [%u : %u]\n",
-            profile->min_period_size,profile-> max_period_size);
-    dprintf(fd, "  min/max channel count [%u : %u]\n",
-            profile->min_channel_count, profile->max_channel_count);
-
-    // struct pcm_config default_config;
-    dprintf(fd, "  Default Config:\n");
-    dprintf(fd, "    channels: %d\n", profile->default_config.channels);
-    dprintf(fd, "    rate: %d\n", profile->default_config.rate);
-    dprintf(fd, "    period_size: %d\n", profile->default_config.period_size);
-    dprintf(fd, "    period_count: %d\n", profile->default_config.period_count);
-    dprintf(fd, "    format: %d\n", profile->default_config.format);
-}
index 7f56b04..ee92ed0 100644 (file)
@@ -218,17 +218,3 @@ int proxy_read(const alsa_device_proxy * proxy, void *data, unsigned int count)
 {
     return pcm_read(proxy->pcm, data, count);
 }
-
-/*
- * Debugging
- */
-void proxy_dump(const alsa_device_proxy* proxy, int fd)
-{
-    if (proxy != NULL) {
-        dprintf(fd, "  channels: %d\n", proxy->alsa_config.channels);
-        dprintf(fd, "  rate: %d\n", proxy->alsa_config.rate);
-        dprintf(fd, "  period_size: %d\n", proxy->alsa_config.period_size);
-        dprintf(fd, "  period_count: %d\n", proxy->alsa_config.period_count);
-        dprintf(fd, "  format: %d\n", proxy->alsa_config.format);
-    }
-}
index fcde7ac..5520b8a 100644 (file)
@@ -87,7 +87,4 @@ bool profile_is_channel_count_valid(alsa_device_profile* profile, unsigned count
 unsigned profile_calc_min_period_size(alsa_device_profile* profile, unsigned sample_rate);
 unsigned int profile_get_period_size(alsa_device_profile* profile, unsigned sample_rate);
 
-/* Debugging */
-void profile_dump(const alsa_device_profile* profile, int fd);
-
 #endif /* ANDROID_SYSTEM_MEDIA_ALSA_UTILS_ALSA_DEVICE_PROFILE_H */
index 0bc0731..e1ff8f5 100644 (file)
@@ -32,27 +32,24 @@ typedef struct {
     uint64_t transferred; /* the total frames transferred, not cleared on standby */
 } alsa_device_proxy;
 
-
-/* State */
 void proxy_prepare(alsa_device_proxy * proxy, alsa_device_profile * profile,
                    struct pcm_config * config);
-int proxy_open(alsa_device_proxy * proxy);
-void proxy_close(alsa_device_proxy * proxy);
-int proxy_get_presentation_position(const alsa_device_proxy * proxy,
-        uint64_t *frames, struct timespec *timestamp);
 
-/* Attributes */
 unsigned proxy_get_sample_rate(const alsa_device_proxy * proxy);
 enum pcm_format proxy_get_format(const alsa_device_proxy * proxy);
 unsigned proxy_get_channel_count(const alsa_device_proxy * proxy);
+
 unsigned int proxy_get_period_size(const alsa_device_proxy * proxy);
+
 unsigned proxy_get_latency(const alsa_device_proxy * proxy);
 
-/* I/O */
+int proxy_get_presentation_position(const alsa_device_proxy * proxy,
+        uint64_t *frames, struct timespec *timestamp);
+
+int proxy_open(alsa_device_proxy * proxy);
+void proxy_close(alsa_device_proxy * proxy);
+
 int proxy_write(alsa_device_proxy * proxy, const void *data, unsigned int count);
 int proxy_read(const alsa_device_proxy * proxy, void *data, unsigned int count);
 
-/* Debugging */
-void proxy_dump(const alsa_device_proxy * proxy, int fd);
-
 #endif /* ANDROID_SYSTEM_MEDIA_ALSA_UTILS_ALSA_DEVICE_PROXY_H */