mixer.c (64d85ef7506737f55bec0ba2dc06ed9b8772b8c4) | mixer.c (ca33ae23676ebf7de40142b16bf20bc88258c92f) |
---|---|
1/* 2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 286 unchanged lines hidden (view full) --- 295{ 296 char devname[32]; 297 int error, dev; 298 struct snd_mixer *m; 299 300 m = oidp->oid_arg1; 301 snd_mtxlock(m->lock); 302 strncpy(devname, snd_mixernames[m->hwvol_mixer], sizeof(devname)); | 1/* 2 * Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 286 unchanged lines hidden (view full) --- 295{ 296 char devname[32]; 297 int error, dev; 298 struct snd_mixer *m; 299 300 m = oidp->oid_arg1; 301 snd_mtxlock(m->lock); 302 strncpy(devname, snd_mixernames[m->hwvol_mixer], sizeof(devname)); |
303 snd_mtxunlock(m->lock); |
|
303 error = sysctl_handle_string(oidp, &devname[0], sizeof(devname), req); | 304 error = sysctl_handle_string(oidp, &devname[0], sizeof(devname), req); |
305 snd_mtxlock(m->lock); |
|
304 if (error == 0 && req->newptr != NULL) { 305 dev = mixer_lookup(devname); 306 if (dev == -1) { 307 snd_mtxunlock(m->lock); 308 return EINVAL; 309 } 310 else if (dev != m->hwvol_mixer) { 311 m->hwvol_mixer = dev; --- 206 unchanged lines hidden --- | 306 if (error == 0 && req->newptr != NULL) { 307 dev = mixer_lookup(devname); 308 if (dev == -1) { 309 snd_mtxunlock(m->lock); 310 return EINVAL; 311 } 312 else if (dev != m->hwvol_mixer) { 313 m->hwvol_mixer = dev; --- 206 unchanged lines hidden --- |