mbox series

[RFC,0/3] Get optimal audio frequency and channels

Message ID 20230628163359.2879668-1-mitulkumar.ajitkumar.golani@intel.com (mailing list archive)
Headers show
Series Get optimal audio frequency and channels | expand

Message

Golani, Mitulkumar Ajitkumar June 28, 2023, 4:33 p.m. UTC
Currently we do not check if there is enough bandwidth for
audio, and what channels and freq it can really support.
Also sometimes there can be HW constraints e.g. GLK where audio
channels supported are only 2.

https://patchwork.freedesktop.org/series/107647/

Obtain the optimal audio rate and channel based on available display
timing constraints.

This can be achieved by:
- Retrieve the supported channel and rate information from SADs
- Adding audio-related config parameters in the CRTC state, such
as audio support, rate, and channel.
- Initializing the audio config parameters with the maximum supported
rate and channel by the audio source.
- Computing the SADs based on the audio source's capabilities.

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>

Mitul Golani (3):
  drm/i915: Add has_audio to separate audio parameter in crtc_state
  drm/i915/display: Configure and initialize HDMI audio capabilities
  drm/i915/display: Add wrapper to Compute SAD

 drivers/gpu/drm/i915/display/g4x_dp.c         |   4 +-
 drivers/gpu/drm/i915/display/g4x_hdmi.c       |  16 +--
 drivers/gpu/drm/i915/display/intel_audio.c    | 115 +++++++++++++++++-
 drivers/gpu/drm/i915/display/intel_cdclk.c    |   6 +-
 .../drm/i915/display/intel_crtc_state_dump.c  |   4 +-
 drivers/gpu/drm/i915/display/intel_ddi.c      |   2 +-
 drivers/gpu/drm/i915/display/intel_display.c  |   4 +-
 .../drm/i915/display/intel_display_types.h    |  12 +-
 drivers/gpu/drm/i915/display/intel_dp.c       |   2 +-
 drivers/gpu/drm/i915/display/intel_dp_mst.c   |   2 +-
 drivers/gpu/drm/i915/display/intel_hdmi.c     |   2 +-
 drivers/gpu/drm/i915/display/intel_sdvo.c     |  10 +-
 12 files changed, 147 insertions(+), 32 deletions(-)

Comments

Jani Nikula June 29, 2023, 8:12 a.m. UTC | #1
On Wed, 28 Jun 2023, Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> wrote:
> Currently we do not check if there is enough bandwidth for
> audio, and what channels and freq it can really support.
> Also sometimes there can be HW constraints e.g. GLK where audio
> channels supported are only 2.

Why are you sending this so many times? What are the changes between the
versions? People lose track.

BR,
Jani.

>
> https://patchwork.freedesktop.org/series/107647/
>
> Obtain the optimal audio rate and channel based on available display
> timing constraints.
>
> This can be achieved by:
> - Retrieve the supported channel and rate information from SADs
> - Adding audio-related config parameters in the CRTC state, such
> as audio support, rate, and channel.
> - Initializing the audio config parameters with the maximum supported
> rate and channel by the audio source.
> - Computing the SADs based on the audio source's capabilities.
>
> Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
>
> Mitul Golani (3):
>   drm/i915: Add has_audio to separate audio parameter in crtc_state
>   drm/i915/display: Configure and initialize HDMI audio capabilities
>   drm/i915/display: Add wrapper to Compute SAD
>
>  drivers/gpu/drm/i915/display/g4x_dp.c         |   4 +-
>  drivers/gpu/drm/i915/display/g4x_hdmi.c       |  16 +--
>  drivers/gpu/drm/i915/display/intel_audio.c    | 115 +++++++++++++++++-
>  drivers/gpu/drm/i915/display/intel_cdclk.c    |   6 +-
>  .../drm/i915/display/intel_crtc_state_dump.c  |   4 +-
>  drivers/gpu/drm/i915/display/intel_ddi.c      |   2 +-
>  drivers/gpu/drm/i915/display/intel_display.c  |   4 +-
>  .../drm/i915/display/intel_display_types.h    |  12 +-
>  drivers/gpu/drm/i915/display/intel_dp.c       |   2 +-
>  drivers/gpu/drm/i915/display/intel_dp_mst.c   |   2 +-
>  drivers/gpu/drm/i915/display/intel_hdmi.c     |   2 +-
>  drivers/gpu/drm/i915/display/intel_sdvo.c     |  10 +-
>  12 files changed, 147 insertions(+), 32 deletions(-)
Golani, Mitulkumar Ajitkumar June 30, 2023, 4:46 a.m. UTC | #2
Hi @Jani Nikula

> -----Original Message-----
> From: Jani Nikula <jani.nikula@linux.intel.com>
> Sent: 29 June 2023 13:43
> To: Golani, Mitulkumar Ajitkumar <mitulkumar.ajitkumar.golani@intel.com>;
> intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [RFC 0/3] Get optimal audio frequency and channels
> 
> On Wed, 28 Jun 2023, Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
> wrote:
> > Currently we do not check if there is enough bandwidth for audio, and
> > what channels and freq it can really support.
> > Also sometimes there can be HW constraints e.g. GLK where audio
> > channels supported are only 2.
> 
> Why are you sending this so many times? What are the changes between the
> versions? People lose track.
> 
> BR,
> Jani.

Due to Indentations got off while fixing one of the comments from different editor. Check patch would have failed. 

From next revision onwards, I will add revision tag to cover letter for better tracking.
Please review latest revision in this patch series.

Thanks,
Mitul

> 
> >
> > https://patchwork.freedesktop.org/series/107647/
> >
> > Obtain the optimal audio rate and channel based on available display
> > timing constraints.
> >
> > This can be achieved by:
> > - Retrieve the supported channel and rate information from SADs
> > - Adding audio-related config parameters in the CRTC state, such as
> > audio support, rate, and channel.
> > - Initializing the audio config parameters with the maximum supported
> > rate and channel by the audio source.
> > - Computing the SADs based on the audio source's capabilities.
> >
> > Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
> >
> > Mitul Golani (3):
> >   drm/i915: Add has_audio to separate audio parameter in crtc_state
> >   drm/i915/display: Configure and initialize HDMI audio capabilities
> >   drm/i915/display: Add wrapper to Compute SAD
> >
> >  drivers/gpu/drm/i915/display/g4x_dp.c         |   4 +-
> >  drivers/gpu/drm/i915/display/g4x_hdmi.c       |  16 +--
> >  drivers/gpu/drm/i915/display/intel_audio.c    | 115 +++++++++++++++++-
> >  drivers/gpu/drm/i915/display/intel_cdclk.c    |   6 +-
> >  .../drm/i915/display/intel_crtc_state_dump.c  |   4 +-
> >  drivers/gpu/drm/i915/display/intel_ddi.c      |   2 +-
> >  drivers/gpu/drm/i915/display/intel_display.c  |   4 +-
> >  .../drm/i915/display/intel_display_types.h    |  12 +-
> >  drivers/gpu/drm/i915/display/intel_dp.c       |   2 +-
> >  drivers/gpu/drm/i915/display/intel_dp_mst.c   |   2 +-
> >  drivers/gpu/drm/i915/display/intel_hdmi.c     |   2 +-
> >  drivers/gpu/drm/i915/display/intel_sdvo.c     |  10 +-
> >  12 files changed, 147 insertions(+), 32 deletions(-)
> 
> --
> Jani Nikula, Intel Open Source Graphics Center