alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Ian Minett <ian_minett@creativelabs.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCHv2 - CA0132 HDA Codec 1/2] ALSA: Update Creative CA0132 codec to add DSP features.
Date: Thu, 26 Jul 2012 10:06:12 +0200	[thread overview]
Message-ID: <s5hsjcfrlor.wl%tiwai@suse.de> (raw)
In-Reply-To: <1343239280-3503-1-git-send-email-ian_minett@creativelabs.com>

At Wed, 25 Jul 2012 11:01:19 -0700,
Ian Minett wrote:
> 
> From: Ian Minett <ian_minett@creativelabs.com>
> 
> Hi,
> Thanks again for the feedback - we've reworked the patch accordingly, to remove
> floats, tidy the use of macros and add the MODULE_FIRMWARE() lines.
> 
> You are right - since it is a pretty big change introducing all the DSP
> functionality it isn't trivial to break it into multiple small patches.
> I've added more info on what has been changed below in the git commit message.
> 
> The reason we need to modify the trigger callback in hda_intel.c is that the DSP
> code is downloaded from the host (driver) to the CA0132 chip via the HD-link.
> This means that the trigger callback is called from the codec driver.

Well, this is the biggest problem.  What the patch does is a layer
violation.  Such an operation must not be performed in the codec
driver.  I guess you know it very well when you look again how ugly
hacks you need for setting up a fake PCM instance and so on.

One possible way would be to move these DSP loading code into
hda_intel.c.  But then it bloats up the generic controller driver.

Another possibility is to fork hda_intel.c and move the Creative's
controller chip driver there (not meant the code in patch_ca0132.c).
You can strip down many workarounds found in hda_intel.c
(e.g. bdl_pos_adj, position_fix, probing errors, vga_switcheroo, etc)
as a bonus.  And the new controller driver can still use the same
hda_codec.c and the rest as long as it uses the same structure.

> I will submit the DSP firmware blob (ctefx.bin) as a separate patch against the 
> alsa-firmware repository, for intended upstreaming to linux-firmware package. 
> The CA0132 codec uses request_firmware() loader to find the DSP binary in the 
> /lib/firmware directory (the firmware isn't required for building the CA0132
> module). If this isn't the correct way to submit firmware binaries, we'd 
> appreciate any info on what the correct method for this is.

Yes, this is the correct way.

But, still one concern is that people may very likely build the kernel
without taking the firmware.  Then suddenly it breaks just by the
kernel update -- this shouldn't happen.

So, we'd need a kernel config, or at least a module parameter, to
enable/disable the new DSP stuff.  When it's off, the whole DSP isn't
requested and it behaves just likes a standard HD-audio.


thanks,

Takashi

  parent reply	other threads:[~2012-07-26  8:06 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1342223070-25852-1-git-send-email-ian_minett@creativelabs.com>
2012-07-13 23:44 ` [PATCH - CA0132 HDA Codec 2/2] Change spin_lock()/unlock() to spin_lock_irqsave()/restore() in azx_pcm_trigger(). This prevents deadlock when an interrupt occurs, caused by chip->reg_lock contention ian_minett
2012-07-16 10:18 ` [PATCH - CA0132 HDA Codec 1/2] ALSA: Update Creative CA0132 codec to add DSP features Takashi Iwai
2012-07-25 18:01   ` [PATCHv2 " Ian Minett
2012-07-25 18:01     ` [PATCHv2 - CA0132 HDA Codec 2/2] Change spin_lock()/unlock() to spin_lock_irqsave()/restore() Ian Minett
2012-07-26  8:06     ` Takashi Iwai [this message]
     [not found]       ` <OF0CFC3DA9.A9100453-ON88257A48.006BF087-88257A48.006FCB42@cli.creative.com>
2012-07-28  5:57         ` [PATCHv2 - CA0132 HDA Codec 1/2] ALSA: Update Creative CA0132 codec to add DSP features Takashi Iwai
     [not found]           ` <OF301523C9.1A0D8E05-ON88257A4B.0074BC06-88257A4B.007D5630@cli.creative.com>
2012-07-31 15:15             ` Takashi Iwai
2012-08-01  2:38               ` Ian Minett
2012-08-01  5:48                 ` Takashi Iwai
2012-08-04  3:29                   ` Ian Minett
2012-08-04  7:29                     ` Takashi Iwai
2012-08-08  0:27                       ` Ian Minett
2012-08-08  7:22                         ` Takashi Iwai
     [not found]                           ` <1344665872-15537-1-git-send-email-ian_minett@creativelabs.com>
2012-08-11  6:17                             ` [PATCHv2.1-CA0132 HDA Codec 2/2] Add DSP loader code to CA0132 codec Ian Minett
2012-08-11  7:12                               ` Takashi Iwai
2012-08-13 23:04                                 ` Ian Minett
2012-08-15  5:50                                 ` [PATCHv2.1-CA0132 HDA Codec 1/1] Draft DSP loader update #2 Ian Minett
2012-08-15  7:06                                   ` Takashi Iwai
2012-08-22  1:36                                     ` Ian Minett
2012-08-22 13:39                                       ` Takashi Iwai
2012-08-11  7:19                             ` [PATCHv2.1-CA0132 HDA Codec 1/2] Add DSP loader code to CA0132 codec Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hsjcfrlor.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=ian_minett@creativelabs.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).