From 0dc455eb16320b602f2e670d9173f3b6b826b249 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 20 Dec 2014 16:54:00 +0100 Subject: ao_alsa: remove some dead code This was only added recently (c1e97161) as an attempt to minimize the bad impact of channel layout device aliases. But use of these was removed in commit 49df0132. Now this code does pretty much nothing, and shouldn't be needed anymore. It does something when using spdif, but this fallback won't work anyway. --- audio/out/ao_alsa.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'audio/out') diff --git a/audio/out/ao_alsa.c b/audio/out/ao_alsa.c index f3e8c8cd68..80f6ebf099 100644 --- a/audio/out/ao_alsa.c +++ b/audio/out/ao_alsa.c @@ -416,21 +416,15 @@ static int init_device(struct ao *ao) MP_VERBOSE(ao, "playing AC3/iec61937/iec958, %i channels\n", ao->channels.num); } - const char *old_dev = device; if (ao->device) device = ao->device; if (p->cfg_device && p->cfg_device[0]) device = p->cfg_device; - bool user_set_device = device != old_dev; // not strcmp() MP_VERBOSE(ao, "using device: %s\n", device); MP_VERBOSE(ao, "using ALSA version: %s\n", snd_asoundlib_version()); err = try_open_device(ao, device); - if (err == -EBUSY && !user_set_device && strcmp(device, "default") != 0) { - MP_WARN(ao, "Device '%s' busy, retrying default.\n", device); - err = try_open_device(ao, "default"); - } CHECK_ALSA_ERROR("Playback open error"); err = snd_pcm_nonblock(p->alsa, 0); -- cgit v1.2.3