uda1380.c (beb8962210f592bd285ed77559ac4458cc26f774) uda1380.c (5ee0b8f8296f237604f0ff72f03e7836f5e164b4)
1/*
2 * uda1380.c - Philips UDA1380 ALSA SoC audio driver
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * Copyright (c) 2007-2009 Philipp Zabel <philipp.zabel@gmail.com>

--- 255 unchanged lines hidden (view full) ---

264 */
265static DECLARE_TLV_DB_SCALE(amix_tlv, -4950, 150, 1);
266
267/*
268 * from -78 dB in 1 dB steps (3 dB steps, really. LSB are ignored),
269 * from -66 dB in 0.5 dB steps (2 dB steps, really) and
270 * from -52 dB in 0.25 dB steps
271 */
1/*
2 * uda1380.c - Philips UDA1380 ALSA SoC audio driver
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * Copyright (c) 2007-2009 Philipp Zabel <philipp.zabel@gmail.com>

--- 255 unchanged lines hidden (view full) ---

264 */
265static DECLARE_TLV_DB_SCALE(amix_tlv, -4950, 150, 1);
266
267/*
268 * from -78 dB in 1 dB steps (3 dB steps, really. LSB are ignored),
269 * from -66 dB in 0.5 dB steps (2 dB steps, really) and
270 * from -52 dB in 0.25 dB steps
271 */
272static const unsigned int mvol_tlv[] = {
273 TLV_DB_RANGE_HEAD(3),
272static const DECLARE_TLV_DB_RANGE(mvol_tlv,
274 0, 15, TLV_DB_SCALE_ITEM(-8200, 100, 1),
275 16, 43, TLV_DB_SCALE_ITEM(-6600, 50, 0),
273 0, 15, TLV_DB_SCALE_ITEM(-8200, 100, 1),
274 16, 43, TLV_DB_SCALE_ITEM(-6600, 50, 0),
276 44, 252, TLV_DB_SCALE_ITEM(-5200, 25, 0),
277};
275 44, 252, TLV_DB_SCALE_ITEM(-5200, 25, 0)
276);
278
279/*
280 * from -72 dB in 1.5 dB steps (6 dB steps really),
281 * from -66 dB in 0.75 dB steps (3 dB steps really),
282 * from -60 dB in 0.5 dB steps (2 dB steps really) and
283 * from -46 dB in 0.25 dB steps
284 */
277
278/*
279 * from -72 dB in 1.5 dB steps (6 dB steps really),
280 * from -66 dB in 0.75 dB steps (3 dB steps really),
281 * from -60 dB in 0.5 dB steps (2 dB steps really) and
282 * from -46 dB in 0.25 dB steps
283 */
285static const unsigned int vc_tlv[] = {
286 TLV_DB_RANGE_HEAD(4),
284static const DECLARE_TLV_DB_RANGE(vc_tlv,
287 0, 7, TLV_DB_SCALE_ITEM(-7800, 150, 1),
288 8, 15, TLV_DB_SCALE_ITEM(-6600, 75, 0),
289 16, 43, TLV_DB_SCALE_ITEM(-6000, 50, 0),
285 0, 7, TLV_DB_SCALE_ITEM(-7800, 150, 1),
286 8, 15, TLV_DB_SCALE_ITEM(-6600, 75, 0),
287 16, 43, TLV_DB_SCALE_ITEM(-6000, 50, 0),
290 44, 228, TLV_DB_SCALE_ITEM(-4600, 25, 0),
291};
288 44, 228, TLV_DB_SCALE_ITEM(-4600, 25, 0)
289);
292
293/* from 0 to 6 dB in 2 dB steps if SPF mode != flat */
294static DECLARE_TLV_DB_SCALE(tr_tlv, 0, 200, 0);
295
296/* from 0 to 24 dB in 2 dB steps, if SPF mode == maximum, otherwise cuts
297 * off at 18 dB max) */
298static DECLARE_TLV_DB_SCALE(bb_tlv, 0, 200, 0);
299

--- 505 unchanged lines hidden (view full) ---

805 { "uda1380", 0 },
806 { }
807};
808MODULE_DEVICE_TABLE(i2c, uda1380_i2c_id);
809
810static struct i2c_driver uda1380_i2c_driver = {
811 .driver = {
812 .name = "uda1380-codec",
290
291/* from 0 to 6 dB in 2 dB steps if SPF mode != flat */
292static DECLARE_TLV_DB_SCALE(tr_tlv, 0, 200, 0);
293
294/* from 0 to 24 dB in 2 dB steps, if SPF mode == maximum, otherwise cuts
295 * off at 18 dB max) */
296static DECLARE_TLV_DB_SCALE(bb_tlv, 0, 200, 0);
297

--- 505 unchanged lines hidden (view full) ---

803 { "uda1380", 0 },
804 { }
805};
806MODULE_DEVICE_TABLE(i2c, uda1380_i2c_id);
807
808static struct i2c_driver uda1380_i2c_driver = {
809 .driver = {
810 .name = "uda1380-codec",
811 .owner = THIS_MODULE,
813 },
814 .probe = uda1380_i2c_probe,
815 .remove = uda1380_i2c_remove,
816 .id_table = uda1380_i2c_id,
817};
818#endif
819
820static int __init uda1380_modinit(void)

--- 22 unchanged lines hidden ---
812 },
813 .probe = uda1380_i2c_probe,
814 .remove = uda1380_i2c_remove,
815 .id_table = uda1380_i2c_id,
816};
817#endif
818
819static int __init uda1380_modinit(void)

--- 22 unchanged lines hidden ---