pcm1681.c (1c07a4de5baad76585f7ffb86b5b0bc34c33e8a6) | pcm1681.c (fa8173a3ef0570affde7da352de202190b3786c2) |
---|---|
1/* 2 * PCM1681 ASoC codec driver 3 * 4 * Copyright (c) StreamUnlimited GmbH 2013 5 * Marek Belisko <marek.belisko@streamunlimited.com> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 88 unchanged lines hidden (view full) --- 97 98 if (priv->deemph) 99 for (i = 0; i < ARRAY_SIZE(pcm1681_deemph); i++) 100 if (pcm1681_deemph[i] == priv->rate) 101 val = i; 102 103 if (val != -1) { 104 regmap_update_bits(priv->regmap, PCM1681_DEEMPH_CONTROL, | 1/* 2 * PCM1681 ASoC codec driver 3 * 4 * Copyright (c) StreamUnlimited GmbH 2013 5 * Marek Belisko <marek.belisko@streamunlimited.com> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 88 unchanged lines hidden (view full) --- 97 98 if (priv->deemph) 99 for (i = 0; i < ARRAY_SIZE(pcm1681_deemph); i++) 100 if (pcm1681_deemph[i] == priv->rate) 101 val = i; 102 103 if (val != -1) { 104 regmap_update_bits(priv->regmap, PCM1681_DEEMPH_CONTROL, |
105 PCM1681_DEEMPH_RATE_MASK, val); | 105 PCM1681_DEEMPH_RATE_MASK, val << 3); |
106 enable = 1; 107 } else 108 enable = 0; 109 110 /* enable/disable deemphasis functionality */ 111 return regmap_update_bits(priv->regmap, PCM1681_DEEMPH_CONTROL, 112 PCM1681_DEEMPH_MASK, enable); 113} --- 211 unchanged lines hidden (view full) --- 325{ 326 snd_soc_unregister_codec(&client->dev); 327 return 0; 328} 329 330static struct i2c_driver pcm1681_i2c_driver = { 331 .driver = { 332 .name = "pcm1681", | 106 enable = 1; 107 } else 108 enable = 0; 109 110 /* enable/disable deemphasis functionality */ 111 return regmap_update_bits(priv->regmap, PCM1681_DEEMPH_CONTROL, 112 PCM1681_DEEMPH_MASK, enable); 113} --- 211 unchanged lines hidden (view full) --- 325{ 326 snd_soc_unregister_codec(&client->dev); 327 return 0; 328} 329 330static struct i2c_driver pcm1681_i2c_driver = { 331 .driver = { 332 .name = "pcm1681", |
333 .owner = THIS_MODULE, |
|
333 .of_match_table = of_match_ptr(pcm1681_dt_ids), 334 }, 335 .id_table = pcm1681_i2c_id, 336 .probe = pcm1681_i2c_probe, 337 .remove = pcm1681_i2c_remove, 338}; 339 340module_i2c_driver(pcm1681_i2c_driver); 341 342MODULE_DESCRIPTION("Texas Instruments PCM1681 ALSA SoC Codec Driver"); 343MODULE_AUTHOR("Marek Belisko <marek.belisko@streamunlimited.com>"); 344MODULE_LICENSE("GPL"); | 334 .of_match_table = of_match_ptr(pcm1681_dt_ids), 335 }, 336 .id_table = pcm1681_i2c_id, 337 .probe = pcm1681_i2c_probe, 338 .remove = pcm1681_i2c_remove, 339}; 340 341module_i2c_driver(pcm1681_i2c_driver); 342 343MODULE_DESCRIPTION("Texas Instruments PCM1681 ALSA SoC Codec Driver"); 344MODULE_AUTHOR("Marek Belisko <marek.belisko@streamunlimited.com>"); 345MODULE_LICENSE("GPL"); |