Realtek ALC3661 Alienware14 / Soundoutput / Jack

Bug #1516025 reported by Mohd Imran Jamadar
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ALSA driver
Confirmed
Unknown
linux (Ubuntu)
Confirmed
Medium
Unassigned
pulseaudio (Ubuntu)
Confirmed
Unknown

Bug Description

When watching the following video (but also audio from other programs) with the volume at 100%, the audio loudness is lower in comparison to the same audio being played at 100% in Windows 10:
https://www.youtube.com/watch?v=YQHsXMglC9A

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: linux-image-4.2.0-18-generic 4.2.0-18.22
ProcVersionSignature: Ubuntu 4.2.0-18.22-generic 4.2.3
Uname: Linux 4.2.0-18-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.19.1-0ubuntu4
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC0: imran 1619 F.... pulseaudio
 /dev/snd/controlC1: imran 1619 F.... pulseaudio
CurrentDesktop: Unity
Date: Fri Nov 13 18:08:07 2015
HibernationDevice: RESUME=UUID=2401d43e-85ec-4c88-81c1-c597086504a1
InstallationDate: Installed on 2015-11-07 (5 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Release amd64 (20151021)
MachineType: Alienware Alienware 14
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.2.0-18-generic root=UUID=a534221a-37cb-4092-8ce2-934940eede6d ro quiet splash
RelatedPackageVersions:
 linux-restricted-modules-4.2.0-18-generic N/A
 linux-backports-modules-4.2.0-18-generic N/A
 linux-firmware 1.149.1
SourcePackage: linux
UdevLog: Error: [Errno 2] No such file or directory: '/var/log/udev'
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/23/2014
dmi.bios.vendor: Alienware
dmi.bios.version: A09
dmi.board.name: 07MJ2Y
dmi.board.vendor: Alienware
dmi.board.version: A01
dmi.chassis.type: 8
dmi.chassis.vendor: Alienware
dmi.chassis.version: A09
dmi.modalias: dmi:bvnAlienware:bvrA09:bd04/23/2014:svnAlienware:pnAlienware14:pvrA09:rvnAlienware:rn07MJ2Y:rvrA01:cvnAlienware:ct8:cvrA09:
dmi.product.name: Alienware 14
dmi.product.version: A09
dmi.sys.vendor: Alienware

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
penalvch (penalvch)
tags: added: latest-bios-a09
Changed in linux (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

What i am saying that when the volume is pushed to 100%, the audio output is low, when compared to the same audio being played in Windows10.
All audio is played using youtube videos.

Here is the sample ref file.
https://www.youtube.com/watch?v=YQHsXMglC9A

Please advise.

Revision history for this message
Raymond (superquad-vortex2) wrote :

https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1302090

you have to file upstream bug report for missing subwoofer pin and headset mic

https://bugzilla.kernel.org/enter_bug.cgi?product=Drivers

alsa/sound

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

Alsa info dump

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Missing sub-woofer pin and headset mic

More details here

https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1302090

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

you have not set node 0x1a to speaker in /sys/class/sound/hwC1D0/user_pin_configs:

/sys/class/sound/hwC1D0/init_pin_configs:
0x12 0x99a30140
0x14 0x90170110
0x15 0x0321101f
0x16 0x03211020
0x18 0x40030008
0x19 0x03a11030
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x41000001
0x1e 0x411111f0
0x1f 0x411111f0

/sys/class/sound/hwC1D0/driver_pin_configs:

/sys/class/sound/hwC1D0/user_pin_configs:
0x12 0x99a30140
0x14 0x90170110
0x15 0x0321101f
0x16 0x03211020
0x18 0x40030008
0x19 0x03a11030
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x41000001
0x1e 0x411111f0
0x1f 0x411111f0

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

#define assoc_of_nid(c,p) get_defcfg_association(snd_hda_codec_get_pincfg(c,p))

     if ((cfg->speaker_outs == 2) && (cfg->hp_outs == 2))
          if (cfg->line_out_type == AUTO_PIN_HP_OUT)
              for(i=0; i<2; i++)
                   if (assoc_of_nid(codec,cfg->line_out_pins[i]) > assoc_of_nid(codec,cfg->speaker_pins[i]))
                            badness++;

add the above in fill_and_eval_dacs() in hda_generic.c after

  if ( spec->mixer_nid) {

  }

this increase badness of cfg->line_out_type == AUTO_PIN_HP_OUT by one when the second headphone have higher def association than subwoofer , driver create speaker and bass speaker volume controls and headphone volume control for headset and headphone

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

driver seem hardcode to use first pin spec->gen.autocfg.hp_pins[0] as hp of the headset

and imux_pin to determine the selected mic

this mean that if you set the correct pin default of headset mic (headset mic phantom jack)

you can select internal mic, headset mic or mic jack manually using the capture source control

static void alc_update_headset_mode(struct hda_codec *codec)
{
 struct alc_spec *spec = codec->spec;

 hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]];
 hda_nid_t hp_pin = spec->gen.autocfg.hp_pins[0];

 int new_headset_mode;

 if (!snd_hda_jack_detect(codec, hp_pin))
  new_headset_mode = ALC_HEADSET_MODE_UNPLUGGED;
 else if (mux_pin == spec->headset_mic_pin)
  new_headset_mode = ALC_HEADSET_MODE_HEADSET;
 else if (mux_pin == spec->headphone_mic_pin)
  new_headset_mode = ALC_HEADSET_MODE_MIC;
 else
  new_headset_mode = ALC_HEADSET_MODE_HEADPHONE;

Revision history for this message
penalvch (penalvch) wrote :

Mohd Imran Jamadar, regarding just the audio loudness (not the mic issue) could you please test the latest upstream kernel available from the very top line at the top of the page from http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D (the release names are irrelevant for testing, and please do not test the daily folder)? Install instructions are available at https://wiki.ubuntu.com/Kernel/MainlineBuilds . This will allow additional upstream developers to examine the issue.

If the latest kernel did not allow you to test to the issue (ex. you couldn't boot into the OS) please make a comment in your report about this, and continue to test the next most recent kernel version until you can test to the issue. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this issue is fixed in the mainline kernel, please add the following tags by clicking on the yellow circle with a black pencil icon, next to the word Tags, located at the bottom of the report description:
kernel-fixed-upstream
kernel-fixed-upstream-X.Y-rcZ

Where X, Y, and Z are numbers corresponding to the kernel version.

If the mainline kernel does not fix the issue, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-X.Y-rcZ

Please note, an error to install the kernel does not fit the criteria of kernel-bug-exists-upstream.

Once testing of the latest upstream kernel is complete, please mark this report's Status as Confirmed. Please let us know your results.

Thank you for your understanding.

description: updated
Changed in linux (Ubuntu):
importance: Low → Medium
Revision history for this message
Raymond (superquad-vortex2) wrote :

https://bugzilla.kernel.org/show_bug.cgi?id=104901

as alienware 18 also use alc668 , you have to follow up the upstream bug report

Revision history for this message
Raymond (superquad-vortex2) wrote :

4.002885] snd_hda_codec_realtek hdaudioC1D0: autoconfig for ALC3661: line_outs=1 (0x14/0x0/0x0/0x0/0x0) type:speaker
[ 4.002887] snd_hda_codec_realtek hdaudioC1D0: speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[ 4.002889] snd_hda_codec_realtek hdaudioC1D0: hp_outs=2 (0x15/0x16/0x0/0x0/0x0)
[ 4.002890] snd_hda_codec_realtek hdaudioC1D0: mono: mono_out=0x0
[ 4.002891] snd_hda_codec_realtek hdaudioC1D0: inputs:
[ 4.002892] snd_hda_codec_realtek hdaudioC1D0: Mic=0x19
[ 4.002894] snd_hda_codec_realtek hdaudioC1D0: Internal Mic=0x12

try hdajackretask to add back the subwoofer and headset mic

Revision history for this message
Raymond (superquad-vortex2) wrote :

control.17 {
  iface CARD
  name 'Headphone Front Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.18 {
  iface CARD
  name 'Headphone Surround Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }

it is strange that headphone availability is unknown when both headphone jacks are not plugged

ports:
  analog-output-speaker: Speakers (priority 10000, latency offset 0 usec, available: unknown)
   properties:
    device.icon_name = "audio-speakers"
  analog-output-headphones: Headphones (priority 9000, latency offset 0 usec, available: unknown)
   properties:
    device.icon_name = "audio-headphones"
 active port: <analog-output-speaker>

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

https://bugzilla.kernel.org/show_bug.cgi?id=107851

Here is the bug report i filed as requested.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

This bug relates to another bug report that i some one else have reported
https://bugzilla.kernel.org/show_bug.cgi?id=104901

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

Mr.Raymond ,
Can you tell me how to go about completing that tasks mentions on #9 & #10?

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

I would also like to comment that on my laptop i have three Jacks, on the left side,
First is the MIC
Second is Headset
Third is the Headphone, with a microphone.

So if i plug a samsung headphone in the headset,

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.3-wily/

I would assume you are taking about this tree and kernel? @Christopher M. Penalver (penalvch)

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

I tried using the following kernel as suggested from this link;
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.3-wily/

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.3-wily/linux-headers-4.3.0-040300-generic_4.3.0-040300.201511020949_amd64.deb

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.3-wily/linux-image-4.3.0-040300-generic_4.3.0-040300.201511020949_amd64.deb

This resulted in a unbootable system, so used a previous kernel from Ubuntu menu and then removed the offending kernel image.

Also i am using propriety Nvidia drivers, so that could be a cause as the kernel failed to install properly .
Preparing to install an upstream kernel

First, if one is using select proprietary or out-of-tree modules (ex. vitualbox, nvidia, fglrx, bcmwl, etc.) unless there is an extra package available for the version you are testing, you will need to uninstall the module first, in order to test the mainline kernel. If you do not uninstall these modules first, then the upstream kernel more than likely will not boot.

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

can you try the patch

https://bugs.freedesktop.org/attachment.cgi?id=117571

only those part which is needed by alienware

+static void alc668_fixup_dell_alienware(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ const struct hda_pintbl pincfgs[] = {
+ { 0x1a, 0x99130112 }, /* subwoofer */
+ { 0x1b, 0x03a1113c }, /* headset mic */
+ { }
+ };
+ static hda_nid_t preferred_pair[] = {
+ 0x14, 0x03,
+ 0x1a, 0x04,
+ 0x15, 0x02,
+ 0x16, 0x02,
+ 0
+ };
+ struct alc_spec *spec = codec->spec;
+
+ switch (action) {
+ case HDA_FIXUP_ACT_PRE_PROBE:
+ snd_hda_apply_pincfgs(codec, pincfgs);
+ spec->gen.preferred_dacs = preferred_pair;
+ spec->gen.hs_mic_use_hp_sense = 1;
+ spec->parse_flags |= HDA_PINCFG_HEADSET_MIC;
+ break;
+ case HDA_FIXUP_ACT_PROBE:
+ alc_probe_headset_mode(codec);
+ break;
+ case HDA_FIXUP_ACT_INIT:
+ spec->current_headset_mode = 0;
+ alc_update_headset_mode(codec);
+ break;
+ case HDA_FIXUP_ACT_BUILD:
+/*
+ better to use default hda 2.1 chmap
+ when we don't know internal subwoofer use which channel
+*/
+ break;
+ }
+}

 {.id = ALC662_FIXUP_ASUS_MODE8, .name = "asus-mode8"},
  {.id = ALC662_FIXUP_INV_DMIC, .name = "inv-dmic"},
  {.id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
+ {.id = ALC668_FIXUP_DELL_ALIENWARE, .name = "dell-alienware"},
+

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

you don't need those part which implement ext subwoofer jack detection using another node pin sense

only need the part which implement headset mic jack using hp pin sense for the headset which must be the first hp pins when your alienware have headset and headphone

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

(In reply to mohammed imran from comment #2)
> #define assoc_of_nid(c,p)
> get_defcfg_association(snd_hda_codec_get_pincfg(c,p))
>
> if ((cfg->speaker_outs == 2) && (cfg->hp_outs == 2))
> if (cfg->line_out_type == AUTO_PIN_HP_OUT)
> for(i=0; i<2; i++)
> if (assoc_of_nid(codec,cfg->line_out_pins[i]) >
> assoc_of_nid(codec,cfg->speaker_pins[i]))
> badness++;
>
> add the above in fill_and_eval_dacs() in hda_generic.c after
>
> if ( spec->mixer_nid) {
>
> }
>
> this increase badness of cfg->line_out_type == AUTO_PIN_HP_OUT by one when
> the second headphone have higher def association than subwoofer , driver
> create speaker and bass speaker volume controls and headphone volume control
> for headset and headphone

the easyway is to assign preferred dac for the output pins to force which output pin can get a volume control and which pins need to share volume control

spec->gen.preferred_dacs = preferred_pair;

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :
Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

there is a bug in the above patch which did not call alc_fixup_headset_mode_alc668

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Can you give more details as to how and which file should be patched? All this pins and jacks is giving my head a spin.

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_realtek.c?id=73bdd597823e2231dc882577dbbaf8df92fe1775

only patch_realtek.c for missing headset mic and subwoofer

the alienware model is just a variant of dell-headset-multi which don't implement headphone mic since you already have a mic jack and another headphone

you have to maunally select the capture source to select headset mic , mic and internal mic

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

you just replaced the headphone mic by subwoofer pin in the fixup

and add the preferred dac for your alienware

[ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = {
 .type = HDA_FIXUP_PINS,
 .v.pins = (const struct hda_pintbl[]) {
  { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
   { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
   { }
 },
  .chained = true,
  .chain_id = ALC668_FIXUP_HEADSET_MODE
 },
 [ALC668_FIXUP_HEADSET_MODE] = {
 .type = HDA_FIXUP_FUNC,
 .v.func = alc_fixup_headset_mode_alc668,
 },
 };

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

the easy way is to give up the headphone jack and you don't need to share volume control

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

once you have confirmed the headset mic is node 0x1b using the minimal change and the subwoofer is node 0x1a ,
determine the channel map of subwoofer

you can renable the headphone jack to use preferred dac to let subwoofer get volume control

change the name of the playback switch to distinguish the headset and headphone

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

The patch depend on function __snd_hda_jack_add_kctl which was removed by this patch

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/hda_jack.c?id=909cadc6c8c7e52149fb4687453277 d6cabe8c80

You need to create headset jack and skip headset mic phantom jack instead of headphone jack and headset mic jack

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/include/sound/jack.h

enum snd_jack_types {
SND_JACK_HEADPHONE = 0x0001,
SND_JACK_MICROPHONE = 0x0002,
SND_JACK_HEADSET = SND_JACK_HEADPHONE | SND_JACK_MICROPHONE,

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

Just remember add delay after headphone is plugged and before you switch headset mic since it need time for codec to differentitate omtp and ctia headset

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :
Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #17)
> http://mailman.alsa-project.org/pipermail/alsa-devel/2015-September/097754.
> html

So is this issue finally fixed, i mean can i finally enjoy the quality of audio in stereo mode as i do on Windows?
Which Kernel would this fix be available?

And i am not so technically in patching kernels use to do it long ago with available instructions.

Please advise?

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

No, you need to recompile alsa driver to create the new headset jack and modifiy pulseaudio conf to use this jack for both headphone and headset mic conf

[Jack Headset]
 required-any = any

https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-headphones.conf

https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-input-headset-mic.conf

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :
Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #20)
> The other patch which add headset mic and subwoofer
>
>
>
> http://mailman.alsa-project.org/pipermail/alsa-devel/2015-September/097755.
> html

Can you get into the mainline kernel which can then be picked up by other distro's :)

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

For alienware which also use alc668 but with headset, headphone and mic jacks

there will be no auto mic selection since you have headset mic and mic jacks

what you need is

fix the headset mic pin and disable the headophone mic of model dell-headset-multi

decide which output pins share volume control since you have headset, headphone, speaker and subwoofer but only three audio output/volume controls

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

I confirm the same issue to be present in
Kernel 4.4.0-22-generic
16.04 Ubuntu.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Hello Raymond,
What is the current status of this driver, still having sound issues in kernel
4.4.0-22-generic provided by Ubuntu.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :
Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

I would like to amend to post #16,

i followed the guide here,
http://paste.ubuntu.com/16513499/

Full link:
https://askubuntu.com/questions/491301/realtek-alc-3661/753497#753497?newreg=176dbb70676146b7b80409c4f084c1f6

second comment please refer,

Installed the latest driver
https://code.launchpad.net/~ubuntu-audio-dev/+archive/ubuntu/alsa-daily/+packages for 16.04, deb file
https://code.launchpad.net/~ubuntu-audio-dev/+archive/ubuntu/alsa-daily/+sourcepub/6439770/+listing-archive-extra

and rebooted and it seems i am getting proper sound, full stereo , will test more.

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :
Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

I have reported the author as requested, and if needed can you please fill in with the details if needed.

Also refer to my post no.24 in which i have installed the latest alsa daily build from here and sound seems to be fine.

https://code.launchpad.net/~ubuntu-audio-dev/+archive/ubuntu/alsa-daily/

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

- [ALC668_FIXUP_ASUS_Nx51] = {
+ [ALC668_FIXUP_ASUS_SUBWOFFER] = {

  .type = HDA_FIXUP_PINS,
  .v.pins = (const struct hda_pintbl[]) {
   {0x1a, 0x90170151}, /* bass speaker */
   {}
  },
  .chained = true,
  .chain_id = ALC662_FIXUP_BASS_CHMAP,
 },
+ [ALC662_FIXUP_ASUS_Nx51] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc_fixup_headset_mode_alc668,
+ .chained = true,
+ .chain_id = ALC668_FIXUP_ASUS_SUBWOOFER,
+ },

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Whats up with the code above?

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Hardware ID from my Windows system and the driver as per link

http://pastebin.com/jzHvzGQu

Realtek ALC3661 Audio codec Driver

HDAUDIO\FUNC_01&VEN_10EC&DEV_0668&SUBSYS_102805A9&REV_1000

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_realtek.c?id=3231e2053eaeee70bdfb216a78a30f11e88e2243

This patch only add the suppport of subwoofer as internal subwoofer but it can be detected using jack sense

You need to merge model dell headset multi and the external subwoofer model if your are using headset

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

- {0x1a, 0x90170151}, /* bass speaker */
+ {0x1a, 0x90170051}, /* bass speaker */

just clear misc bit (bit 8 of pin default) which create jack dedect kctl

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 217131
Pin Set

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 217141
B

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 217151
C

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Raymond i have attached three screenshots, ok let me know what i need to set here.

Regards.

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

Neither hdajackretssk nor early patching can fix the bug after the above patch which add the subwoofer pin

You have to ask the author to add support of heasdset

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Thanks for your patience and understanding. But where will i find the author, the last one who had written the patch, for his laptop asked me to not to email him anymore.

? Can you write the code? and then submit the patch? if i knew i would have done something about it long time ago.

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

Audio is still not what i would expect, audio sucks.

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

since there is not enough DAC or volume controls for the headset, headphone, speaker and subwoofer

when you cannot build kernel and modifiy driver code but just use early patching

you have tp give up the headset and change it to not connected by adding the subwoofer pin

to test the headset and subwoofer, you need to give up the headphone jack and set it as not connwxrrws qhwn using dell-headset-multi and remove headphone mic pin, add subwoofer pin fix and

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/commit/sound/pci/hda/patch_realtek.c?id=73bdd597823e2231dc882577dbbaf8df92fe1775

you need the trimmed version of dell-headset-multi

 [ALC668_FIXUP_DELL_ALIENWARE] = {
+ .type = HDA_FIXUP_PINS,
+ .v.pins = (const struct hda_pintbl[]) {
+ { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
+ { }
+ },
+ .chained = true,
+ .chain_id = ALC668_FIXUP_HEADSET_MODE
+ },

add the subwoofer pin fix and prefreed DAC to force the driver to create bass speaker playback volume

 static hda_nid_t preferred_pair[] = {
+ 0x14, 0x03,
+ 0x1a, 0x04,
+ 0x15, 0x02,
+ 0x16, 0x02,
+ 0
+ };
+ struct alc_spec *spec = codec->spec;
+
+ switch (action) {
+ case HDA_FIXUP_ACT_PRE_PROBE:
+ spec->gen.preferred_dacs = preferred_pair;

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Since you can write code, can't you like submit a patch for this issue?
Like one patch to fix this issue?

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

the first thing you need to find out the subwoofer use left, right or both channels by add subwoofer pin and remove one of the headphone pin

speaker-test -c 4 -t wav -D hw:1,0

do you hear sound from subwoofer when "Rear left" or "Rear Right" is playing

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

No i do not hear when Rear Left and Rear Right is played? Now, what? Please advise?

speaker-test -c 4 -t wav -D hw:1,0

speaker-test 1.1.0

Playback device is hw:1,0
Stream parameters are 48000Hz, S16_LE, 4 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 8192
Period size range from 16 to 4096
Using max buffer size 8192
Periods = 4
was set period_size = 2048
was set buffer_size = 8192
 0 - Front Left
 1 - Front Right
 3 - Rear Right
 2 - Rear Left
Time per period = 5.717268

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :
Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Yes i tried that and i get to hear that "Rear left" or "Rear Right" is playing, using the hdajackretask. Now? then? what next?

Changed in linux (Ubuntu):
status: Incomplete → New
affects: linux (Ubuntu) → pulseaudio
Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

But i donot hear anything related to frontleft and front right, ref to comment 43

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

you have to post the output of alsa-info.sh after save as boot default and reboot

did you remove the headset pin complex to force the driver to get the bass speaker playback volume control since three DAC/volume control for headphone, speaker and subwoofer

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

ALSA INFO before:
http://www.alsa-project.org/db/?f=43497289c2879df5f15f276f689a4cf50bc1cd30

Alsa info, after as instructed,
http://www.alsa-project.org/db/?f=fdba5cc8c2fc390c4b18aabcb81c43c01e556927
.
I just followed the instruction as per that links comment no 11, that's it and conducted the test? And what is headset pin complex ( in plain English please ) :)
.

Output while using HDAjackrestask
hdajackretask
0x12 0x99a30140
0x14 0x90170110
0x15 0x0321101f
0x16 0x03211020
0x18 0x40030008
0x19 0x03a11030
0x1a 0x90100151
0x1b 0x411111f0
0x1d 0x41000001
0x1e 0x411111f0
0x1f 0x411111f0

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 217991
alsamixer with bass

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218001
.

HDAjackrestask with the pin set with boot option

regards.

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

if you don't make one of the headphone as not connected, you won't get "Bass Speaker Playback Volume",

you have to give up node 0x15 or 0x16 to get the driver to create bass speaker playback volume controls

Node 0x15 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x80 0x80]
  Pincap 0x0001001c: OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x0321101f: [Jack] HP Out at Ext Left
    Conn = 1/8, Color = Black
    DefAssociation = 0x1, Sequence = 0xf
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=01, enabled=1
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 3
     0x0c* 0x0d 0x0e
Node 0x16 [Pin Complex] wcaps 0x40058d: Stereo Amp-Out
  Control: name="Headphone Playback Switch", index=1, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x0000001c: OUT HP Detect
  Pin Default 0x03211020: [Jack] HP Out at Ext Left
    Conn = 1/8, Color = Black
    DefAssociation = 0x2, Sequence = 0x0
  Pin-ctls: 0xc0: OUT HP
  Unsolicited: tag=02, enabled=1
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 3
     0x0c 0x0d* 0x0e

Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Headphone Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="ALC3661 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals: [0x00 0x00]
  Converter: stream=5, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Headphone Playback Volume", index=1, 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: [0x56 0x56]
  Converter: stream=5, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x04 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Speaker 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: [0x56 0x56]
  Converter: stream=5, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

audio output

speaker playback volume

converter: stream = 5 , channel =0

audio output

bass speaker playback volume

converter: stream = 5, channel = 1

audio output

Headphone playback volme

converter: stream = 5 , channel = 0

the two speaker support 4 channels playback when channel tags are different

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

when playing four channel

one of the converter should has channel = 1

  Converter: stream=5, channel=1

you should hear front left and front right in the headset jack and rear left and rear right on the heaphone jack if node 0x14 is headset

Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Headphone Playback Volume", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Device: name="ALC3661 Analog", type="Audio", device=0
  Amp-Out caps: ofs=0x57, nsteps=0x57, stepsize=0x02, mute=0
  Amp-Out vals: [0x00 0x00]
  Converter: stream=5, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
Node 0x03 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Headphone Playback Volume", index=1, 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: [0x56 0x56]
  Converter: stream=5, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/1302090/comments/4

if node 0x15 is headset jack. just need fixup headset mic

{ 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

               [ALC668_FIXUP_DELL_ALIENWARE] = {
  .type = HDA_FIXUP_PINS,
  .v.pins = (const struct hda_pintbl[]) {
/* give up the headphone jack 0x16 to test the headset mic */
                        { 0x16, 0x411111f0 }, /* once headset mic work, you need to use preferred DAC to select which two pins share volume control */
                        { 0x1a, 0x90100111 }, /* internal subwoofer */
   { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
   { }
  },
  .chained = true,
  .chain_id = ALC668_FIXUP_HEADSET_MODE
 },

+ SND_PCI_QUIRK(0x1028, 0x05a9, "Dell Alienware14", ALC668_FIXUP_DELL_ALIENWARE),
 SND_PCI_QUIRK(0x1028, 0x05d8, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),
 SND_PCI_QUIRK(0x1028, 0x05db, "Dell", ALC668_FIXUP_DELL_MIC_NO_PRESENCE),

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Is the code above the patch for our issue?

Also when i do hdajacksense i get this output

sudo hdajacksensetest
[sudo] password for imran:
Pin 0x05 ( Digital Out, HDMI): present = No
Pin 0x06 ( Digital Out, HDMI): present = No
Pin 0x07 ( Digital Out, HDMI): present = No

Can't get to test my card ? any idea

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :
Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

(In reply to mohammed imran from comment #56)
> http://voices.canonical.com/david.henningsson/2014/03/07/headset-jacks-on-
> newer-laptops/
>
> Will this solution work?

http://bazaar.launchpad.net/~unity-settings-daemon-team/unity-settings-daemon/trunk/view/head:/plugins/media-keys/what-did-you-plug-in/pa-backend.c

   Headphone Mic Jack - indicates headphone and mic-in mode share the same jack,
     i e, not two separate jacks. Hardware cannot distinguish between a
     headphone and a mic.
   Headset Mic Phantom Jack - indicates headset jack where hardware can not
     distinguish between headphones and headsets
   Headset Mic Jack - indicates headset jack where hardware can distinguish

dell-headset-multi is designed for dell laptop with only one combo jack

your alienware have three jacks and need to find out whether you can use headset mic without headphone mic fixup

as your alienware also support 5.1 by retasking mic jacks as output which create center/lfe playback volume, so you need to find out whether the subwoofer using same channel as lfe

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

you can specify model=dell-headset-multi and use early patching

by force the driver to keep node 0x19 as the mic jack instead of headphone mic jack

Pin Default 0x03a11030

add the subwoofer node 0x1a

study the two cases

1) keeping the headphone pin node 0x16 ( speaker and subwoofer share volume control)
2) use prefer DAC so that headset and headphone share volume control

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

if both speaker node 0x14 and subwoofer node 0x1a are connected to node 0x4 through node 0x0e

you can switch off speaker playback switch and play stereo to find out whether subwoofer use left, right or both channels

imple mixer control 'Speaker',0
  Capabilities: pvolume pswitch
  Playback channels: Front Left - Front Right
  Limits: Playback 0 - 87
  Mono:
  Front Left: Playback 87 [100%] [0.00dB] [off]
  Front Right: Playback 87 [100%] [0.00dB] [off]
Simple mixer control 'Bass Speaker',0
  Capabilities: pswitch
  Playback channels: Front Left - Front Right
  Mono:
  Front Left: Playback [on]
  Front Right: Playback [on]

Node 0x14 [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-In caps: N/A
  Amp-In vals: [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x0001003c: IN OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x90170110: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 3
     0x0c 0x0d 0x0e*

Node 0x14 [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-In caps: N/A
  Amp-In vals: [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x0001003c: IN OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x90170110: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 3
     0x0c 0x0d 0x0e*

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

Node 0x04 [Audio Output] wcaps 0x41d: Stereo Amp-Out
  Control: name="Speaker 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: [0x56 0x56]
  Converter: stream=5, channel=0
  PCM:
    rates [0x560]: 44100 48000 96000 192000
    bits [0xe]: 16 20 24
    formats [0x1]: PCM
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0

Node 0x0e [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
  Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-In vals: [0x00 0x00] [0x00 0x00]
  Connection: 2
     0x04 0x0b

Node 0x14 [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Control: name="Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-In caps: N/A
  Amp-In vals: [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x0001003c: IN OUT HP EAPD Detect
  EAPD 0x2: EAPD
  Pin Default 0x90170110: [Fixed] Speaker at Int N/A
    Conn = Analog, Color = Unknown
    DefAssociation = 0x1, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT
  Unsolicited: tag=00, enabled=0
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 3
     0x0c 0x0d 0x0e*

Node 0x1a [Pin Complex] wcaps 0x40058f: Stereo Amp-In Amp-Out
  Control: name="Bass Speaker Playback Switch", index=0, device=0
    ControlAmp: chs=3, dir=Out, idx=0, ofs=0
  Amp-In caps: ofs=0x00, nsteps=0x03, stepsize=0x27, mute=0
  Amp-In vals: [0x00 0x00]
  Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
  Amp-Out vals: [0x00 0x00]
  Pincap 0x0000373c: IN OUT HP Detect
    Vref caps: HIZ 50 GRD 80 100
  Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
    Conn = 1/8, Color = Black
    DefAssociation = 0xf, Sequence = 0x0
    Misc = NO_PRESENCE
  Pin-ctls: 0x40: OUT VREF_HIZ
  Unsolicited: tag=00, enabled=0
  Power states: D0 D1 D2 D3 EPSS
  Power: setting=D0, actual=D0
  Connection: 3
     0x0c 0x0d 0x0e*

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Can you advise me how do i use hdajackretask to enable comment 58

Advance override?

imran@imran-Alienware-14:~$ hdajackretask
0x12 0x99a30140
0x14 0x90170110
0x15 0x0321101f
0x16 0x03211020
0x18 0x40030008
0x19 0x03a11030 -> Mic jack like which?
0x1a 0x411111f0 -> Subwoofer? like which option from the drop down menu?
0x1b 0x411111f0
0x1d 0x41000001
0x1e 0x411111f0
0x1f 0x411111f0

And what about comment no 58?

I had a look at hdajackretask, and wondered how to connect the nodes?

A more practical step by step instructions would be ok? i am bit challenged in this matter.

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

in /etc/modprobe.d/alsa-base.conf

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documentation/sound/alsa/HD-Audio-Models.txt

options snd-hda-intel model=,dell-headset-multi, patch=,/lib/firmware/hdajackretask.fw

only need to fix these pin in hdajackretask.fw

0x16 0x411111f0 this remove headphone jack to allow subwoofer has bass speaker volume control

0x19 0x03a11030 this force to use mic jack instead of headphone mic of dell-headset-multi

0x1a 0x90100111 this fix the subwoofer pin

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

/sys/class/sound/hwC1D0/init_pin_configs:
0x12 0x99a30140
0x14 0x90170110
0x15 0x0321101f
0x16 0x03211020
0x18 0x40030008
0x19 0x03a11030
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x41000001
0x1e 0x411111f0
0x1f 0x411111f0

/sys/class/sound/hwC1D0/driver_pin_configs:

 0x19 0x03a1913d
 0x1b 0x03a1113c

/sys/class/sound/hwC1D0/user_pin_configs:

0x16 0x411111f0
0x19 0x03a11030
0x1a 0x90100111

driver add headphone mic and headset mic

early patching
remove headphone jack
fix headphone mic to your original mic jack
add subwoofer pin

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218421
Now with Bass/option

.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Ref to comments 62, i have done as you have said and now i believe the issue has being fixed. I now have richer audio output and i am using 2.1. I hope you can view the atachment's that i have done.

This might fix the issue for the short term, but what about a permanent solution? for this particular codec and system so that other's can also benefit or this solution is unique to me only.

I thank you for your patience, and in assisting me.

So now what next? do you need more data?

Please advise?

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218441
Ubuntu sound Volume

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218451
Pulse audio soundoutput screenshot.

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

Proposed solution as assisted by raymond

in /etc/modprobe.d/alsa-base.conf

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documentation/sound/alsa/HD-Audio-Models.txt

options snd-hda-intel model=,dell-headset-multi, patch=,/lib/firmware/hdajackretask.fw

only need to fix these pin in hdajackretask.fw

0x16 0x411111f0 this remove headphone jack to allow subwoofer has bass speaker volume control

0x19 0x03a11030 this force to use mic jack instead of headphone mic of dell-headset-multi

0x1a 0x90100111 this fix the subwoofer pin

/sys/class/sound/hwC1D0/init_pin_configs:
0x12 0x99a30140
0x14 0x90170110
0x15 0x0321101f
0x16 0x03211020
0x18 0x40030008
0x19 0x03a11030
0x1a 0x411111f0
0x1b 0x411111f0
0x1d 0x41000001
0x1e 0x411111f0
0x1f 0x411111f0

/sys/class/sound/hwC1D0/driver_pin_configs:

 0x19 0x03a1913d
 0x1b 0x03a1113c

/sys/class/sound/hwC1D0/user_pin_configs:

0x16 0x411111f0
0x19 0x03a11030
0x1a 0x90100111

driver add headphone mic and headset mic

early patching
remove headphone jack
fix headphone mic to your original mic jack
add subwoofer pin

tags: added: xenial
removed: wily
tags: added: kernel-bug-exists-upstream
Changed in linux:
importance: Unknown → Undecided
status: Unknown → New
Changed in pulseaudio:
assignee: nobody → Mohd Imran Jamadar (imranmohd72)
assignee: Mohd Imran Jamadar (imranmohd72) → nobody
Changed in pulseaudio:
assignee: nobody → Raymond (superquad-vortex2)
Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

do the subwoofer use left , right or both channel ? ( change the left , right or both volume of bass speaker volume control

do you hear any high frequency from the subwoofer ?

https://bugs.freedesktop.org/show_bug.cgi?id=95021

can you hear the low frequency sound from the speakers when using 2.1 profile since pulseaudio apply high pass filter to channels other than LFE

do the headset mic (CTIA or OMTP headset) , internal mic and mic jack work as expected when you select the capture source , you have to manually selected since this method create headset phantom jack internal mic phantom jack and mic jack (i.e. no auto mic selection)

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

which channel map should be used for your laptop subwoofer

a)
       { .channels = 4,
   .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
     SNDRV_CHMAP_LFE, SNDRV_CHMAP_LFE } },
 { }

b)

 { .channels = 4,
   .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
     SNDRV_CHMAP_LFE, SNDRV_CHMAP_NA } },

c)

 { .channels = 4,
   .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
     SNDRV_CHMAP_NA, SNDRV_CHMAP_LFE } },

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

https://bugs.freedesktop.org/show_bug.cgi?id=95021#c30

do you hear low frequency from the headset/headphone when select 2.1 profile and plug the headset/headphone jack

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

can you post the output of alsa-info.sh for the patched driver

https://wiki.ubuntu.com/PulseAudio/Log

can you post the pulseaudio vebose log

after select 2.1 profile, play stereo

you should see "LR4 filter enabled" in pulseaudio log

http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=48f1b308cc66152eb6db66742dd0d08d888cda8d;hp=5c4cd46810cef8850b037fca9e38ffd43b0bff22

http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;h=5c4cd46810cef8850b037fca9e38ffd43b0bff22;hp=8ad8d22216f818872a764ef5dafcaae1adeee211

it is not clear alsa lib will pick up which channel map when both are available

    { .channels = 4,
   .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
     SNDRV_CHMAP_LFE, SNDRV_CHMAP_LFE } },
 { }

      { .channels = 6,
         .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
                 SNDRV_CHMAP_RL, SNDRV_CHMAP_RR,
                  SNDRV_CHMAP_FC, SNDRV_CHMAP_LFE } },

for using three jacks for external 5.1

options snd-hda-intel patch=,surround51.fw

0x15 0x02014010 retask headset as line out
0x16 0x02014011 ewtask headphone as line out
0x19 0x02014012 retask mic jack as line out
0x1a 0x90100111 subwoofer

https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-lineout.conf

https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixer/paths/analog-output-speaker.conf

do line out profile and speaker profile still work since pulseaudio assume headphone jack must exist ?

Revision history for this message
penalvch (penalvch) wrote :

Mohd Imran Jamadar, one would typically not assign someone to a bug unless they either did it themselves, or requested this be done.

affects: linux → pulseaudio (Ubuntu)
no longer affects: pulseaudio (Ubuntu)
affects: pulseaudio → linux (Ubuntu)
Changed in linux (Ubuntu):
assignee: Raymond (superquad-vortex2) → nobody
status: New → Confirmed
Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #68)
> do the subwoofer use left , right or both channel ? ( change the left ,
> right or both volume of bass speaker volume control
>
>
> do you hear any high frequency from the subwoofer ?
>
>
> https://bugs.freedesktop.org/show_bug.cgi?id=95021
>
>
> can you hear the low frequency sound from the speakers when using 2.1
> profile since pulseaudio apply high pass filter to channels other than LFE
>
>
> do the headset mic (CTIA or OMTP headset) , internal mic and mic jack work
> as expected when you select the capture source , you have to manually
> selected since this method create headset phantom jack internal mic phantom
> jack and mic jack (i.e. no auto mic selection)

Ref to your comment 68, please note that when i select Analog Surround 2.1 output and upon clicking the woofer button i hear a hissing sound.

New screenshots uploaded.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218681
comment 68

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #69)
> which channel map should be used for your laptop subwoofer
>
> a)
> { .channels = 4,
> .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
> SNDRV_CHMAP_LFE, SNDRV_CHMAP_LFE } },
> { }
>
> b)
>
> { .channels = 4,
> .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
> SNDRV_CHMAP_LFE, SNDRV_CHMAP_NA } },
>
>
> c)
>
> { .channels = 4,
> .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
> SNDRV_CHMAP_NA, SNDRV_CHMAP_LFE } },

Umm i don't know but point a) would make sense or it would work.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218691
ref to comment 68

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218701
ref to comment 68

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218711
ref to comment below

This is the alsamixer state, when its not connect with a earphone (apple) to the headphone jack.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218721
alsamixerwithearphone

alsamixerwithearphone

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218731
soundpanelwithearphonesconnected

soundpanel with ear phones connected to headphone jack no audio heard when earphone is connected to headphone jack, this jack with no sound is the middle one and i ear sound from right most one.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #71)
> can you post the output of alsa-info.sh for the patched driver
>
>
>
> https://wiki.ubuntu.com/PulseAudio/Log
>
> can you post the pulseaudio vebose log
>
> after select 2.1 profile, play stereo
>
> you should see "LR4 filter enabled" in pulseaudio log
>
>
>
> http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;
> h=48f1b308cc66152eb6db66742dd0d08d888cda8d;
> hp=5c4cd46810cef8850b037fca9e38ffd43b0bff22
>
>
> http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff;
> h=5c4cd46810cef8850b037fca9e38ffd43b0bff22;
> hp=8ad8d22216f818872a764ef5dafcaae1adeee211
>
>
> it is not clear alsa lib will pick up which channel map when both are
> available
>
>
> { .channels = 4,
> .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
> SNDRV_CHMAP_LFE, SNDRV_CHMAP_LFE } },
> { }
>
> { .channels = 6,
> .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
> SNDRV_CHMAP_RL, SNDRV_CHMAP_RR,
> SNDRV_CHMAP_FC, SNDRV_CHMAP_LFE } },
>
>
> for using three jacks for external 5.1
>
> options snd-hda-intel patch=,surround51.fw
>
>
> 0x15 0x02014010 retask headset as line out
> 0x16 0x02014011 ewtask headphone as line out
> 0x19 0x02014012 retask mic jack as line out
> 0x1a 0x90100111 subwoofer
>
>
> https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/
> mixer/paths/analog-output-lineout.conf
>
> https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/
> mixer/paths/analog-output-speaker.conf
>
>
> do line out profile and speaker profile still work since pulseaudio assume
> headphone jack must exist ?

$ alsa-info.sh
ALSA Information Script v 0.4.64
--------------------------------

This script visits the following commands/files to collect diagnostic
information about your ALSA installation and sound related hardware.

  dmesg
  lspci
  lsmod
  aplay
  amixer
  alsactl
  /proc/asound/
  /sys/class/sound/
  ~/.asoundrc (etc.)

Your ALSA information is located at
http://www.alsa-project.org/db/?f=63e63eb1d3994b9b5b9d4aa30a8903646b54bf96

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218741
ref to comment 77 and mine 80

ref to comment 77 and mine 80

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #71)
> can you post the output of alsa-info.sh for the patched driver
>
>
>
> https://wiki.ubuntu.com/PulseAudio/Log
>
> can you post the pulseaudio vebose log
>
> after select 2.1 profile, play stereo
>
> you should see "LR4 filter enabled" in pulseaudio log
>
>

Is this the line? you looking for?
( 37.895| 0.000) D: [pulseaudio] resampler.c: lfe filter activated (LR4 type), the crossover_freq = 120Hz

Log attached, thanks.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218751
log file from pulse

can you post the pulseaudio vebose log
>
> after select 2.1 profile, play stereo
>
> you should see "LR4 filter enabled" in pulseaudio log

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

>
>
> it is not clear alsa lib will pick up which channel map when both are
> available
>
>
> { .channels = 4,
> .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
> SNDRV_CHMAP_LFE, SNDRV_CHMAP_LFE } },
> { }
>
> { .channels = 6,
> .map = { SNDRV_CHMAP_FL, SNDRV_CHMAP_FR,
> SNDRV_CHMAP_RL, SNDRV_CHMAP_RR,
> SNDRV_CHMAP_FC, SNDRV_CHMAP_LFE } },
>
>
> for using three jacks for external 5.1
>
> options snd-hda-intel patch=,surround51.fw
>
>
> 0x15 0x02014010 retask headset as line out
> 0x16 0x02014011 ewtask headphone as line out
> 0x19 0x02014012 retask mic jack as line out
> 0x1a 0x90100111 subwoofer
>
>
> https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/
> mixer/paths/analog-output-lineout.conf
>
> https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/
> mixer/paths/analog-output-speaker.conf
>
>
> do line out profile and speaker profile still work since pulseaudio assume
> headphone jack must exist ?

Should i do the same as requested in comment 62? edit the mod probe file and firmware file??? advise.

to much to digest :)

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :
Download full text (5.9 KiB)

