Driver rewritten, assign copyright notice and change module author
as original one remains silent and I want to be notified about bugs.
Signed-off-by: Ladislav Michl <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Sound capture and line bypass currently do not work as well as
some mixer controls. Fix that by building proper audio paths and
adjusting volume controls to match datasheet.
Signed-off-by: Ladislav Michl <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Drop "Common NI Values Table" and calculate LRCLK divider, then
add allowed rate constraints based on master clock frequency.
Signed-off-by: Ladislav Michl <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Implement set_bias_level to drive shutdown bit, so device is
put to sleep when unused.
Signed-off-by: Ladislav Michl <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Codes is stereo only with playback and capture streams bind
to the same rate.
Signed-off-by: Ladislav Michl <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Tell user what are clock rate limits and reindent log messages.
Signed-off-by: Ladislav Michl <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
snd_soc_dai_ops are not supposed to change at runtime. All functions
working with snd_soc_dai_ops provided by <sound/soc-dai.h> work with
const snd_soc_dai_ops. So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Declare snd_soc_codec_driver structures as const as they are only passed
as an argument to the function snd_soc_register_codec. This argument is
of type const, so declare the structures with this property as const.
In file codecs/sn95031.c, snd_soc_codec_driver structure is also used in
a copy operation along with getting passed to snd_soc_register_codec.
So, it can be made const too.
Done using Coccinelle:
@match disable optional_qualifier@
identifier s;
position p;
@@
static struct snd_soc_codec_driver s@p={...};
@good1@
identifier match.s;
position p;
@@
snd_soc_register_codec(...,&s@p,...)
@bad@
identifier match.s;
position p!={match.p,good1.p};
@@
s@p
@depends on !bad disable optional_qualifier@
identifier match.s;
@@
static
+const
struct snd_soc_codec_driver s={...};
Signed-off-by: Bhumika Goyal <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The array ni_div does not need to be in global scope and is not
modified, so make it static const.
Cleans up sparse warning:
"symbol 'ni_div' was not declared. Should it be static?"
Signed-off-by: Colin Ian King <[email protected]>
Acked-By: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
The I2C core always reports a MODALIAS of the form i2c:<foo> even if the
device was registered via OF, this means that exporting the OF device ID
table device aliases in the module is not needed. But in order to change
how the core reports modaliases to user-space, it's better to export it.
While there, move the MODULE_DEVICE_TABLE(i2c, max9867_i2c_id) just next
to the I2C device table declaration, for consistency with other drivers.
Before this patch:
$ modinfo sound/soc/codecs/snd-soc-max9867.ko | grep alias
alias: i2c:max9867
After this patch:
$ modinfo sound/soc/codecs/snd-soc-max9867.ko | grep alias
alias: i2c:max9867
alias: of:N*T*Cmaxim,max9867C*
alias: of:N*T*Cmaxim,max9867
Signed-off-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
In max9867_dai_set_fmt(), 'ret' is initialized as return value of
regmap_raw_write() but never checked, so remove this and assignement.
sound/soc/codecs/max9867.c: In function ‘max9867_dai_set_fmt’:
sound/soc/codecs/max9867.c:312:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable]
int ret;
Signed-off-by: Vinod Koul <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
TLV_DB_RANGE_HEAD macro was obsoleted by commit bf1d1c9b61 ("ALSA: tlv:
add DECLARE_TLV_DB_RANGE()").
This commit removes usage of the macro, with the obsoleting macro renamed
to SNDRV_CTL_TLVD_DECLARE_DB_RANGE().
Signed-off-by: Takashi Sakamoto <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
codec driver and component driver has duplicated callback functions,
and codec side functions are just copied to component side when
register timing. This was quick-hack, but no longer needed.
This patch moves these functions from codec driver to component driver.
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Change file permissions of source files max9867.c/h from 0755 to 0644.
Signed-off-by: Enric Balletbo i Serra <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
Smatch complains that we might reach the end of this loop without
finding what we're looking for leading to a buffer overflow.
Signed-off-by: Dan Carpenter <[email protected]>
Reviewed-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
value variable can contain error values and is compared with zero.
Its type must be signed.
The problem has been detected using coccinelle script
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci
Signed-off-by: Andrzej Hajda <[email protected]>
Reviewed-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>