Can't restore audio after 6.17 kernel (2019 iMac)

When I update to 6.17 (from 6.16) kernel the audio stops working on my 2019 iMac desktop.

This isn’t the first time - actually, it’s the usual dance I have to do since the fix is to re-run the snd-hda-codec-cs8409 patch. [Which can be found: here.] In the past it all works out eventually - after multiple attempts.

But not this time. I’ve used timeshift several times again to return to 6.16, which immediately resolves the audio problem. But I can’t be stuck with 6.16 forever, So…

The problem seems to be that when I try to make (before invoking sudo make install) the patch I get a Type 2 ERROR and I can’t seem to figure out quite why.

Below is what appears on the screen when running make.

Any additional logs needed for insight? (If so, where might I find them?)

[ejm@iMac-i3 snd-hda-codec-cs8409]$ make
make -C /lib/modules/6.17.5-zen1-1-zen/build CFLAGS_MODULE="-DAPPLE_PINSENSE_FIXUP -DAPPLE_CODECS -DCONFIG_SND_HDA_RECONFIG=1 -Wno-unused-variable -Wno-unused-function" M=/home/ejm/snd-hda-codec-cs8409 modules
make[1]: Entering directory '/usr/lib/modules/6.17.5-zen1-1-zen/build'
make[2]: Entering directory '/home/ejm/snd-hda-codec-cs8409'
  CC [M]  patch_cs8409.o
patch_cs8409.c:1083:10: error: ‘const struct hda_codec_ops’ has no member named ‘free’
 1083 |         .free = cs8409_free,
      |          ^~~~
patch_cs8409.c:1083:17: error: initialization of ‘void (*)(struct hda_codec *, unsigned int)’ from incompatible pointer type ‘void (*)(struct hda_codec *)’ [-Wincompatible-pointer-types]
 1083 |         .free = cs8409_free,
      |                 ^~~~~~~~~~~
patch_cs8409.c:1083:17: note: (near initialization for ‘cs8409_cs42l42_patch_ops.unsol_event’)
patch_cs8409.c:957:13: note: ‘cs8409_free’ declared here
  957 | static void cs8409_free(struct hda_codec *codec)
      |             ^~~~~~~~~~~
patch_cs8409.c: In function ‘cs8409_cs42l42_fixups’:
patch_cs8409.c:1137:22: error: ‘struct hda_codec’ has no member named ‘patch_ops’
 1137 |                 codec->patch_ops = cs8409_cs42l42_patch_ops;
      |                      ^~
patch_cs8409.c: At top level:
patch_cs8409.c:1311:10: error: ‘const struct hda_codec_ops’ has no member named ‘free’
 1311 |         .free = cs8409_free,
      |          ^~~~
patch_cs8409.c:1311:17: error: initialization of ‘void (*)(struct hda_codec *, unsigned int)’ from incompatible pointer type ‘void (*)(struct hda_codec *)’ [-Wincompatible-pointer-types]
 1311 |         .free = cs8409_free,
      |                 ^~~~~~~~~~~
patch_cs8409.c:1311:17: note: (near initialization for ‘cs8409_dolphin_patch_ops.unsol_event’)
patch_cs8409.c:957:13: note: ‘cs8409_free’ declared here
  957 | static void cs8409_free(struct hda_codec *codec)
      |             ^~~~~~~~~~~
patch_cs8409.c: In function ‘dolphin_fixups’:
patch_cs8409.c:1374:22: error: ‘struct hda_codec’ has no member named ‘patch_ops’
 1374 |                 codec->patch_ops = cs8409_dolphin_patch_ops;
      |                      ^~
In file included from patch_cs8409.c:1488:
patch_cirrus_apple.h: In function ‘debug_show_configs’:
patch_cirrus_apple.h:630:76: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
  630 |                               spec->multi_io[0].dac, spec->multi_io[1].dac);
      |                                                                            ^
patch_cirrus_apple.h:641:52: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
  641 |                       spec->multiout.hp_out_nid[3]);
      |                                                    ^
patch_cirrus_apple.h:651:55: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
  651 |                       spec->multiout.extra_out_nid[3]);
      |                                                       ^
patch_cirrus_apple.h: In function ‘cs_8409_playback_pcm_prepare’:
patch_cirrus_apple.h:723:81: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
  723 |                 mycodec_dbg(codec, "cs_8409_playback_pcm_prepare err %d\n", err);
      |                                                                                 ^