"
it is pulseaudio resampler mix I00 and I02 for O02

( 37.895| 0.000) D: [pulseaudio] resampler.c: Resampler:
( 37.895| 0.000) D: [pulseaudio] resampler.c: rate 44100 -> 44100 (method copy)
( 37.895| 0.000) D: [pulseaudio] resampler.c: format s16le -> s16le (intermediate s16le)
( 37.895| 0.000) D: [pulseaudio] resampler.c: channels 2 -> 3 (resampling 2)
( 37.895| 0.000) D: [pulseaudio] resampler.c: Channel matrix:
( 37.895| 0.000) D: [pulseaudio] resampler.c: I00 I01
( 37.895| 0.000) D: [pulseaudio] resampler.c: +------------
( 37.895| 0.000) D: [pulseaudio] resampler.c: O00 | 1.000 0.000
( 37.895| 0.000) D: [pulseaudio] resampler.c: O01 | 0.000 1.000
( 37.895| 0.000) D: [pulseaudio] resampler.c: O02 | 0.500 0.500
( 37.895| 0.000) I: [pulseaudio] remap.c: Using generic matrix remapping
( 37.895| 0.000) D: [pulseaudio] resampler.c: lfe filter activated (LR4 type), the crossover_freq = 120Hz

as surround21 seem copy LFE to channel 2 and 3,

  0.189| 0.000) I: [pulseaudio] alsa-sink.c: Using hardware mute control.
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: snd_pcm_dump():
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: Route conversion PCM
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: Transformation table:
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: 0 <- 0
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: 1 <- 1
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: 2 <- 2
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: 3 <- 2
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: Its setup is:
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: stream : PLAYBACK
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: access : MMAP_INTERLEAVED
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: format : S16_LE
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: subformat : STD
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: channels : 3
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: rate : 44100
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: exact rate : 44100 (44100/1)
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: msbits : 16
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: buffer_size : 8192
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: period_size : 4096
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: period_time : 92879
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: tstamp_mode : ENABLE
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: tstamp_type : MONOTONIC
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: period_step : 1
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: avail_min : 7603
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: period_event : 0
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: start_threshold : -1
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: stop_threshold : 4611686018427387904
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: silence_threshold: 0
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: silence_size : 0
( 0.189| 0.000) D: [pulseaudio] alsa-util.c: boundary : 4611686018427387904
( 0.189| 0.000) D: [pulseaudio] alsa-util....

