|
@@ -383,7 +383,7 @@ static void hda_free_jack_priv(struct snd_jack *jack)
|
|
* This assigns a jack-detection kctl to the given pin. The kcontrol
|
|
* This assigns a jack-detection kctl to the given pin. The kcontrol
|
|
* will have the given name and index.
|
|
* will have the given name and index.
|
|
*/
|
|
*/
|
|
-static int __snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
|
|
|
|
|
|
+int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
|
|
const char *name, bool phantom_jack)
|
|
const char *name, bool phantom_jack)
|
|
{
|
|
{
|
|
struct hda_jack_tbl *jack;
|
|
struct hda_jack_tbl *jack;
|
|
@@ -410,20 +410,6 @@ static int __snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
-
|
|
|
|
-/**
|
|
|
|
- * snd_hda_jack_add_kctl - Add a jack kctl for the given pin
|
|
|
|
- * @codec: the HDA codec
|
|
|
|
- * @nid: pin NID
|
|
|
|
- * @name: the name string for the jack ctl
|
|
|
|
- *
|
|
|
|
- * This is a simple helper calling __snd_hda_jack_add_kctl().
|
|
|
|
- */
|
|
|
|
-int snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
|
|
|
|
- const char *name)
|
|
|
|
-{
|
|
|
|
- return __snd_hda_jack_add_kctl(codec, nid, name, false);
|
|
|
|
-}
|
|
|
|
EXPORT_SYMBOL_GPL(snd_hda_jack_add_kctl);
|
|
EXPORT_SYMBOL_GPL(snd_hda_jack_add_kctl);
|
|
|
|
|
|
static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid,
|
|
static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid,
|
|
@@ -451,7 +437,7 @@ static int add_jack_kctl(struct hda_codec *codec, hda_nid_t nid,
|
|
if (phantom_jack)
|
|
if (phantom_jack)
|
|
/* Example final name: "Internal Mic Phantom Jack" */
|
|
/* Example final name: "Internal Mic Phantom Jack" */
|
|
strncat(name, " Phantom", sizeof(name) - strlen(name) - 1);
|
|
strncat(name, " Phantom", sizeof(name) - strlen(name) - 1);
|
|
- err = __snd_hda_jack_add_kctl(codec, nid, name, phantom_jack);
|
|
|
|
|
|
+ err = snd_hda_jack_add_kctl(codec, nid, name, phantom_jack);
|
|
if (err < 0)
|
|
if (err < 0)
|
|
return err;
|
|
return err;
|
|
|
|
|