patch_cirrus_apple.h: At top level:
patch_cirrus_apple.h:883:6: warning: no previous prototype for ‘cs_8409_dump_callback’ [-Wmissing-prototypes]
  883 | void cs_8409_dump_callback(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~~~~
patch_cirrus_apple.h:904:1: warning: no previous prototype for ‘cs_8409_hda_jack_detect_enable_callback’ [-Wmissing-prototypes]
  904 | cs_8409_hda_jack_detect_enable_callback(struct hda_codec *codec, hda_nid_t nid, int dev_id, int tag,
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_apple.h: In function ‘cs_8409_dump_auto_config’:
patch_cirrus_apple.h:1098:132: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
 1098 |                         myprintk("snd_hda_intel: auto config multiout is  hp_out_nid 0x%02x\n", spec->gen.multiout.hp_out_nid[itm]);
      |                                                                                                                                    ^
patch_cirrus_apple.h:1102:135: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
 1102 |                         myprintk("snd_hda_intel: auto config multiout is xtr_out_nid 0x%02x\n", spec->gen.multiout.extra_out_nid[itm]);
      |                                                                                                                                       ^
patch_cirrus_apple.h: In function ‘cs_8409_apple_boot_init’:
patch_cirrus_apple.h:1191:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1191 |         hinfo = spec->gen.stream_analog_playback;
      |               ^
patch_cirrus_apple.h:1197:58: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
 1197 |                 mycodec_dbg(codec, "hinfo stream NULL\n");
      |                                                          ^
patch_cirrus_apple.h:1220:108: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
 1220 |                                 mycodec_dbg(codec, "cs_8409_apple_boot_init info stream %d NULL\n", stream);
      |                                                                                                            ^
patch_cirrus_apple.h:1300:112: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
 1300 |                                 mycodec_dbg(codec, "cs_8409_apple_boot_init info pcm stream %d NULL\n", stream);
      |                                                                                                                ^
patch_cirrus_apple.h: In function ‘cs_8409_apple_resume’:
patch_cirrus_apple.h:1400:18: error: ‘struct hda_codec’ has no member named ‘patch_ops’
 1400 |         if (codec->patch_ops.init)
      |                  ^~
patch_cirrus_apple.h:1401:22: error: ‘struct hda_codec’ has no member named ‘patch_ops’
 1401 |                 codec->patch_ops.init(codec);
      |                      ^~
patch_cirrus_apple.h: At top level:
patch_cirrus_apple.h:1456:5: warning: no previous prototype for ‘cs_8409_apple_build_pcms’ [-Wmissing-prototypes]
 1456 | int cs_8409_apple_build_pcms(struct hda_codec *codec)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_apple.h:1542:6: warning: no previous prototype for ‘cs_8409_cs42l83_mark_jack’ [-Wmissing-prototypes]
 1542 | void cs_8409_cs42l83_mark_jack(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_apple.h:1583:6: warning: no previous prototype for ‘cs_8409_cs42l83_jack_report_sync’ [-Wmissing-prototypes]
 1583 | void cs_8409_cs42l83_jack_report_sync(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_apple.h:1591:6: warning: no previous prototype for ‘cs_8409_cs42l83_jack_report_hp_update’ [-Wmissing-prototypes]
 1591 | void cs_8409_cs42l83_jack_report_hp_update(struct hda_codec *codec, int plugin)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_apple.h:1604:6: warning: no previous prototype for ‘cs_8409_cs42l83_jack_unsol_event’ [-Wmissing-prototypes]
 1604 | void cs_8409_cs42l83_jack_unsol_event(struct hda_codec *codec, unsigned int res)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_apple.h:1701:6: warning: no previous prototype for ‘cs_8409_apple_free’ [-Wmissing-prototypes]
 1701 | void cs_8409_apple_free(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~
patch_cirrus_apple.h:1723:10: error: ‘const struct hda_codec_ops’ has no member named ‘free’
 1723 |         .free = cs_8409_apple_free,
      |          ^~~~
patch_cirrus_apple.h:1723:17: error: initialization of ‘void (*)(struct hda_codec *, unsigned int)’ from incompatible pointer type ‘void (*)(struct hda_codec *)’ [-Wincompatible-pointer-types]
 1723 |         .free = cs_8409_apple_free,
      |                 ^~~~~~~~~~~~~~~~~~
patch_cirrus_apple.h:1723:17: note: (near initialization for ‘cs_8409_apple_patch_ops.unsol_event’)
patch_cirrus_apple.h:1701:6: note: ‘cs_8409_apple_free’ declared here
 1701 | void cs_8409_apple_free(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~
patch_cirrus_apple.h: In function ‘patch_cs8409_apple’:
patch_cirrus_apple.h:2594:21: error: ‘struct hda_codec’ has no member named ‘patch_ops’
 2594 |                codec->patch_ops = cs_8409_apple_patch_ops;
      |                     ^~
In file included from patch_cirrus_apple.h:3023:
patch_cirrus_new84.h: In function ‘hda_set_node_power_state_dbg’:
patch_cirrus_new84.h:53:107: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
   53 |         if (dbgflg) mycodec_info(codec, "hda_set_node_power_state  nid 0x%02x power %d\n",nid,power_state);
      |                                                                                                           ^
patch_cirrus_new84.h:80:89: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
   80 |         if (dbgflg) mycodec_info(codec, "hda_set_node_power_state end power %d\n",state);
      |                                                                                         ^
patch_cirrus_new84.h: In function ‘cs_8409_vendor_coef_set_mask’:
patch_cirrus_new84.h:170:175: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
  170 | d_hda_intel: cs_8409_vendor_coef_set_mask 0x%04x 0x%04x: 0x%04x (0x%04x 0x%04x 0x%04x) %d",idx,coef,mask_coef,retval,coef,mask,srcidx);
      |                                                                                                                                       ^
patch_cirrus_new84.h:174:167: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
  174 | d_hda_intel: cs_8409_vendor_coef_set_mask 0x%04x 0x%04x: 0x%04x (0x%04x 0x%04x 0x%04x) %d",idx,coef,mask_coef,retval,coef,mask,srcidx);
      |                                                                                                                                       ^
patch_cirrus_new84.h: At top level:
patch_cirrus_new84.h:457:6: warning: no previous prototype for ‘snd_hda_coef_item’ [-Wmissing-prototypes]
  457 | void snd_hda_coef_item(struct hda_codec *codec, u16 write_flag, hda_nid_t nid, u32 idx, u32 param, u32 retdata, int srcidx)
      |      ^~~~~~~~~~~~~~~~~
patch_cirrus_new84.h:488:5: warning: no previous prototype for ‘snd_hda_coef_item_check’ [-Wmissing-prototypes]
  488 | int snd_hda_coef_item_check(struct hda_codec *codec, u16 write_flag, hda_nid_t nid, u32 idx, u32 param, u32 retdata, int srcidx)
      |     ^~~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_new84.h:512:6: warning: no previous prototype for ‘snd_hda_coef_item_masked’ [-Wmissing-prototypes]
  512 | void snd_hda_coef_item_masked(struct hda_codec *codec, u16 write_flag, hda_nid_t nid, u32 idx, u32 param, u32 mask, u32 retdata, u32 srcval, int srcidx)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_new84.h:531:6: warning: no previous prototype for ‘snd_hda_coef_sequence’ [-Wmissing-prototypes]
  531 | void snd_hda_coef_sequence(struct hda_codec *codec, const struct hda_coef *seq, char *prtstr)
      |      ^~~~~~~~~~~~~~~~~~~~~
patch_cirrus_new84.h:556:6: warning: no previous prototype for ‘snd_hda_double_reset’ [-Wmissing-prototypes]
  556 | void snd_hda_double_reset(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~~~
patch_cirrus_new84.h: In function ‘cs_8409_dump_stream_format’:
patch_cirrus_new84.h:684:109: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
  684 |                 mycodec_dbg(codec, "cs_8409_dump_stream_format: NID=0x%x, codec cached values: NULL\n", nid);
      |                                                                                                             ^
patch_cirrus_new84.h: In function ‘cs_8409_really_update_stream_format’:
patch_cirrus_new84.h:850:165: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
  850 | odec, "cs_8409_really_update_stream_format new       tag 0x%08x chnl 0x%08x fmt 0x%08x\n", stream_tag_sv, channel_id_sv, format_id_sv);
      |                                                                                                                                       ^
patch_cirrus_new84.h: At top level:
patch_cirrus_new84.h:1119:6: warning: no previous prototype for ‘cs_8409_play_setup’ [-Wmissing-prototypes]
 1119 | void cs_8409_play_setup(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~
patch_cirrus_new84.h:1155:6: warning: no previous prototype for ‘cs_8409_play_cleanup’ [-Wmissing-prototypes]
 1155 | void cs_8409_play_cleanup(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~~~
patch_cirrus_new84.h:1191:6: warning: no previous prototype for ‘cs_8409_capture_setup’ [-Wmissing-prototypes]
 1191 | void cs_8409_capture_setup(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~~~~
patch_cirrus_new84.h:1209:6: warning: no previous prototype for ‘cs_8409_capture_cleanup’ [-Wmissing-prototypes]
 1209 | void cs_8409_capture_cleanup(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_new84.h:1339:6: warning: no previous prototype for ‘cs_8409_headplay_setup’ [-Wmissing-prototypes]
 1339 | void cs_8409_headplay_setup(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_new84.h:1379:6: warning: no previous prototype for ‘cs_8409_headplay_cleanup’ [-Wmissing-prototypes]
 1379 | void cs_8409_headplay_cleanup(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_new84.h:1423:6: warning: no previous prototype for ‘cs_8409_headcapture_setup’ [-Wmissing-prototypes]
 1423 | void cs_8409_headcapture_setup(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_new84.h:1449:6: warning: no previous prototype for ‘cs_8409_headcapture_cleanup’ [-Wmissing-prototypes]
 1449 | void cs_8409_headcapture_cleanup(struct hda_codec *codec)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
patch_cirrus_new84.h: In function ‘cs_8409_capture_pcm_hook’:
patch_cirrus_new84.h:1767:108: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
 1767 |                 myprintk_dbg("snd_hda_intel: command cs_8409_capture_pcm_hook HOOK init  - CODEC NOT NULL");
      |                                                                                                            ^
patch_cs8409.c: At top level:
patch_cs8409.c:1492:9: error: implicit declaration of function ‘HDA_CODEC_ENTRY’; did you mean ‘HDA_CODEC_QUIRK’? [-Wimplicit-function-declaration]
 1492 |         HDA_CODEC_ENTRY(0x10138409, "CS8409", patch_cs8409),
      |         ^~~~~~~~~~~~~~~
      |         HDA_CODEC_QUIRK
patch_cs8409.c:1492:9: error: initializer element is not constant
patch_cs8409.c:1492:9: note: (near initialization for ‘snd_hda_id_cs8409[0].vendor_id’)
patch_cs8409.c:1493:9: warning: braces around scalar initializer
 1493 |         {} /* terminator */
      |         ^
patch_cs8409.c:1493:9: note: (near initialization for ‘snd_hda_id_cs8409[0].rev_id’)
make[4]: *** [/usr/lib/modules/6.17.5-zen1-1-zen/build/scripts/Makefile.build:287: patch_cs8409.o] Error 1
make[3]: *** [/usr/lib/modules/6.17.5-zen1-1-zen/build/Makefile:2009: .] Error 2
make[2]: *** [/usr/lib/modules/6.17.5-zen1-1-zen/build/Makefile:248: __sub-make] Error 2
make[2]: Leaving directory '/home/ejm/snd-hda-codec-cs8409'
make[1]: *** [Makefile:248: __sub-make] Error 2
make[1]: Leaving directory '/usr/lib/modules/6.17.5-zen1-1-zen/build'
make: *** [Makefile:16: all] Error 2

I would use the LTS kernel instead of an unsopported EOL 16.6 kernel series.

1 Like

Thank you for your prompt followup.

The LTS (6.12.55-1-lts) definitely works (that is, after running the make and sudo make install on the audio patch). And so does the 6.16 series beyond that, which is what I’ve been using until now.

I guess my concern is that if I can’t get it to work properly on the 6.17 kernel, at some point when that series becomes the new LTS, I’ll be stuck. Feels like I’d just be kicking the proverbial can down the road?

You will have support for this series until Dec. 2026.

Not all the kernel series will become LTS. I don’t think 6.17 will. At least looking at:

Well, this bug report seems maybe related:

Which points to this recent kernel commit:

3 Likes

Greatly appreciate your pointing me to the github site again. I had checked when I first experienced this several weeks back but there was no traffic on this topic so I didn’t bother - figured it was something foolish just at my end.

Now there are others, so I’ve added a brief comment too.

Hopefully this gets resolved sometime before Dec 2026 :folded_hands:

2 Likes

Ignore my post else where I forgot they had changed sound system after 2015. But check this on Manjaro forum.

1 Like

@Merlin1 Thanks for this info. For the sake of completeness, when I have had success in continuing to use the snd patch (for several years’ worth of kernel upgrades) it’s been thanks to following this guidance from here… Perhaps this will be helpful to someone down the road:

For now, I’m stuck using the LTS - which isn’t a bad outcome, just not my preference.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.