Read more...

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

the driver won't use 2.1 channel map since line out type is line out and line_outs == 3

 if (spec->autocfg.line_out_type == AUTO_PIN_SPEAKER_OUT &&
      spec->autocfg.line_outs == 2)
   info->stream[SNDRV_PCM_STREAM_PLAYBACK].chmap =
    snd_pcm_2_1_chmaps;

only 5.1 channel map is available even you add the subwoofer pin and subwoofer is not connected to center/lfe

0x15 0x02014010
0x16 0x02014011
0x19 0x02014012
0x1a 0x90100111

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

only one line instead of two in alsa-base.conf

snd_hda_intel: model=,dell-headset-multi, patch=,/lib/firmware/hdajackretask.fw
snd_hda_intel: patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw

control.16 {
  iface CARD
  name 'Headset Mic Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }

this jack seem incorrect since bit 8 of headset mic is set

{ 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */

it is strange that no mic jack when early patching

0x19 0x03a11030

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

http://mailman.alsa-project.org/pipermail/alsa-devel/2015-September/097754.html

if headset mic jack cannot be used for jack sense, the alternatively is change the headphone jack (SND_JACK_HEADPHONE) to headset jack (SND_JACK_HEADSET) and skip the creation of headset mic phantom jack

this also require change of pulseaudio conf files

[Element Headset] to headphones.conf and headset-mic.conf

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

since your alienware have headset and headphone jack, only change the first headphone pin from SND_JACK_HEADPHONE to SND_JACK_HEADSET

 static int get_input_jack_type(struct hda_codec *codec, hda_nid_t nid)
 {
     unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid);
+ struct hda_gen_spec *spec = codec->spec;
+ struct auto_pin_cfg *cfg = &spec->autocfg;
     switch (get_defcfg_device(def_conf)) {
     case AC_JACK_LINE_OUT:
     case AC_JACK_SPEAKER:
         return SND_JACK_LINEOUT;
     case AC_JACK_HP_OUT:
+ if (spec->hs_mic_use_hp_sense && (nid == cfg->hp_pins[0]))
+ return SND_JACK_HEADSET;
         return SND_JACK_HEADPHONE;
     case AC_JACK_SPDIF_OUT:
     case AC_JACK_DIG_OTHER_OUT:

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #87)
> only one line instead of two in alsa-base.conf
>
>
> snd_hda_intel: model=,dell-headset-multi,
> patch=,/lib/firmware/hdajackretask.fw
> snd_hda_intel:
> patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-
> retask.fw
>
> control.16 {
> iface CARD
> name 'Headset Mic Jack'
> value false
> comment {
> access read
> type BOOLEAN
> count 1
> }
> }
>
> this jack seem incorrect since bit 8 of headset mic is set
>
>
> { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
>
> it is strange that no mic jack when early patching
>
> 0x19 0x03a11030

Should i copy this whole line into alsa-base.conf?

snd_hda_intel:
> patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-
> retask.fw

what about this code? also in alsa-base.conf?

control.16 {
> iface CARD
> name 'Headset Mic Jack'
> value false
> comment {
> access read
> type BOOLEAN
> count 1
> }
> }

This should be in hda-jack-retask.fw?

{ 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #89)
> since your alienware have headset and headphone jack, only change the first
> headphone pin from SND_JACK_HEADPHONE to SND_JACK_HEADSET
>
>
> static int get_input_jack_type(struct hda_codec *codec, hda_nid_t nid)
> {
> unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid);
> + struct hda_gen_spec *spec = codec->spec;
> + struct auto_pin_cfg *cfg = &spec->autocfg;
> switch (get_defcfg_device(def_conf)) {
> case AC_JACK_LINE_OUT:
> case AC_JACK_SPEAKER:
> return SND_JACK_LINEOUT;
> case AC_JACK_HP_OUT:
> + if (spec->hs_mic_use_hp_sense && (nid == cfg->hp_pins[0]))
> + return SND_JACK_HEADSET;
> return SND_JACK_HEADPHONE;
> case AC_JACK_SPDIF_OUT:
> case AC_JACK_DIG_OTHER_OUT:

which file for comment 88 and 89? which file to paste this code to?

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

http://mailman.alsa-project.org/pipermail/alsa-devel/2015-September/097841.html

> the most important piece of information is missing: *why* this change
is needed. I can guess, but it has to be clarified to all readers.
At best, give the background information why the current code doesn't
work for some cases and how your change will help.

the purpose of the patch is to make the combo jack of those laptops using alc668 to support headset only and drop support of headphone mic and headphone in order to enable auto mic selection by creating headset jack which report the state of both headphone and headset mic of the combo jack

> + unsigned int hs_mic_use_hp_sense:1;

> Please give a comment to this new field what it indicates.

flag to indicate the headset mic pin does not support jack sense and rely on the headphone pin jack sense

> > static int get_input_jack_type(struct hda_codec *codec, hda_nid_t nid)
> {
> unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid);
> + struct hda_gen_spec *spec = codec->spec;
> switch (get_defcfg_device(def_conf)) {
> case AC_JACK_LINE_OUT:
> case AC_JACK_SPEAKER:
> return SND_JACK_LINEOUT;
> case AC_JACK_HP_OUT:
> + if (spec->hs_mic_use_hp_sense)
> + return SND_JACK_HEADSET;
> return SND_JACK_HEADPHONE;

. No, this won't work for all cases. The code in hda_jack.c can't
assume that codec->spec points to a hda_gen_spec object. This can be
other codec drivers like ca0132 or hdmi.

> It means that you need either to move the flag into hda_codec struct
or to handle this check differently.

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/hda/hda_codec.h

/* codec information */
struct hda_codec {
 struct hdac_device core;

+ unsigned int hs_mic_use_hp_sense:1;
#ifdef CONFIG_PM
 unsigned long power_on_acct;
 unsigned long power_off_acct;
 unsigned long power_jiffies;
#endif

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/hda/hda_jack.c

static int get_input_jack_type(struct hda_codec *codec, hda_nid_t nid)
 {
     unsigned int def_conf = snd_hda_codec_get_pincfg(codec, nid);
+ struct hda_gen_spec *spec = codec->spec;
+ struct auto_pin_cfg *cfg = &spec->autocfg;
     switch (get_defcfg_device(def_conf)) {
     case AC_JACK_LINE_OUT:
     case AC_JACK_SPEAKER:
         return SND_JACK_LINEOUT;
     case AC_JACK_HP_OUT:
+ if (codec->hs_mic_use_hp_sense && (nid == cfg->hp_pins[0]))
+ return SND_JACK_HEADSET;
         return SND_JACK_HEADPHONE;
     case AC_JACK_SPDIF_OUT:
     case AC_JACK_DIG_OTHER_OUT:

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/Documentation/sound/alsa/HD-Audio.txt

Early Patching
~~~~~~~~~~~~~~
When CONFIG_SND_HDA_PATCH_LOADER=y is set, you can pass a "patch" as a
firmware file for modifying the HD-audio setup before initializing the
codec. This can work basically like the reconfiguration via sysfs in
the above, but it does it before the first codec configuration.

A patch file is a plain text file which looks like below:

------------------------------------------------------------------------
  [codec]
  0x12345678 0xabcd1234 2

  [model]
  auto

  [pincfg]
  0x12 0x411111f0

did you set the correct codec id and subsystem id and model

since you need model dell-headset-multi to call the function alc_fixup_headset_mode_alc668 to init the headset

and those pin fix to remove headphone mic by the original mic jack and subwoofer
remove the headphone jack so that line out type =speaker for the 2.1 channel map

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

!!Module: snd_hda_intel
 align_buffer_size : -1
 bdl_pos_adj : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
 beep_mode : N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N
 enable : Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y
 enable_msi : -1
 id : (null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
 index : -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1
 jackpoll_ms : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 model : ,dell-headset-multi,,(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)
 patch : hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)

I expect only one firmware file for the card 1 instead of firmware file for three cards

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/sound/pci/hda/patch_realtek.c

look like you need two new models for headset and 5.1

static const struct hda_model_fixup alc662_fixup_models[] = {
 {.id = ALC272_FIXUP_MARIO, .name = "mario"},
 {.id = ALC662_FIXUP_ASUS_MODE1, .name = "asus-mode1"},
 {.id = ALC662_FIXUP_ASUS_MODE2, .name = "asus-mode2"},
 {.id = ALC662_FIXUP_ASUS_MODE3, .name = "asus-mode3"},
 {.id = ALC662_FIXUP_ASUS_MODE4, .name = "asus-mode4"},
 {.id = ALC662_FIXUP_ASUS_MODE5, .name = "asus-mode5"},
 {.id = ALC662_FIXUP_ASUS_MODE6, .name = "asus-mode6"},
 {.id = ALC662_FIXUP_ASUS_MODE7, .name = "asus-mode7"},
 {.id = ALC662_FIXUP_ASUS_MODE8, .name = "asus-mode8"},
        {.id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
 {.id = ALC668_FIXUP_DELL_ALIENWARE, .name = "dell-alienware"},
 {.id = ALC668_FIXUP_DELL_ALIENWARE_51, .name = "dell-51"},
 {}
};

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

only need firmware for 0000:00:1b.0 (card 1) for the codec alc668

[ 13.653394] snd_hda_intel 0000:00:03.0: Applying patch firmware 'hda-jack-retask.fw'
[ 13.653506] snd_hda_intel 0000:00:1b.0: Applying patch firmware 'hda-jack-retask.fw'

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #93)
> https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/
> Documentation/sound/alsa/HD-Audio.txt
>
>
>
> Early Patching
> ~~~~~~~~~~~~~~
> When CONFIG_SND_HDA_PATCH_LOADER=y is set, you can pass a "patch" as a
> firmware file for modifying the HD-audio setup before initializing the
> codec. This can work basically like the reconfiguration via sysfs in
> the above, but it does it before the first codec configuration.
>
> A patch file is a plain text file which looks like below:
>
> ------------------------------------------------------------------------
> [codec]
> 0x12345678 0xabcd1234 2
>
> [model]
> auto
>
> [pincfg]
> 0x12 0x411111f0
>
> did you set the correct codec id and subsystem id and model
>
> since you need model dell-headset-multi to call the function
> alc_fixup_headset_mode_alc668 to init the headset
>
> and those pin fix to remove headphone mic by the original mic jack and
> subwoofer
> remove the headphone jack so that line out type =speaker for the 2.1 channel
> map

data from my hda-jack-restask.fw file

[codec]
0x10ec0668 0x102805a9 0

[pincfg]
0x12 0x99a30140
0x14 0x90170110
0x15 0x0321101f
0x16 0x411111f0
0x18 0x40030008
0x19 0x03a11030
0x1a 0x90100111
0x1b 0x411111f0
0x1d 0x41000001
0x1e 0x411111f0
0x1f 0x411111f0

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to mohammed imran from comment #97)
> (In reply to Raymond from comment #93)
> > https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/
> > Documentation/sound/alsa/HD-Audio.txt
> >
> >
> >
> > Early Patching
> > ~~~~~~~~~~~~~~
> > When CONFIG_SND_HDA_PATCH_LOADER=y is set, you can pass a "patch" as a
> > firmware file for modifying the HD-audio setup before initializing the
> > codec. This can work basically like the reconfiguration via sysfs in
> > the above, but it does it before the first codec configuration.
> >
> > A patch file is a plain text file which looks like below:
> >
> > ------------------------------------------------------------------------
> > [codec]
> > 0x12345678 0xabcd1234 2
> >
> > [model]
> > auto
> >
> > [pincfg]
> > 0x12 0x411111f0
> >
> > did you set the correct codec id and subsystem id and model
> >
> > since you need model dell-headset-multi to call the function
> > alc_fixup_headset_mode_alc668 to init the headset
> >
> > and those pin fix to remove headphone mic by the original mic jack and
> > subwoofer
> > remove the headphone jack so that line out type =speaker for the 2.1
> channel
> > map
>
> data from my hda-jack-restask.fw file
>
> [codec]
> 0x10ec0668 0x102805a9 0
>
> [pincfg]
> 0x12 0x99a30140
> 0x14 0x90170110
> 0x15 0x0321101f
> 0x16 0x411111f0
> 0x18 0x40030008
> 0x19 0x03a11030
> 0x1a 0x90100111
> 0x1b 0x411111f0
> 0x1d 0x41000001
> 0x1e 0x411111f0
> 0x1f 0x411111f0

Amended file in hda-jack-restask.fw
[codec]
0x10ec0668 0x102805a9 0

[pincfg]
0x12 0x99a30140
0x14 0x90170110
0x15 0x0321101f
0x16 0x411111f0
0x18 0x40030008
0x19 0x03a11030
0x1a 0x90100111
0x1b 0x03a1113c /* use as headset mic, without its own jack detect */
0x1d 0x41000001
0x1e 0x411111f0
0x1f 0x411111f0

&&&&&&&&&&&&&&&&&&&

data as per alsa-base.conf
#my entry

snd_hda_intel: model=,dell-headset-multi, patch=,/lib/firmware/hdajackretask.fw
snd_hda_intel: patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw

control.16 {
  iface CARD
  name 'Headset Mic Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }

am i right? or wrong? file attached.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #93)
> https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/tree/
> Documentation/sound/alsa/HD-Audio.txt
>
>
>
> Early Patching
> ~~~~~~~~~~~~~~
> When CONFIG_SND_HDA_PATCH_LOADER=y is set, you can pass a "patch" as a
> firmware file for modifying the HD-audio setup before initializing the
> codec. This can work basically like the reconfiguration via sysfs in
> the above, but it does it before the first codec configuration.
>
> A patch file is a plain text file which looks like below:
>
> ------------------------------------------------------------------------
> [codec]
> 0x12345678 0xabcd1234 2
>
> [model]
> auto
>
> [pincfg]
> 0x12 0x411111f0
>

#my entry

options snd_hda_intel: patch=hda-jack-retask.fw

control.16 {
  iface CARD
  name 'Headset Mic Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
> did you set the correct codec id and subsystem id and model
>
> since you need model dell-headset-multi to call the function
> alc_fixup_headset_mode_alc668 to init the headset
>
> and those pin fix to remove headphone mic by the original mic jack and
> subwoofer
> remove the headphone jack so that line out type =speaker for the 2.1 channel
> map

data form

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

only need this line

options snd-hda-intel model=,dell-headset-multi patch=,hda-jack-retask.fw

and remove the line created by hda-jack-retask in alsa-base.conf

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #100)
> only need this line
>
> options snd-hda-intel model=,dell-headset-multi patch=,hda-jack-retask.fw
>
> and remove the line created by hda-jack-retask in alsa-base.conf

I don't any other line has being created by hda-jack-restask. i have made the necessary amendments.

it is possible for you to remote into my system and you can run the test's needed.

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

[codec]
0x10ec0668 0x102805a9 0

[model]
dell-headset-multi

[pincfg]

0x16 0x411111f0
0x19 0x03a11030
0x1a 0x90100111

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218841
alsamixer

alsamixer state , have a look and tell.

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

You have to post output of alsa-info.sh

Check whether you have capture source which has three source

Internal Mic, headset Mic and Mic

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

http://bazaar.launchpad.net/~unity-settings-daemon-team/unity-settings-daemon/trunk/view/head:/plugins/media-keys/what-did-you-plug-in/pa-backend.c

The “what did you plug in”-dialog is a part of unity-settings-daemom,

this dialog is designed for those dell laptop with single combo jack and won't work on your dell alienware 14

as you cannot select your mic jack since the dialog is only looking of "Headphone mic jack"

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

(In reply to mohammed imran from comment #103)
> Created attachment 218841 [details]
> alsamixer
>
> alsamixer state , have a look and tell.

This look like you are using dell-headset-multi plus subwoofer fix up

If Headphone Mic cannot be fixed up to Mic jack by early patching , you need to modify patch_realtek.c to create dell-alienware model

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/sound/pci/hda/patch_realtek.c

 [ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = {
  .type = HDA_FIXUP_PINS,
  .v.pins = (const struct hda_pintbl[]) {
   { 0x19, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
   { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
   { }
  },
  .chained = true,
  .chain_id = ALC668_FIXUP_HEADSET_MODE
 },

the simplest way is

1) remove 'headphone mic" fixup from ALC668_FIXUP_DELL_MIC_NO_PRESENCE

2) remove node 0x16 "headphone'

3) add subwoofer pin

{ 0x16 , 0x411111f0 },

{ 0x1a , 0x90100111 },

recompile hda driver

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

enum {
 ALC662_FIXUP_ASPIRE,
 ALC662_FIXUP_LED_GPIO1,
 ALC662_FIXUP_IDEAPAD,
 ALC272_FIXUP_MARIO,
 ALC662_FIXUP_CZC_P10T,
 ALC662_FIXUP_SKU_IGNORE,
 ALC662_FIXUP_HP_RP5800,
 ALC662_FIXUP_ASUS_MODE1,
 ALC662_FIXUP_ASUS_MODE2,
 ALC662_FIXUP_ASUS_MODE3,
 ALC662_FIXUP_ASUS_MODE4,
 ALC662_FIXUP_ASUS_MODE5,
 ALC662_FIXUP_ASUS_MODE6,
 ALC662_FIXUP_ASUS_MODE7,
 ALC662_FIXUP_ASUS_MODE8,
 ALC662_FIXUP_NO_JACK_DETECT,
 ALC662_FIXUP_ZOTAC_Z68,
 ALC662_FIXUP_INV_DMIC,
 ALC662_FIXUP_DELL_MIC_NO_PRESENCE,
 ALC668_FIXUP_DELL_MIC_NO_PRESENCE,
 ALC662_FIXUP_HEADSET_MODE,
 ALC668_FIXUP_HEADSET_MODE,
 ALC662_FIXUP_BASS_MODE4_CHMAP,
 ALC662_FIXUP_BASS_16,
 ALC662_FIXUP_BASS_1A,
 ALC662_FIXUP_BASS_CHMAP,
 ALC668_FIXUP_AUTO_MUTE,
 ALC668_FIXUP_DELL_DISABLE_AAMIX,
 ALC668_FIXUP_DELL_XPS13,
 ALC662_FIXUP_ASUS_Nx50,
 ALC668_FIXUP_ASUS_Nx51,
        ALC668_FIXUP_DELL_ALIENWARE.
        A:C668_FIXUP_DELL_ALIENWARE_51,
};

 [ALC668_FIXUP_DELL_ALIENWARE] = {
  .type = HDA_FIXUP_PINS,
  .v.pins = (const struct hda_pintbl[]) {
                        { 0x16 , 0x411111f0 },
                        { 0x1a , 0x90100111 },
   { 0x1b, 0x03a1113c }, /* use as headset mic, without its own jack detect */
   { }
  },
  .chained = true,
  .chain_id = ALC668_FIXUP_HEADSET_MODE
 },

 [ALC668_FIXUP_DELL_ALIENWARE_51] = {
  .type = HDA_FIXUP_PINS,
  .v.pins = (const struct hda_pintbl[]) {
                   {0x15, 0x02014010},
                   {0x16, 0x02014011},
                   {0x19, 0x02014012},
   { }
  },

 },

static const struct hda_model_fixup alc662_fixup_models[] = {
 {.id = ALC272_FIXUP_MARIO, .name = "mario"},
 {.id = ALC662_FIXUP_ASUS_MODE1, .name = "asus-mode1"},
 {.id = ALC662_FIXUP_ASUS_MODE2, .name = "asus-mode2"},
 {.id = ALC662_FIXUP_ASUS_MODE3, .name = "asus-mode3"},
 {.id = ALC662_FIXUP_ASUS_MODE4, .name = "asus-mode4"},
 {.id = ALC662_FIXUP_ASUS_MODE5, .name = "asus-mode5"},
 {.id = ALC662_FIXUP_ASUS_MODE6, .name = "asus-mode6"},
 {.id = ALC662_FIXUP_ASUS_MODE7, .name = "asus-mode7"},
 {.id = ALC662_FIXUP_ASUS_MODE8, .name = "asus-mode8"},
        {.id = ALC668_FIXUP_DELL_MIC_NO_PRESENCE, .name = "dell-headset-multi"},
 {.id = ALC668_FIXUP_DELL_ALIENWARE, .name = "dell-alienware"},
 {.id = ALC668_FIXUP_DELL_ALIENWARE_51, .name = "dell-51"},
 {}
};

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

(In reply to mohammed imran from comment #103)
> Created attachment 218841 [details]
> alsamixer
>
> alsamixer state , have a look and tell.

do the headset mic work as expected or not ?

the early patching fix the pin before driver apply dell-headset-multi model pin fixup

so the mic jack cannot be fix up

you can use hint to disable loopback mixing if this is any noise simolar to xps 13 using ALC668_FIXUP_DELL_DISABLE_AAMIX

[hint]
mixer_nid=0

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #104)
> You have to post output of alsa-info.sh
>
> Check whether you have capture source which has three source
>
> Internal Mic, headset Mic and Mic

Your ALSA information is located at

http://www.alsa-project.org/db/?f=cc4c2d4193b7b9ba3ee9be368f1fecb023930b3d

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #106)
> (In reply to mohammed imran from comment #103)
> > Created attachment 218841 [details]
> > alsamixer
> >
> > alsamixer state , have a look and tell.
>
> This look like you are using dell-headset-multi plus subwoofer fix up
>
>
> If Headphone Mic cannot be fixed up to Mic jack by early patching , you
> need to modify patch_realtek.c to create dell-alienware model

Yup you are right, when plugging in my earphone (Apple iphones model) i get to see the unity dialog, asking me what i have inserted. Pic attached.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 218901
dialog box unity

Yup you are right, when plugging in my earphone (Apple iphones model) i get to see the unity dialog, asking me what i have inserted. Pic attached.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to mohammed imran from comment #112)
> Created attachment 218901 [details]
> dialog box unity
>
> Yup you are right, when plugging in my earphone (Apple iphones model) i get
> to see the unity dialog, asking me what i have inserted. Pic attached.

But the dialog only pops up when i plug it in my headphones with mic icon, the third plughole of the three O-O-O (Mic-HeadPhone-Headphone/w Mic).

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #102)
> [codec]
> 0x10ec0668 0x102805a9 0
>
> [model]
> dell-headset-multi
>
> [pincfg]
>
> 0x16 0x411111f0
> 0x19 0x03a11030
> 0x1a 0x90100111

[codec]
0x10ec0668 0x102805a9 0

[model]
dell-headset-multi

[pincfg]
0x12 0x99a30140
0x14 0x90170110
0x15 0x0321101f
0x16 0x411111f0
0x18 0x40030008
0x19 0x03a11030
0x1a 0x90100111
0x1b 0x03a1113c /* use as headset mic, without its own jack detect */
0x1d 0x41000001
0x1e 0x411111f0
0x1f 0x411111f0

ok, do i need to remove the extra pincfg?

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #107)
> https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/sound/pci/
> hda/patch_realtek.c
>
>
> [ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = {
> .type = HDA_FIXUP_PINS,
> .v.pins = (const struct hda_pintbl[]) {
> { 0x19, 0x03a1913d }, /* use as headphone mic, without
> its own jack
> detect */
> { 0x1b, 0x03a1113c }, /* use as headset mic, without
> its own jack detect
> */
> { }
> },
> .chained = true,
> .chain_id = ALC668_FIXUP_HEADSET_MODE
> },
>
>
> the simplest way is
>
> 1) remove 'headphone mic" fixup from ALC668_FIXUP_DELL_MIC_NO_PRESENCE
>
> 2) remove node 0x16 "headphone'
>
> 3) add subwoofer pin
>
> { 0x16 , 0x411111f0 },
>
> { 0x1a , 0x90100111 },
>
>
> recompile hda driver

Umm, how to do this patching stuff and where to paste this code? Was your a suggestion or a test for me to perform?

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

(In reply to mohammed imran from comment #110)
> (In reply to Raymond from comment #104)
> > You have to post output of alsa-info.sh
> >
> > Check whether you have capture source which has three source
> >
> > Internal Mic, headset Mic and Mic
>
> Your ALSA information is located at
>
> http://www.alsa-project.org/db/?f=cc4c2d4193b7b9ba3ee9be368f1fecb023930b3d

snd_hda_intel: model=,dell-headset-multi patch=,hda-jack-retask.fw
snd_hda_intel: patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw

you still have two lines in alsa-base.conf

options snd-hda-intel model=,dell-headset-multi patch=,hda-jack-retask.fw
options snd-hda-intel patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw

you have to remove

options snd-hda-intel patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Created attachment 219001
Comment 116

See only one line that you have asked should remain? i don't know where the extra one got inserted.

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #116)
> (In reply to mohammed imran from comment #110)
> > (In reply to Raymond from comment #104)
> > > You have to post output of alsa-info.sh
> > >
> > > Check whether you have capture source which has three source
> > >
> > > Internal Mic, headset Mic and Mic
> >
> > Your ALSA information is located at
> >
> > http://www.alsa-project.org/db/?f=cc4c2d4193b7b9ba3ee9be368f1fecb023930b3d
>
> snd_hda_intel: model=,dell-headset-multi patch=,hda-jack-retask.fw
> snd_hda_intel:
> patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-
> retask.fw
>
>
>
> you still have two lines in alsa-base.conf
>
> options snd-hda-intel model=,dell-headset-multi patch=,hda-jack-retask.fw
> options snd-hda-intel
> patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-
> retask.fw
>
> you have to remove
>
> options snd-hda-intel
> patch=hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-retask.fw,hda-jack-
> retask.fw

See only one line that you have asked should remain? i don't know where the extra one got inserted.

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

(In reply to mohammed imran from comment #115)
> (In reply to Raymond from comment #107)
> >
> https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/plain/sound/pci/
> > hda/patch_realtek.c
> >
> >
> > [ALC668_FIXUP_DELL_MIC_NO_PRESENCE] = {
> > .type = HDA_FIXUP_PINS,
> > .v.pins = (const struct hda_pintbl[]) {
> > { 0x19, 0x03a1913d }, /* use as headphone mic, without
> its own jack
> > detect */
> > { 0x1b, 0x03a1113c }, /* use as headset mic, without
> its own jack detect
> > */
> > { }
> > },
> > .chained = true,
> > .chain_id = ALC668_FIXUP_HEADSET_MODE
> > },
> >

> Umm, how to do this patching stuff and where to paste this code? Was your a
> suggestion or a test for me to perform?

just append at the end of alc662_fixup[] after [ALC668_FIXUP_ASUS_Nx51]

s

Revision history for this message
In , superquad.vortex2 (superquad.vortex2-linux-kernel-bugs) wrote :

to enable both headphone and headset, you need to test whether headset and headphone can share volume control by prefered_dacs, this force driver assigned DACs to speaker and bass speaker first

 static hda_nid_t preferred_pair[] = {
+ 0x14, 0x02,
+ 0x1a, 0x03,
+ 0x15, 0x04,
+ 0x16, 0x04,
+ 0
+ };

+ spec->gen.preferred_dacs = preferred_pair;

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #120)
> to enable both headphone and headset, you need to test whether headset and
> headphone can share volume control by prefered_dacs, this force driver
> assigned DACs to speaker and bass speaker first
>
>
> static hda_nid_t preferred_pair[] = {
> + 0x14, 0x02,
> + 0x1a, 0x03,
> + 0x15, 0x04,
> + 0x16, 0x04,
> + 0
> + };
>
> + spec->gen.preferred_dacs = preferred_pair;

So you want me to copy the code above, and edit the patch_realtek.c with the changes above and then recompile a new kernel? right

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Hi,

Sorry was away on vacation.

Any update on the issue?

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

(In reply to Raymond from comment #120)
> to enable both headphone and headset, you need to test whether headset and
> headphone can share volume control by prefered_dacs, this force driver
> assigned DACs to speaker and bass speaker first
>
>
> static hda_nid_t preferred_pair[] = {
> + 0x14, 0x02,
> + 0x1a, 0x03,
> + 0x15, 0x04,
> + 0x16, 0x04,
> + 0
> + };
>
> + spec->gen.preferred_dacs = preferred_pair;

Hey Raymond, any updates yet? or progress? Please advise?

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Hi, can anyone else up take this bug or issue up?

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

any update on this issue?

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

So you fix the sound:

1. Open a Terminal (Ctrl + Alt + T).

2. Write 'sudo su' to login as root.

3. Install via apt 'alsa-tools-gui'.

4. Logout via exit.

5. Write 'hdajackretask' and press enter.

6. Click on 'Intel Haswell HDMI' and select 'Realtek ALC3661'.

7. A lot of new entrys are visible. Select 'Show unconnected pins'.

8. Click on 'Overwrite' on Pin ID '0x1a'.

9. Click on the Context Menu and select 'Line out (Center/LFE)'.

10. Click on 'Apply now' and enter your user password.

11. Click on 'Install boot overwrite' to save the settings permanently.

12. Click on your Volume Icon on the top (Ubuntu Unity) and remove the marker 'mute'.

13. Reboot and your sound work perfect.

Revision history for this message
In , gaznims (gaznims-linux-kernel-bugs) wrote :

Created attachment 255623
After reboot

Followed the Above on my Alienware 18 running Linux Mint 18.1

I did everything in the list above

apart from "Click on your Volume Icon on the top (Ubuntu Unity) and remove the marker 'mute'."

as It didn't show anything different in my Sound properties

The attachment shown is after a reboot

So its back to the drawing board for me
Cheers
Gaz

Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

Mine is Alienware 14, and sound is fine now, a major improvement, but as you see the developer of person assisting me,has now disappeared.
I am on Ubuntu 16.10.

mail me on <email address hidden> or come to ubuntu IRC channel and we shall take it from their. see what can be done.

regards.

Revision history for this message
In , gaznims (gaznims-linux-kernel-bugs) wrote :

Ok I did a full reinstall this arvo
First thing I did was the Fix above

But sadly it has had no effect
Back to the drawing board

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

https://launchpad.net/~penalvch

Ref to comment no #7 and upon testing upstream kernel, i confirm the bug to exist.

Kernel tested was, linux-image-4.10.0-041000-generic_4.10.0-041000.201702191831_amd64.deb &
4.8.0-45-generic

Please advise, still see analog 4.o surround sound option, with no option for sub-woofer option to toggle.
But if i plug in my headphone jack w/o mic, and if i select 4.0 output i can hear in my headphones sound Rear Left and Rear Right, soundoutput.
michttps://goo.gl/images/HaFA3W

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :
tags: removed: amd64 apport-bug latest-bios-a09 xenial
tags: added: amd64 apport-bug latest-bios-a09 xenial yakkety
Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

I hope someone pics up our bug report.

summary: - Realtek ALC3661 Alienware14
+ Realtek ALC3661 Alienware14 / Sountoutput / Jack
summary: - Realtek ALC3661 Alienware14 / Sountoutput / Jack
+ Realtek ALC3661 Alienware14 / Soundoutput / Jack
Revision history for this message
In , imranmohd72 (imranmohd72-linux-kernel-bugs) wrote :

sudo] password for immu:
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC3661 Analog [ALC3661 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

sudo lspci -v | grep -A7 -i "audio"
00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06)
 Subsystem: Dell Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller
 Flags: bus master, fast devsel, latency 0, IRQ 32
 Memory at d2710000 (64-bit, non-prefetchable) [size=16K]
 Capabilities: [50] Power Management version 2
 Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit-
 Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
 Kernel driver in use: snd_hda_intel
 Kernel modules: snd_hda_intel
--
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05)
 Subsystem: Dell 8 Series/C220 Series Chipset High Definition Audio Controller
 Flags: bus master, fast devsel, latency 0, IRQ 31
 Memory at d2714000 (64-bit, non-prefetchable) [size=16K]
 Capabilities: [50] Power Management version 2
 Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
 Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
 Capabilities: [100] Virtual Channel
 Kernel driver in use: snd_hda_intel

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

sudo aplay -l
[sudo] password for immu:
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: ALC3661 Analog [ALC3661 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Revision history for this message
In , gaznims (gaznims-linux-kernel-bugs) wrote :

Here are mine

gaz-alienware # arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3661 Analog [ALC3661 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Wow I wonder where HDMI has gone

Revision history for this message
In , gaznims (gaznims-linux-kernel-bugs) wrote :

Created attachment 255685
Sound

Found them

gazalienware-Alienware-18 ~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC3661 Analog [ALC3661 Analog]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

gaz-alienware # lspci | grep -i audio
00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 04)
01:00.1 Audio device: NVIDIA Corporation GK106 HDMI Audio Controller (rev a1)

Revision history for this message
In , gaznims (gaznims-linux-kernel-bugs) wrote :

Created attachment 255687
Alsa

Revision history for this message
In , gaznims (gaznims-linux-kernel-bugs) wrote :

Created attachment 255689
htmi

Revision history for this message
In , gaznims (gaznims-linux-kernel-bugs) wrote :

Created attachment 255691
more

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :
Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :
Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :
Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :
Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :
Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :
Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :
affects: linux → pulseaudio (Ubuntu)
Changed in pulseaudio (Ubuntu):
importance: Undecided → Unknown
status: New → Unknown
Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :

Alsamixer setting before setting the 8. Click on 'Overwrite' on Pin ID '0x1a'.

9. Click on the Context Menu and select 'Line out (Center/LFE)'.

Revision history for this message
Mohd Imran Jamadar (imranmohd72) wrote :
tags: removed: latest-bios-a09
Changed in alsa-driver:
status: Unknown → Confirmed
Changed in pulseaudio (Ubuntu):
status: Unknown → Confirmed
Revision history for this message
In , kakarot23 (kakarotxgoku43) wrote :

Investing basics lay the foundation for individuals seeking to navigate the world of financial markets and wealth accumulation. At its core, investing involves deploying capital with the expectation of generating returns over time. https://thefinancialappetite.net/category/getting-started/investing-basics/

To post a comment you must log in.