@@ -86,14 +86,14 @@ struct alsa_stream_out {
|
||||
|
||||
static int probe_pcm_out_card() {
|
||||
FILE *fp;
|
||||
char card_node[] = "/proc/asound/card0/id";
|
||||
char card_node[32];
|
||||
char card_id[16];
|
||||
|
||||
char card_prop[PROPERTY_VALUE_MAX];
|
||||
property_get("persist.audio.device", card_prop, "");
|
||||
|
||||
for (int i = 0; i < 5; i++) {
|
||||
card_node[17] = i + '0';
|
||||
snprintf(card_node, sizeof(card_node), "/proc/asound/card%d/id", i);
|
||||
if ((fp = fopen(card_node, "r")) != NULL) {
|
||||
fgets(card_id, sizeof(card_id), fp);
|
||||
ALOGV("%s: %s", card_node, card_id);
|
||||
|
Reference in New Issue
Block a user