aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/ac97_codec.c
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-10-04 05:17:22 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-04 10:55:32 -0400
commitd56b9b9c464a10ab1ee51a4c6190a2b57b8ef7a6 (patch)
treea48388734053900a8379042757ee241d1e9dfc7b /sound/oss/ac97_codec.c
parent595182bcdf64fbfd7ae22c67ea6081b7d387d246 (diff)
[PATCH] The scheduled removal of some OSS drivers
This patch contains the scheduled removal of OSS drivers that: - have ALSA drivers for the same hardware without known regressions and - whose Kconfig options have been removed in 2.6.17. [michal.k.k.piotrowski@gmail.com: build fix] Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/oss/ac97_codec.c')
-rw-r--r--sound/oss/ac97_codec.c89
1 files changed, 0 insertions, 89 deletions
diff --git a/sound/oss/ac97_codec.c b/sound/oss/ac97_codec.c
index 972327c97644..602db497929a 100644
--- a/sound/oss/ac97_codec.c
+++ b/sound/oss/ac97_codec.c
@@ -1399,95 +1399,6 @@ unsigned int ac97_set_adc_rate(struct ac97_codec *codec, unsigned int rate)
1399 1399
1400EXPORT_SYMBOL(ac97_set_adc_rate); 1400EXPORT_SYMBOL(ac97_set_adc_rate);
1401 1401
1402int ac97_save_state(struct ac97_codec *codec)
1403{
1404 return 0;
1405}
1406
1407EXPORT_SYMBOL(ac97_save_state);
1408
1409int ac97_restore_state(struct ac97_codec *codec)
1410{
1411 int i;
1412 unsigned int left, right, val;
1413
1414 for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
1415 if (!supported_mixer(codec, i))
1416 continue;
1417
1418 val = codec->mixer_state[i];
1419 right = val >> 8;
1420 left = val & 0xff;
1421 codec->write_mixer(codec, i, left, right);
1422 }
1423 return 0;
1424}
1425
1426EXPORT_SYMBOL(ac97_restore_state);
1427
1428/**
1429 * ac97_register_driver - register a codec helper
1430 * @driver: Driver handler
1431 *
1432 * Register a handler for codecs matching the codec id. The handler
1433 * attach function is called for all present codecs and will be
1434 * called when new codecs are discovered.
1435 */
1436
1437int ac97_register_driver(struct ac97_driver *driver)
1438{
1439 struct list_head *l;
1440 struct ac97_codec *c;
1441
1442 mutex_lock(&codec_mutex);
1443 INIT_LIST_HEAD(&driver->list);
1444 list_add(&driver->list, &codec_drivers);
1445
1446 list_for_each(l, &codecs)
1447 {
1448 c = list_entry(l, struct ac97_codec, list);
1449 if(c->driver != NULL || ((c->model ^ driver->codec_id) & driver->codec_mask))
1450 continue;
1451 if(driver->probe(c, driver))
1452 continue;
1453 c->driver = driver;
1454 }
1455 mutex_unlock(&codec_mutex);
1456 return 0;
1457}
1458
1459EXPORT_SYMBOL_GPL(ac97_register_driver);
1460
1461/**
1462 * ac97_unregister_driver - unregister a codec helper
1463 * @driver: Driver handler
1464 *
1465 * Unregister a handler for codecs matching the codec id. The handler
1466 * remove function is called for all matching codecs.
1467 */
1468
1469void ac97_unregister_driver(struct ac97_driver *driver)
1470{
1471 struct list_head *l;
1472 struct ac97_codec *c;
1473
1474 mutex_lock(&codec_mutex);
1475 list_del_init(&driver->list);
1476
1477 list_for_each(l, &codecs)
1478 {
1479 c = list_entry(l, struct ac97_codec, list);
1480 if (c->driver == driver) {
1481 driver->remove(c, driver);
1482 c->driver = NULL;
1483 }
1484 }
1485
1486 mutex_unlock(&codec_mutex);
1487}
1488
1489EXPORT_SYMBOL_GPL(ac97_unregister_driver);
1490
1491static int swap_headphone(int remove_master) 1402static int swap_headphone(int remove_master)
1492{ 1403{
1493 struct list_head *l; 1404 struct list_head *l;