[alsa-devel] [PATCH] ALSA: hda - Make slave strings more user-friendly

Raymond Yau superquad.vortex2 at gmail.com
Sat Feb 28 04:00:24 CET 2015


2015-02-28 3:21 GMT+08:00 David Henningsson <david.henningsson at canonical.com
>:

>
>
> On 2015-02-27 20:03, Ingo Brückl wrote:
>
>> "Line Out" has been used throughout, so don't abbreviate.
>>
>
> The abbreviation is on purpose because there are string lengths you need
> to stay under, especially combined with other stuff, an extreme example
> would be "Front Headphone+Line Out Surround Playback Volume" that might get
> cut off.
>
> Also, "Headphone+LO" is already put into PulseAudio (and potentially other
> places as well).
>
> So please don't change this.
>


Speaker+LO playback switch at pin complex Line Out is not a correct name

Should "Front Playback Switch" more meaningfull when the codecs have
"Surround Playback Switch", "LFE Playback Switch" and "Center Playback
Switch " ?

"Master Playback Volume" is not correct name too


Node 0x14 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Speaker+LO Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Control: name="Line Out Jack", index=0, device=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals:  [0x80 0x80]
  Pincap 0x0001003c: IN OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x01014010: [Jack] Line Out at Ext Rear
    Conn = 1/8, Color = Green
    DefAssociation = 0x1, Sequence = 0x0
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=02, enabled=1
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
  Connection: 1
     0x0c

Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Master Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="ALC662 rev3 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Surround Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0
Node 0x04 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Center Playback Volume", index=0, device=0
    ControlAmp: chs=1, dir=Out, idx=0, ofs=0
  Control: name="LFE Playback Volume", index=0, device=0
    ControlAmp: chs=2, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals:  [0x00 0x00]
  Converter: stream=0, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states:  D0 D1 D2 D3
  Power: setting=D0, actual=D0




>
>
>> Signed-off-by: Ingo Brückl <ib at wupperonline.de>
>>
>> diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
>> index b680b4e..834730f 100644
>> --- a/sound/pci/hda/hda_generic.c
>> +++ b/sound/pci/hda/hda_generic.c
>> @@ -1103,9 +1103,9 @@ static const char *get_line_out_pfx(struct
>> hda_codec *codec, int ch,
>>                         if (hp_lo_shared && spk_lo_shared)
>>                                 return spec->vmaster_mute.hook ? "PCM" :
>> "Master";
>>                         if (hp_lo_shared)
>> -                               return "Headphone+LO";
>> +                               return "Headphone+Line Out";
>>                         if (spk_lo_shared)
>> -                               return "Speaker+LO";
>> +                               return "Speaker+Line Out";
>>                 }
>>         }
>>
>> @@ -4619,7 +4619,7 @@ static const char * const slave_pfxs[] = {
>>         "CLFE", "Bass Speaker", "PCM",
>>         "Speaker Front", "Speaker Surround", "Speaker CLFE", "Speaker
>> Side",
>>         "Headphone Front", "Headphone Surround", "Headphone CLFE",
>> -       "Headphone Side", "Headphone+LO", "Speaker+LO",
>> +       "Headphone Side", "Headphone+Line Out", "Speaker+Line Out",
>>         NULL,
>>   };
>>
>>
>>
> --
> David Henningsson, Canonical Ltd.
> https://launchpad.net/~diwic
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>


More information about the Alsa-devel mailing list