aboutsummaryrefslogtreecommitdiffstats
path: root/sound/hda/hdac_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/hda/hdac_device.c')
-rw-r--r--sound/hda/hdac_device.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/sound/hda/hdac_device.c b/sound/hda/hdac_device.c
index 9f3e37511408..9a526aeef8da 100644
--- a/sound/hda/hdac_device.c
+++ b/sound/hda/hdac_device.c
@@ -57,6 +57,7 @@ int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus,
codec->addr = addr;
codec->type = HDA_DEV_CORE;
mutex_init(&codec->widget_lock);
+ mutex_init(&codec->regmap_lock);
pm_runtime_set_active(&codec->dev);
pm_runtime_get_noresume(&codec->dev);
atomic_set(&codec->in_pm, 0);
@@ -134,7 +135,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_device_exit);
/**
* snd_hdac_device_register - register the hd-audio codec base device
- * codec: the device to register
+ * @codec: the device to register
*/
int snd_hdac_device_register(struct hdac_device *codec)
{
@@ -157,7 +158,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_device_register);
/**
* snd_hdac_device_unregister - unregister the hd-audio codec base device
- * codec: the device to unregister
+ * @codec: the device to unregister
*/
void snd_hdac_device_unregister(struct hdac_device *codec)
{
@@ -280,6 +281,10 @@ EXPORT_SYMBOL_GPL(snd_hdac_read);
/**
* _snd_hdac_read_parm - read a parmeter
+ * @codec: the codec object
+ * @nid: NID to read a parameter
+ * @parm: parameter to read
+ * @res: pointer to store the read value
*
* This function returns zero or an error unlike snd_hdac_read_parm().
*/
@@ -637,7 +642,7 @@ struct hda_vendor_id {
const char *name;
};
-static struct hda_vendor_id hda_vendor_ids[] = {
+static const struct hda_vendor_id hda_vendor_ids[] = {
{ 0x1002, "ATI" },
{ 0x1013, "Cirrus Logic" },
{ 0x1057, "Motorola" },
@@ -692,7 +697,7 @@ struct hda_rate_tbl {
(AC_FMT_BASE_##base##K | (((mult) - 1) << AC_FMT_MULT_SHIFT) | \
(((div) - 1) << AC_FMT_DIV_SHIFT))
-static struct hda_rate_tbl rate_bits[] = {
+static const struct hda_rate_tbl rate_bits[] = {
/* rate in Hz, ALSA rate bitmask, HDA format value */
/* autodetected value used in snd_hda_query_supported_pcm */
@@ -1061,9 +1066,9 @@ EXPORT_SYMBOL_GPL(snd_hdac_check_power_state);
* snd_hdac_sync_power_state - wait until actual power state matches
* with the target state
*
- * @hdac: the HDAC device
+ * @codec: the HDAC device
* @nid: NID to send the command
- * @target_state: target state to check for
+ * @power_state: target power state to wait for
*
* Return power state or PS_ERROR if codec rejects GET verb.
*/