diff options
Diffstat (limited to 'sound/pci/ice1712')
-rw-r--r-- | sound/pci/ice1712/psc724.c | 4 | ||||
-rw-r--r-- | sound/pci/ice1712/quartet.c | 2 | ||||
-rw-r--r-- | sound/pci/ice1712/wm8766.c | 3 | ||||
-rw-r--r-- | sound/pci/ice1712/wm8776.c | 5 |
4 files changed, 9 insertions, 5 deletions
diff --git a/sound/pci/ice1712/psc724.c b/sound/pci/ice1712/psc724.c index 302ac6ddd545..4019cf27d117 100644 --- a/sound/pci/ice1712/psc724.c +++ b/sound/pci/ice1712/psc724.c @@ -203,12 +203,12 @@ static void psc724_set_jack_state(struct snd_ice1712 *ice, bool hp_connected) /* notify about master speaker mute change */ memset(&elem_id, 0, sizeof(elem_id)); elem_id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; - strncpy(elem_id.name, "Master Speakers Playback Switch", + strlcpy(elem_id.name, "Master Speakers Playback Switch", sizeof(elem_id.name)); kctl = snd_ctl_find_id(ice->card, &elem_id); snd_ctl_notify(ice->card, SNDRV_CTL_EVENT_MASK_VALUE, &kctl->id); /* and headphone mute change */ - strncpy(elem_id.name, spec->wm8776.ctl[WM8776_CTL_HP_SW].name, + strlcpy(elem_id.name, spec->wm8776.ctl[WM8776_CTL_HP_SW].name, sizeof(elem_id.name)); kctl = snd_ctl_find_id(ice->card, &elem_id); snd_ctl_notify(ice->card, SNDRV_CTL_EVENT_MASK_VALUE, &kctl->id); diff --git a/sound/pci/ice1712/quartet.c b/sound/pci/ice1712/quartet.c index 975e0357bd5a..71c6003ef338 100644 --- a/sound/pci/ice1712/quartet.c +++ b/sound/pci/ice1712/quartet.c @@ -203,6 +203,7 @@ static const char * const ext_clock_names[3] = {"IEC958 In", "Word Clock 1xFS", #define AK4620_DEEMVOL_REG 0x03 #define AK4620_SMUTE (1<<7) +#ifdef CONFIG_PROC_FS /* * Conversion from int value to its binary form. Used for debugging. * The output buffer must be allocated prior to calling the function. @@ -227,6 +228,7 @@ static char *get_binary(char *buffer, int value) buffer[pos] = '\0'; return buffer; } +#endif /* CONFIG_PROC_FS */ /* * Initial setup of the conversion array GPIO <-> rate diff --git a/sound/pci/ice1712/wm8766.c b/sound/pci/ice1712/wm8766.c index e473f8a88f9c..21b373b2e260 100644 --- a/sound/pci/ice1712/wm8766.c +++ b/sound/pci/ice1712/wm8766.c @@ -253,7 +253,8 @@ static int snd_wm8766_ctl_get(struct snd_kcontrol *kcontrol, } if (wm->ctl[n].flags & WM8766_FLAG_INVERT) { val1 = wm->ctl[n].max - (val1 - wm->ctl[n].min); - val2 = wm->ctl[n].max - (val2 - wm->ctl[n].min); + if (wm->ctl[n].flags & WM8766_FLAG_STEREO) + val2 = wm->ctl[n].max - (val2 - wm->ctl[n].min); } ucontrol->value.integer.value[0] = val1; if (wm->ctl[n].flags & WM8766_FLAG_STEREO) diff --git a/sound/pci/ice1712/wm8776.c b/sound/pci/ice1712/wm8776.c index a3c05fe5daf9..e66c0da62014 100644 --- a/sound/pci/ice1712/wm8776.c +++ b/sound/pci/ice1712/wm8776.c @@ -52,7 +52,7 @@ static void snd_wm8776_activate_ctl(struct snd_wm8776 *wm, unsigned int index_offset; memset(&elem_id, 0, sizeof(elem_id)); - strncpy(elem_id.name, ctl_name, sizeof(elem_id.name)); + strlcpy(elem_id.name, ctl_name, sizeof(elem_id.name)); elem_id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; kctl = snd_ctl_find_id(card, &elem_id); if (!kctl) @@ -526,7 +526,8 @@ static int snd_wm8776_ctl_get(struct snd_kcontrol *kcontrol, } if (wm->ctl[n].flags & WM8776_FLAG_INVERT) { val1 = wm->ctl[n].max - (val1 - wm->ctl[n].min); - val2 = wm->ctl[n].max - (val2 - wm->ctl[n].min); + if (wm->ctl[n].flags & WM8776_FLAG_STEREO) + val2 = wm->ctl[n].max - (val2 - wm->ctl[n].min); } ucontrol->value.integer.value[0] = val1; if (wm->ctl[n].flags & WM8776_FLAG_STEREO) |