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.
This commit is contained in:
wm4 2014-12-20 16:54:00 +01:00
parent 5b32f30aa1
commit 0dc455eb16
1 changed files with 0 additions and 6 deletions

View File

@ -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);