ALSA: hda - Rename {override,cur}_pin with {user,driver}_pin
Rename from override_pin and cur_pin with user_pin and driver_pin,
respectively, to be a bit more intuitive.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt
index 9c51e10..f590850 100644
--- a/Documentation/sound/alsa/HD-Audio.txt
+++ b/Documentation/sound/alsa/HD-Audio.txt
@@ -371,16 +371,16 @@
not used.
init_pin_configs::
Shows the initial pin default config values set by BIOS.
-override_pin_configs::
- Shows the pin default config values to override the BIOS setup.
- Writing this (with two numbers, NID and value) appends the new
- value. The given will be used instead of the initial BIOS value at
- the next reconfiguration time.
-cur_pin_configs::
+driver_pin_configs::
Shows the pin default values set by the codec parser explicitly.
This doesn't show all pin values but only the changed values by
the parser. That is, if the parser doesn't change the pin default
config values by itself, this will contain nothing.
+user_pin_configs::
+ Shows the pin default config values to override the BIOS setup.
+ Writing this (with two numbers, NID and value) appends the new
+ value. The given will be used instead of the initial BIOS value at
+ the next reconfiguration time.
reconfig::
Triggers the codec re-configuration. When any value is written to
this file, the driver re-initialize and parses the codec tree
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 8ec2dfc..df9453d 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -755,7 +755,7 @@
int snd_hda_codec_set_pincfg(struct hda_codec *codec,
hda_nid_t nid, unsigned int cfg)
{
- return snd_hda_add_pincfg(codec, &codec->cur_pins, nid, cfg);
+ return snd_hda_add_pincfg(codec, &codec->driver_pins, nid, cfg);
}
EXPORT_SYMBOL_HDA(snd_hda_codec_set_pincfg);
@@ -764,11 +764,11 @@
{
struct hda_pincfg *pin;
- pin = look_up_pincfg(codec, &codec->cur_pins, nid);
+ pin = look_up_pincfg(codec, &codec->driver_pins, nid);
if (pin)
return pin->cfg;
#ifdef CONFIG_SND_HDA_HWDEP
- pin = look_up_pincfg(codec, &codec->override_pins, nid);
+ pin = look_up_pincfg(codec, &codec->user_pins, nid);
if (pin)
return pin->cfg;
#endif
@@ -797,12 +797,12 @@
/* restore the initial pin cfgs and release all pincfg lists */
static void restore_init_pincfgs(struct hda_codec *codec)
{
- /* first free cur_pins and override_pins, then call restore_pincfg
+ /* first free driver_pins and user_pins, then call restore_pincfg
* so that only the values in init_pins are restored
*/
- snd_array_free(&codec->cur_pins);
+ snd_array_free(&codec->driver_pins);
#ifdef CONFIG_SND_HDA_HWDEP
- snd_array_free(&codec->override_pins);
+ snd_array_free(&codec->user_pins);
#endif
restore_pincfgs(codec);
snd_array_free(&codec->init_pins);
@@ -874,7 +874,7 @@
init_hda_cache(&codec->cmd_cache, sizeof(struct hda_cache_head));
snd_array_init(&codec->mixers, sizeof(struct snd_kcontrol *), 32);
snd_array_init(&codec->init_pins, sizeof(struct hda_pincfg), 16);
- snd_array_init(&codec->cur_pins, sizeof(struct hda_pincfg), 16);
+ snd_array_init(&codec->driver_pins, sizeof(struct hda_pincfg), 16);
if (codec->bus->modelname) {
codec->modelname = kstrdup(codec->bus->modelname, GFP_KERNEL);
if (!codec->modelname) {
@@ -1463,8 +1463,8 @@
free_hda_cache(&codec->cmd_cache);
init_hda_cache(&codec->amp_cache, sizeof(struct hda_amp_info));
init_hda_cache(&codec->cmd_cache, sizeof(struct hda_cache_head));
- /* free only cur_pins so that init_pins + override_pins are restored */
- snd_array_free(&codec->cur_pins);
+ /* free only driver_pins so that init_pins + user_pins are restored */
+ snd_array_free(&codec->driver_pins);
restore_pincfgs(codec);
codec->num_pcms = 0;
codec->pcm_info = NULL;
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 6d01a80..2ea6284 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -779,13 +779,13 @@
unsigned int spdif_in_enable; /* SPDIF input enable? */
hda_nid_t *slave_dig_outs; /* optional digital out slave widgets */
struct snd_array init_pins; /* initial (BIOS) pin configurations */
- struct snd_array cur_pins; /* current pin configurations */
+ struct snd_array driver_pins; /* pin configs set by codec parser */
#ifdef CONFIG_SND_HDA_HWDEP
struct snd_hwdep *hwdep; /* assigned hwdep device */
struct snd_array init_verbs; /* additional init verbs */
struct snd_array hints; /* additional hints */
- struct snd_array override_pins; /* default pin configs to override */
+ struct snd_array user_pins; /* default pin configs to override */
#endif
/* misc flags */
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c
index 71039a6..c660383 100644
--- a/sound/pci/hda/hda_hwdep.c
+++ b/sound/pci/hda/hda_hwdep.c
@@ -109,7 +109,7 @@
for (i = 0; i < codec->hints.used; i++, head++)
kfree(*head);
snd_array_free(&codec->hints);
- snd_array_free(&codec->override_pins);
+ snd_array_free(&codec->user_pins);
}
static void hwdep_free(struct snd_hwdep *hwdep)
@@ -142,7 +142,7 @@
snd_array_init(&codec->init_verbs, sizeof(struct hda_verb), 32);
snd_array_init(&codec->hints, sizeof(char *), 32);
- snd_array_init(&codec->override_pins, sizeof(struct hda_pincfg), 16);
+ snd_array_init(&codec->user_pins, sizeof(struct hda_pincfg), 16);
return 0;
}
@@ -340,29 +340,29 @@
return pin_configs_show(codec, &codec->init_pins, buf);
}
-static ssize_t override_pin_configs_show(struct device *dev,
- struct device_attribute *attr,
- char *buf)
+static ssize_t user_pin_configs_show(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
{
struct snd_hwdep *hwdep = dev_get_drvdata(dev);
struct hda_codec *codec = hwdep->private_data;
- return pin_configs_show(codec, &codec->override_pins, buf);
+ return pin_configs_show(codec, &codec->user_pins, buf);
}
-static ssize_t cur_pin_configs_show(struct device *dev,
- struct device_attribute *attr,
- char *buf)
+static ssize_t driver_pin_configs_show(struct device *dev,
+ struct device_attribute *attr,
+ char *buf)
{
struct snd_hwdep *hwdep = dev_get_drvdata(dev);
struct hda_codec *codec = hwdep->private_data;
- return pin_configs_show(codec, &codec->cur_pins, buf);
+ return pin_configs_show(codec, &codec->driver_pins, buf);
}
#define MAX_PIN_CONFIGS 32
-static ssize_t override_pin_configs_store(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t count)
+static ssize_t user_pin_configs_store(struct device *dev,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
{
struct snd_hwdep *hwdep = dev_get_drvdata(dev);
struct hda_codec *codec = hwdep->private_data;
@@ -373,7 +373,7 @@
return -EINVAL;
if (!nid)
return -EINVAL;
- err = snd_hda_add_pincfg(codec, &codec->override_pins, nid, cfg);
+ err = snd_hda_add_pincfg(codec, &codec->user_pins, nid, cfg);
if (err < 0)
return err;
return count;
@@ -397,8 +397,8 @@
CODEC_ATTR_WO(init_verbs),
CODEC_ATTR_WO(hints),
CODEC_ATTR_RO(init_pin_configs),
- CODEC_ATTR_RW(override_pin_configs),
- CODEC_ATTR_RO(cur_pin_configs),
+ CODEC_ATTR_RW(user_pin_configs),
+ CODEC_ATTR_RO(driver_pin_configs),
CODEC_ATTR_WO(reconfig),
CODEC_ATTR_WO(clear),
};