diff mbox series

[4.19,267/346] ALSA: hda/ca0132 - Change Input Source enum strings.

Message ID 20201228124932.680293903@linuxfoundation.org
State Superseded
Headers show
Series None | expand

Commit Message

Greg Kroah-Hartman Dec. 28, 2020, 12:49 p.m. UTC
From: Connor McAdams <conmanx360@gmail.com>

commit 7079f785b50055a32b72eddcb7d9ba5688db24d0 upstream.

Change the Input Source enumerated control's strings to make it play
nice with pulseaudio.

Fixes: 7cb9d94c05de9 ("ALSA: hda/ca0132: add alt_select_in/out for R3Di + SBZ")
Cc: <stable@kernel.org>
Signed-off-by: Connor McAdams <conmanx360@gmail.com>
Link: https://lore.kernel.org/r/20201208195223.424753-2-conmanx360@gmail.com
Link: https://lore.kernel.org/r/20201210173550.2968-2-conmanx360@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_ca0132.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pavel Machek Dec. 31, 2020, 6:15 p.m. UTC | #1
Hi!

> From: Connor McAdams <conmanx360@gmail.com>

> 

> commit 7079f785b50055a32b72eddcb7d9ba5688db24d0 upstream.

> 

> Change the Input Source enumerated control's strings to make it play

> nice with pulseaudio.


> +++ b/sound/pci/hda/patch_ca0132.c

> @@ -106,7 +106,7 @@ enum {

>  };

>  

>  /* Strings for Input Source Enum Control */

> -static const char *const in_src_str[3] = {"Rear Mic", "Line", "Front Mic" };

> +static const char *const in_src_str[3] = { "Microphone", "Line In", "Front Microphone" };

>  #define IN_SRC_NUM_OF_INPUTS 3


If pulseaudio expects the strings to be from small set, should we have
defines for them?

If pulseaudio can't understand short versions, do these need fixing,
too?

hda_auto_parser.c:		"Internal Mic", "Dock Mic", "Mic", "Rear Mic", "Front Mic"
hda_auto_parser.c:			return "Headset Mic";
hda_auto_parser.c:			return "Headphone Mic";
hda_auto_parser.c:			return "Mic";
hda_auto_parser.c:		return "Headphone Mic";
hda_jack.c:						    cfg, "Headphone Mic");
hda_jack.c:						    cfg, "Headphone Mic");
hda_proc.c:		"Line In", "Aux", "Mic", "Telephony",

Best regards,
							Pavel
-- 
http://www.livejournal.com/~pavelmachek
Takashi Iwai Jan. 1, 2021, 8:02 a.m. UTC | #2
On Thu, 31 Dec 2020 19:15:42 +0100,
Pavel Machek wrote:
> 

> Hi!

> 

> > From: Connor McAdams <conmanx360@gmail.com>

> > 

> > commit 7079f785b50055a32b72eddcb7d9ba5688db24d0 upstream.

> > 

> > Change the Input Source enumerated control's strings to make it play

> > nice with pulseaudio.

> 

> > +++ b/sound/pci/hda/patch_ca0132.c

> > @@ -106,7 +106,7 @@ enum {

> >  };

> >  

> >  /* Strings for Input Source Enum Control */

> > -static const char *const in_src_str[3] = {"Rear Mic", "Line", "Front Mic" };

> > +static const char *const in_src_str[3] = { "Microphone", "Line In", "Front Microphone" };

> >  #define IN_SRC_NUM_OF_INPUTS 3

> 

> If pulseaudio expects the strings to be from small set, should we have

> defines for them?

> 

> If pulseaudio can't understand short versions, do these need fixing,

> too?


I don't believe so.  Even if PA really doesn't understand, it's a
problem of PA itself to be fixed there.

In this particular case, we changed the driver side since it's an
easier path and very specific to the certain model.  But if it's about
the generic parser that is applied to all models, it's a different
story.


thanks,

Takashi
diff mbox series

Patch

--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -106,7 +106,7 @@  enum {
 };
 
 /* Strings for Input Source Enum Control */
-static const char *const in_src_str[3] = {"Rear Mic", "Line", "Front Mic" };
+static const char *const in_src_str[3] = { "Microphone", "Line In", "Front Microphone" };
 #define IN_SRC_NUM_OF_INPUTS 3
 enum {
 	REAR_MIC,