* Update patch for codecs alias name for Dell @ 2013-11-27 10:01 Kailang 2013-11-27 10:51 ` Takashi Iwai 0 siblings, 1 reply; 8+ messages in thread From: Kailang @ 2013-11-27 10:01 UTC (permalink / raw) To: Takashi Iwai; +Cc: alsa-devel [-- Attachment #1: Type: text/plain, Size: 97 bytes --] Hi Takashi, Dell assigned more codecs for alias name. I update in attach patch. Thanks. Kailang [-- Attachment #2: 0000-add-codecs-alias-name-for-Dell.patch --] [-- Type: application/octet-stream, Size: 2376 bytes --] >From 520b8cebfd20cda4976ed24fe18bb8bb6bed1809 Mon Sep 17 00:00:00 2001 From: Kailang Yang <kailang@realtek.com> Date: Wed, 27 Nov 2013 17:41:32 +0800 Subject: [PATCH] ALSA: hda/realtek - Add codecs alias name for Dell Dell assigned alias name for more codecs. ALC3220 ALC3221 ALC3223 ALC3226 ALC3234 ALC3661. Signed-off-by: Kailang Yang <kailang@realtek.com> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c4ad9d1..3f4a6e6 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -4393,20 +4393,36 @@ static int patch_alc269(struct hda_codec *codec) case 0x10ec0280: case 0x10ec0290: + if (codec->bus->pci->subsystem_vendor == 0x1028) + err = alc_codec_rename(codec, "ALC3220"); spec->codec_variant = ALC269_TYPE_ALC280; + if (err < 0) + goto error; break; case 0x10ec0282: + if (codec->bus->pci->subsystem_vendor == 0x1028) + err = alc_codec_rename(codec, "ALC3221"); spec->codec_variant = ALC269_TYPE_ALC282; + if (err < 0) + goto error; break; case 0x10ec0233: case 0x10ec0283: + if (codec->bus->pci->subsystem_vendor == 0x1028) + err = alc_codec_rename(codec, "ALC3223"); spec->codec_variant = ALC269_TYPE_ALC283; spec->shutup = alc283_shutup; spec->init_hook = alc283_init; + if (err < 0) + goto error; break; case 0x10ec0284: case 0x10ec0292: + if (codec->bus->pci->subsystem_vendor == 0x1028) + err = alc_codec_rename(codec, "ALC3226"); spec->codec_variant = ALC269_TYPE_ALC284; + if (err < 0) + goto error; break; case 0x10ec0285: case 0x10ec0293: @@ -4416,7 +4432,11 @@ static int patch_alc269(struct hda_codec *codec) spec->codec_variant = ALC269_TYPE_ALC286; break; case 0x10ec0255: + if (codec->bus->pci->subsystem_vendor == 0x1028) + err = alc_codec_rename(codec, "ALC3234"); spec->codec_variant = ALC269_TYPE_ALC255; + if (err < 0) + goto error; break; } @@ -5105,6 +5125,13 @@ static int patch_alc662(struct hda_codec *codec) goto error; } + if (codec->bus->pci->subsystem_vendor == 0x1028 && + codec->vendor_id == 0x10ec0668) { + err = alc_codec_rename(codec, "ALC3661"); + if (err < 0) + goto error; + } + /* automatic parse from the BIOS config */ err = alc662_parse_auto_config(codec); if (err < 0) [-- Attachment #3: Type: text/plain, Size: 0 bytes --] ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: Update patch for codecs alias name for Dell 2013-11-27 10:01 Update patch for codecs alias name for Dell Kailang @ 2013-11-27 10:51 ` Takashi Iwai 2013-11-28 7:30 ` Kailang 0 siblings, 1 reply; 8+ messages in thread From: Takashi Iwai @ 2013-11-27 10:51 UTC (permalink / raw) To: Kailang; +Cc: alsa-devel At Wed, 27 Nov 2013 18:01:03 +0800, Kailang wrote: > > Hi Takashi, > > Dell assigned more codecs for alias name. > I update in attach patch. It's better to handle the error immediately, i.e. put if (err < 0) goto error; just after each alc_codec_rename() call. Or, it's even better to introduce a table like struct alc_codec_rename_pci_table { unsigned int codec_vendor; unsigned short pci_subvendor; unsigned short pci_subdevice; const char *name; }; static struct alc_codec_rename_table rename_pci_tbl[] = { { 0x10ec0280, 0x1028, 0, "ALC3220" }, { 0x10ec0282, 0x1028, 0, "ALC3221" }, { 0x10280284, 0x1028, 0, "ALC3226" }, ..... { } /* terminator */ }; Then add a check like: static int alc_codec_rename_from_preset(struct hda_codec *codec) { const struct alc_codec_rename_table *p; const struct alc_codec_rename_pci_table *q; ..... for (q = rename_pci_tbl; q->codec_vendor; q++) { if (q->vendor_id != codec->vendor_id) continue; if (q->pci_subsystem != codec->bus->pci->subsystem_vendor) continue; if (!q->pci_subdevice || q->pci_subdevice == codec->bus->pci->subsystem_device) return alc_codec_rename(codec, q->name); } return 0; } thanks, Takashi ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Update patch for codecs alias name for Dell 2013-11-27 10:51 ` Takashi Iwai @ 2013-11-28 7:30 ` Kailang 2013-11-28 10:56 ` Takashi Iwai 0 siblings, 1 reply; 8+ messages in thread From: Kailang @ 2013-11-28 7:30 UTC (permalink / raw) To: Takashi Iwai; +Cc: alsa-devel Hi Takashi, I remodified the code as belowing. >From 888b51395ebab411660401f856e3af7988d9240b Mon Sep 17 00:00:00 2001 From: Kailang Yang <kailang@realtek.com> Date: Thu, 28 Nov 2013 15:23:20 +0800 Subject: [PATCH] ALSA: hda/realtek - Add more codecs alias name for Dell Dell assigned alias name for more codecs. ALC3220 ALC3221 ALC3223 ALC3226 ALC3234 ALC3661. Signed-off-by: Kailang Yang <kailang@realtek.com> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index c4ad9d1..ece86ca 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -903,7 +903,7 @@ static int alc_codec_rename(struct hda_codec *codec, const char *name) } /* - * Rename codecs appropriately from COEF value + * Rename codecs appropriately from COEF value or subvendor id */ struct alc_codec_rename_table { unsigned int vendor_id; @@ -912,6 +912,13 @@ struct alc_codec_rename_table { const char *name; }; +struct alc_codec_rename_pci_table { + unsigned int codec_vendor_id; + unsigned short pci_subvendor; + unsigned short pci_subdevice; + const char *name; +}; + static struct alc_codec_rename_table rename_tbl[] = { { 0x10ec0269, 0xfff0, 0x3010, "ALC277" }, { 0x10ec0269, 0xf0f0, 0x2010, "ALC259" }, @@ -931,9 +938,20 @@ static struct alc_codec_rename_table rename_tbl[] = { { } /* terminator */ }; +static struct alc_codec_rename_pci_table rename_pci_tbl[] = { + { 0x10ec0280, 0x1028, 0, "ALC3220" }, + { 0x10ec0282, 0x1028, 0, "ALC3221" }, + { 0x10ec0283, 0x1028, 0, "ALC3223" }, + { 0x10ec0292, 0x1028, 0, "ALC3226" }, + { 0x10ec0255, 0x1028, 0, "ALC3234" }, + { 0x10ec0668, 0x1028, 0, "ALC3661" }, + { } /* terminator */ +}; + static int alc_codec_rename_from_preset(struct hda_codec *codec) { const struct alc_codec_rename_table *p; + const struct alc_codec_rename_pci_table *q; for (p = rename_tbl; p->vendor_id; p++) { if (p->vendor_id != codec->vendor_id) @@ -941,10 +959,18 @@ static int alc_codec_rename_from_preset(struct hda_codec *codec) if ((alc_get_coef0(codec) & p->coef_mask) == p->coef_bits) return alc_codec_rename(codec, p->name); } + for (q = rename_pci_tbl; q->codec_vendor_id; q++) { + if (q->codec_vendor_id != codec->vendor_id) + continue; + if (q->pci_subvendor != codec->bus->pci->subsystem_vendor) + continue; + if (!q->pci_subdevice || + q->pci_subdevice == codec->bus->pci->subsystem_device) + return alc_codec_rename(codec, q->name); + } return 0; } - /* * Digital-beep handlers */ > At Wed, 27 Nov 2013 18:01:03 +0800, > Kailang wrote: >> >> Hi Takashi, >> >> Dell assigned more codecs for alias name. >> I update in attach patch. > > It's better to handle the error immediately, i.e. put > if (err < 0) > goto error; > just after each alc_codec_rename() call. > > Or, it's even better to introduce a table like > > struct alc_codec_rename_pci_table { > unsigned int codec_vendor; > unsigned short pci_subvendor; > unsigned short pci_subdevice; > const char *name; > }; > > static struct alc_codec_rename_table rename_pci_tbl[] = { > { 0x10ec0280, 0x1028, 0, "ALC3220" }, > { 0x10ec0282, 0x1028, 0, "ALC3221" }, > { 0x10280284, 0x1028, 0, "ALC3226" }, > ..... > { } /* terminator */ > }; > > Then add a check like: > > static int alc_codec_rename_from_preset(struct hda_codec *codec) > { > const struct alc_codec_rename_table *p; > const struct alc_codec_rename_pci_table *q; > > ..... > > for (q = rename_pci_tbl; q->codec_vendor; q++) { > if (q->vendor_id != codec->vendor_id) > continue; > if (q->pci_subsystem != codec->bus->pci->subsystem_vendor) > continue; > if (!q->pci_subdevice || > q->pci_subdevice == codec->bus->pci->subsystem_device) > return alc_codec_rename(codec, q->name); > } > > return 0; > } > > > thanks, > > Takashi > > ------Please consider the environment before printing this e-mail. ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: Update patch for codecs alias name for Dell 2013-11-28 7:30 ` Kailang @ 2013-11-28 10:56 ` Takashi Iwai 2014-02-02 0:20 ` Chris M 0 siblings, 1 reply; 8+ messages in thread From: Takashi Iwai @ 2013-11-28 10:56 UTC (permalink / raw) To: Kailang; +Cc: alsa-devel At Thu, 28 Nov 2013 15:30:56 +0800, Kailang wrote: > > Hi Takashi, > > I remodified the code as belowing. > > >From 888b51395ebab411660401f856e3af7988d9240b Mon Sep 17 00:00:00 2001 > From: Kailang Yang <kailang@realtek.com> > Date: Thu, 28 Nov 2013 15:23:20 +0800 > Subject: [PATCH] ALSA: hda/realtek - Add more codecs alias name for Dell > > Dell assigned alias name for more codecs. > ALC3220 ALC3221 ALC3223 ALC3226 ALC3234 ALC3661. > > Signed-off-by: Kailang Yang <kailang@realtek.com> Thanks, applied now, but it's targeted for 3.14 kernel, as this is no urgent fixes. You can find it in for-next branch of sound git tree. Takashi ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Update patch for codecs alias name for Dell 2013-11-28 10:56 ` Takashi Iwai @ 2014-02-02 0:20 ` Chris M 2014-02-18 21:31 ` Chris M 0 siblings, 1 reply; 8+ messages in thread From: Chris M @ 2014-02-02 0:20 UTC (permalink / raw) To: alsa-devel Takashi Iwai <tiwai <at> suse.de> writes: > > At Thu, 28 Nov 2013 15:30:56 +0800, > Kailang wrote: > > > > Hi Takashi, > > > > I remodified the code as belowing. > > > > >From 888b51395ebab411660401f856e3af7988d9240b Mon Sep 17 00:00:00 2001 > > From: Kailang Yang <kailang <at> realtek.com> > > Date: Thu, 28 Nov 2013 15:23:20 +0800 > > Subject: [PATCH] ALSA: hda/realtek - Add more codecs alias name for Dell > > > > Dell assigned alias name for more codecs. > > ALC3220 ALC3221 ALC3223 ALC3226 ALC3234 ALC3661. > > > > Signed-off-by: Kailang Yang <kailang <at> realtek.com> > > Thanks, applied now, but it's targeted for 3.14 kernel, as this is no > urgent fixes. You can find it in for-next branch of sound git tree. > > Takashi > Sorry for asking this on a developer forum, but I'm pretty sure I finally found the answer here. I had considered the need to wait it out for a kernel upgrade (beyond 3.12 in Debian Testing/Jessie). I have no sound right now. How do I apply this patch? When I installed Debian Testing, I installed a targeted initrd, and I was considering retrying with a generic initrd - although I think this thread just saved me from that. Will an established initrd come into play? Will I have to recompile the 3.12 kernel? The Dell codec alias name is ALC3223. Thanks ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Update patch for codecs alias name for Dell 2014-02-02 0:20 ` Chris M @ 2014-02-18 21:31 ` Chris M 2014-02-21 14:54 ` Takashi Iwai 0 siblings, 1 reply; 8+ messages in thread From: Chris M @ 2014-02-18 21:31 UTC (permalink / raw) To: alsa-devel Chris M <cmanougian <at> yahoo.com> writes: > > Takashi Iwai <tiwai <at> suse.de> writes: > > > > > At Thu, 28 Nov 2013 15:30:56 +0800, > > Kailang wrote: > > > > > > Hi Takashi, > > > > > > I remodified the code as belowing. > > > > > > >From 888b51395ebab411660401f856e3af7988d9240b Mon Sep 17 00:00:00 2001 > > > From: Kailang Yang <kailang <at> realtek.com> > > > Date: Thu, 28 Nov 2013 15:23:20 +0800 > > > Subject: [PATCH] ALSA: hda/realtek - Add more codecs alias name for Dell > > > > > > Dell assigned alias name for more codecs. > > > ALC3220 ALC3221 ALC3223 ALC3226 ALC3234 ALC3661. > > > > > > Signed-off-by: Kailang Yang <kailang <at> realtek.com> > > > > Thanks, applied now, but it's targeted for 3.14 kernel, as this is no > > urgent fixes. You can find it in for-next branch of sound git tree. > > > > Takashi > > > > Sorry for asking this on a developer forum, but I'm pretty sure I finally > found the answer here. I had considered the need to wait it out for a kernel > upgrade (beyond 3.12 in Debian Testing/Jessie). I have no sound right now. > How do I apply this patch? When I installed Debian Testing, I installed a > targeted initrd, and I was considering retrying with a generic initrd - > although I think this thread just saved me from that. Will an established > initrd come into play? Will I have to recompile the 3.12 kernel? > > The Dell codec alias name is ALC3223. > > Thanks This is a follow up question for anyone. This boils down to a general question about new kernel compilation. To try and solve my no sound issue, I waited until 3.14-rc3 kernel went live. In the 3.14-rc3 kernel source folder, this patch is located at: sound/pci/hda/patch_realtek.c I thought that simply compiling the latest kernel, and then installing it, would apply all relevant patches (more than the realtek patch may be in play), but now I'm not so sure. The question is this: Does a 3.14-rc3 compiled kernel already include the above patch? Or, because it is labeled as a "patch" within the source, do I have to actually patch the source before compiling? IOW, does the patch get compiled, or does anything labeled as a patch within the source still have to be manually patched against the kernel? Thanks to anyone who can answer this. I complied and installed the 3.14-rc3 kernel without a problem. It was the default kernel in grub. But I'm still dealing with the exact same no sound issue as if booting into 3.12. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Update patch for codecs alias name for Dell 2014-02-18 21:31 ` Chris M @ 2014-02-21 14:54 ` Takashi Iwai 2014-03-05 7:16 ` Chris M 0 siblings, 1 reply; 8+ messages in thread From: Takashi Iwai @ 2014-02-21 14:54 UTC (permalink / raw) To: Chris M; +Cc: alsa-devel At Tue, 18 Feb 2014 21:31:07 +0000 (UTC), Chris M wrote: > > Chris M <cmanougian <at> yahoo.com> writes: > > > > > Takashi Iwai <tiwai <at> suse.de> writes: > > > > > > > > At Thu, 28 Nov 2013 15:30:56 +0800, > > > Kailang wrote: > > > > > > > > Hi Takashi, > > > > > > > > I remodified the code as belowing. > > > > > > > > >From 888b51395ebab411660401f856e3af7988d9240b Mon Sep 17 00:00:00 2001 > > > > From: Kailang Yang <kailang <at> realtek.com> > > > > Date: Thu, 28 Nov 2013 15:23:20 +0800 > > > > Subject: [PATCH] ALSA: hda/realtek - Add more codecs alias name for Dell > > > > > > > > Dell assigned alias name for more codecs. > > > > ALC3220 ALC3221 ALC3223 ALC3226 ALC3234 ALC3661. > > > > > > > > Signed-off-by: Kailang Yang <kailang <at> realtek.com> > > > > > > Thanks, applied now, but it's targeted for 3.14 kernel, as this is no > > > urgent fixes. You can find it in for-next branch of sound git tree. > > > > > > Takashi > > > > > > > Sorry for asking this on a developer forum, but I'm pretty sure I finally > > found the answer here. I had considered the need to wait it out for a kernel > > upgrade (beyond 3.12 in Debian Testing/Jessie). I have no sound right now. > > How do I apply this patch? When I installed Debian Testing, I installed a > > targeted initrd, and I was considering retrying with a generic initrd - > > although I think this thread just saved me from that. Will an established > > initrd come into play? Will I have to recompile the 3.12 kernel? > > > > The Dell codec alias name is ALC3223. > > > > Thanks > > This is a follow up question for anyone. > > This boils down to a general question about new kernel compilation. > > To try and solve my no sound issue, I waited until 3.14-rc3 kernel went live. > > In the 3.14-rc3 kernel source folder, this patch is located at: > sound/pci/hda/patch_realtek.c > > I thought that simply compiling the latest kernel, and then installing it, > would apply all relevant patches (more than the realtek patch may be in > play), but now I'm not so sure. > > The question is this: Does a 3.14-rc3 compiled kernel already include the > above patch? Or, because it is labeled as a "patch" within the source, do I > have to actually patch the source before compiling? Yes, it's already included in 3.14-rc3. But I doubt it'll help anything for your "audio" problem. The patch merely changes the codec name string, nothing else. You're chasing a wrong fish. Takashi > IOW, does the patch get compiled, or does anything labeled as a patch within > the source still have to be manually patched against the kernel? > > Thanks to anyone who can answer this. I complied and installed the 3.14-rc3 > kernel without a problem. It was the default kernel in grub. But I'm still > dealing with the exact same no sound issue as if booting into 3.12. > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Update patch for codecs alias name for Dell 2014-02-21 14:54 ` Takashi Iwai @ 2014-03-05 7:16 ` Chris M 0 siblings, 0 replies; 8+ messages in thread From: Chris M @ 2014-03-05 7:16 UTC (permalink / raw) To: alsa-devel Takashi Iwai <tiwai <at> suse.de> writes: > > At Tue, 18 Feb 2014 21:31:07 +0000 (UTC), > Chris M wrote: > > > > Chris M <cmanougian <at> yahoo.com> writes: > > > > > > > > Takashi Iwai <tiwai <at> suse.de> writes: > > > > > > > > > > > At Thu, 28 Nov 2013 15:30:56 +0800, > > > > Kailang wrote: > > > > > > > > > > Hi Takashi, > > > > > > > > > > I remodified the code as belowing. > > > > > > > > > > >From 888b51395ebab411660401f856e3af7988d9240b Mon Sep 17 00:00:00 2001 > > > > > From: Kailang Yang <kailang <at> realtek.com> > > > > > Date: Thu, 28 Nov 2013 15:23:20 +0800 > > > > > Subject: [PATCH] ALSA: hda/realtek - Add more codecs alias name for Dell > > > > > > > > > > Dell assigned alias name for more codecs. > > > > > ALC3220 ALC3221 ALC3223 ALC3226 ALC3234 ALC3661. > > > > > > > > > > Signed-off-by: Kailang Yang <kailang <at> realtek.com> > > > > > > > > Thanks, applied now, but it's targeted for 3.14 kernel, as this is no > > > > urgent fixes. You can find it in for-next branch of sound git tree. > > > > > > > > Takashi > > > > > > > > > > Sorry for asking this on a developer forum, but I'm pretty sure I finally > > > found the answer here. I had considered the need to wait it out for a kernel > > > upgrade (beyond 3.12 in Debian Testing/Jessie). I have no sound right now. > > > How do I apply this patch? When I installed Debian Testing, I installed a > > > targeted initrd, and I was considering retrying with a generic initrd - > > > although I think this thread just saved me from that. Will an established > > > initrd come into play? Will I have to recompile the 3.12 kernel? > > > > > > The Dell codec alias name is ALC3223. > > > > > > Thanks > > > > This is a follow up question for anyone. > > > > This boils down to a general question about new kernel compilation. > > > > To try and solve my no sound issue, I waited until 3.14-rc3 kernel went live. > > > > In the 3.14-rc3 kernel source folder, this patch is located at: > > sound/pci/hda/patch_realtek.c > > > > I thought that simply compiling the latest kernel, and then installing it, > > would apply all relevant patches (more than the realtek patch may be in > > play), but now I'm not so sure. > > > > The question is this: Does a 3.14-rc3 compiled kernel already include the > > above patch? Or, because it is labeled as a "patch" within the source, do I > > have to actually patch the source before compiling? > > Yes, it's already included in 3.14-rc3. > > But I doubt it'll help anything for your "audio" problem. The patch > merely changes the codec name string, nothing else. You're chasing a > wrong fish. > > Takashi Takashi, yes, the new codec did show up in alsamixer. I'm pretty sure it's hardware recognition. My card in debian testing with the latest RC5 kernel is: chris@inspiron:~$ inxi -A Audio: Card-1: Intel Lynx Point-LP HD Audio Controller driver: snd_hda_intel Sound: ALSA ver: k3.14.0-rc3 Card-2: Intel Haswell-ULT HD Audio Controller driver: snd_hda_intel If I boot up in Xubuntu, the codec is "wrong", but the listed hardware makes more sense given that Dell's Inspiron 7000 audio driver is a realtek driver. alsamixer shows: HDA Intel MID Intel Haswell HDMA HDA Intel PHC Realtek ALC283 Can this be solely addressed in /etc/modprobe.d/alsa-base.conf file? The addition of "option snd-hda-intel model=*something*" is the focus right now. Any suggestions? > > > IOW, does the patch get compiled, or does anything labeled as a patch within > > the source still have to be manually patched against the kernel? > > > > Thanks to anyone who can answer this. I complied and installed the 3.14-rc3 > > kernel without a problem. It was the default kernel in grub. But I'm still > > dealing with the exact same no sound issue as if booting into 3.12. > > > > _______________________________________________ > > Alsa-devel mailing list > > Alsa-devel <at> alsa-project.org > > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel > > > ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-03-05 7:17 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-11-27 10:01 Update patch for codecs alias name for Dell Kailang 2013-11-27 10:51 ` Takashi Iwai 2013-11-28 7:30 ` Kailang 2013-11-28 10:56 ` Takashi Iwai 2014-02-02 0:20 ` Chris M 2014-02-18 21:31 ` Chris M 2014-02-21 14:54 ` Takashi Iwai 2014-03-05 7:16 ` Chris M
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox