diff options
Diffstat (limited to 'sound/oss/ac97_codec.c')
-rw-r--r-- | sound/oss/ac97_codec.c | 89 |
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 | ||
1400 | EXPORT_SYMBOL(ac97_set_adc_rate); | 1400 | EXPORT_SYMBOL(ac97_set_adc_rate); |
1401 | 1401 | ||
1402 | int ac97_save_state(struct ac97_codec *codec) | ||
1403 | { | ||
1404 | return 0; | ||
1405 | } | ||
1406 | |||
1407 | EXPORT_SYMBOL(ac97_save_state); | ||
1408 | |||
1409 | int 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 | |||
1426 | EXPORT_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 | |||
1437 | int 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 | |||
1459 | EXPORT_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 | |||
1469 | void 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 | |||
1489 | EXPORT_SYMBOL_GPL(ac97_unregister_driver); | ||
1490 | |||
1491 | static int swap_headphone(int remove_master) | 1402 | static int swap_headphone(int remove_master) |
1492 | { | 1403 | { |
1493 | struct list_head *l; | 1404 | struct list_head *l; |