]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ALSA: hda - Remove channel mode helper functions
authorTakashi Iwai <tiwai@suse.de>
Thu, 26 Feb 2015 08:42:04 +0000 (09:42 +0100)
committerTakashi Iwai <tiwai@suse.de>
Thu, 26 Feb 2015 14:37:10 +0000 (15:37 +0100)
They are no longer used, let's kill them.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_local.h

index 6580a367023e255e07a701309b4c1ec738cfe7ea..db86b446743c9173fba0dfcc1927e7b288730740 100644 (file)
@@ -4843,88 +4843,6 @@ int snd_hda_check_amp_list_power(struct hda_codec *codec,
 EXPORT_SYMBOL_GPL(snd_hda_check_amp_list_power);
 #endif
 
-/*
- * Channel mode helper
- */
-
-/**
- * snd_hda_ch_mode_info - Info callback helper for the channel mode enum
- * @codec: the HDA codec
- * @uinfo: pointer to get/store the data
- * @chmode: channel mode array
- * @num_chmodes: channel mode array size
- */
-int snd_hda_ch_mode_info(struct hda_codec *codec,
-                        struct snd_ctl_elem_info *uinfo,
-                        const struct hda_channel_mode *chmode,
-                        int num_chmodes)
-{
-       uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
-       uinfo->count = 1;
-       uinfo->value.enumerated.items = num_chmodes;
-       if (uinfo->value.enumerated.item >= num_chmodes)
-               uinfo->value.enumerated.item = num_chmodes - 1;
-       sprintf(uinfo->value.enumerated.name, "%dch",
-               chmode[uinfo->value.enumerated.item].channels);
-       return 0;
-}
-EXPORT_SYMBOL_GPL(snd_hda_ch_mode_info);
-
-/**
- * snd_hda_ch_mode_get - Get callback helper for the channel mode enum
- * @codec: the HDA codec
- * @ucontrol: pointer to get/store the data
- * @chmode: channel mode array
- * @num_chmodes: channel mode array size
- * @max_channels: max number of channels
- */
-int snd_hda_ch_mode_get(struct hda_codec *codec,
-                       struct snd_ctl_elem_value *ucontrol,
-                       const struct hda_channel_mode *chmode,
-                       int num_chmodes,
-                       int max_channels)
-{
-       int i;
-
-       for (i = 0; i < num_chmodes; i++) {
-               if (max_channels == chmode[i].channels) {
-                       ucontrol->value.enumerated.item[0] = i;
-                       break;
-               }
-       }
-       return 0;
-}
-EXPORT_SYMBOL_GPL(snd_hda_ch_mode_get);
-
-/**
- * snd_hda_ch_mode_put - Put callback helper for the channel mode enum
- * @codec: the HDA codec
- * @ucontrol: pointer to get/store the data
- * @chmode: channel mode array
- * @num_chmodes: channel mode array size
- * @max_channelsp: pointer to store the max channels
- */
-int snd_hda_ch_mode_put(struct hda_codec *codec,
-                       struct snd_ctl_elem_value *ucontrol,
-                       const struct hda_channel_mode *chmode,
-                       int num_chmodes,
-                       int *max_channelsp)
-{
-       unsigned int mode;
-
-       mode = ucontrol->value.enumerated.item[0];
-       if (mode >= num_chmodes)
-               return -EINVAL;
-       if (*max_channelsp == chmode[mode].channels)
-               return 0;
-       /* change the current channel setting */
-       *max_channelsp = chmode[mode].channels;
-       if (chmode[mode].sequence)
-               snd_hda_sequence_write_cache(codec, chmode[mode].sequence);
-       return 1;
-}
-EXPORT_SYMBOL_GPL(snd_hda_ch_mode_put);
-
 /*
  * input MUX helper
  */
index 2f7d9646a41d5cbb382d78ea7ccc503199c5c181..8588813163e31dfae059ff9a3d3465fa51db1dfb 100644 (file)
@@ -272,29 +272,6 @@ int snd_hda_add_imux_item(struct hda_codec *codec,
                          struct hda_input_mux *imux, const char *label,
                          int index, int *type_index_ret);
 
-/*
- * Channel mode helper
- */
-struct hda_channel_mode {
-       int channels;
-       const struct hda_verb *sequence;
-};
-
-int snd_hda_ch_mode_info(struct hda_codec *codec,
-                        struct snd_ctl_elem_info *uinfo,
-                        const struct hda_channel_mode *chmode,
-                        int num_chmodes);
-int snd_hda_ch_mode_get(struct hda_codec *codec,
-                       struct snd_ctl_elem_value *ucontrol,
-                       const struct hda_channel_mode *chmode,
-                       int num_chmodes,
-                       int max_channels);
-int snd_hda_ch_mode_put(struct hda_codec *codec,
-                       struct snd_ctl_elem_value *ucontrol,
-                       const struct hda_channel_mode *chmode,
-                       int num_chmodes,
-                       int *max_channelsp);
-
 /*
  * Multi-channel / digital-out PCM helper
  */