All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Tim Harvey <tharvey@gateworks.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: notifying userspace of hwparams change
Date: Thu, 05 Oct 2017 15:19:56 +0200	[thread overview]
Message-ID: <s5hinftybnn.wl-tiwai@suse.de> (raw)
In-Reply-To: <CAJ+vNU1eN2LWJ3Qy35EnUJOyH6gVVQma7caibE40boqT3bfbMg@mail.gmail.com>

On Tue, 03 Oct 2017 18:11:50 +0200,
Tim Harvey wrote:
> 
> Greetings,
> 
> I've got an HDMI receiver chip I'm working on a driver for which
> provides the audio signal from the HDMI source. An HDMI source can be
> a variety of sample-rates, channels, widths, and formats. If I
> understand correctly I need to register the device as supporting all
> the possible rates/channels/formats then constrain these to what is
> actually available at the time in the startup callback with
> snd_pcm_hw_contstraint_minmax and snd_pcm_hw_constraint_mask.
> 
> How do I notify userspace when the chip tells me that the HDMI audio
> source rate/channels/format has changed?
> 
> I know on the Video side the driver sends a V4L2_EVENT_SOURCE_CHANGE
> event to userspace when input format/resolution has changed so that
> userspace can stop streaming, call VIDIOC_QUERY_DV_TIMINGS and then
> VIDIOC_S_DV_TIMINGS with new timings.

This is one thing we need to address, but currently there is no
notification mechanism for such changes.  Or, better to say, we don't
expect that the hw_constraint may change during the PCM operation.

When HDMI/DP is concerned, usually they have disconnect/reconnect
before such hw_constraint change happens, so we can expect user-space
doing re-opening the device in anyway.

But, the device disconnection is another issue to be improved.
We're currently allowing the disconnection of the whole card,
triggered by snd_card_disconnect(), but not in each component level.
So it depends on the driver / device whether the current
implementation works well or not.


thanks,

Takashi

      reply	other threads:[~2017-10-05 13:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 16:11 notifying userspace of hwparams change Tim Harvey
2017-10-05 13:19 ` Takashi Iwai [this message]

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=s5hinftybnn.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=tharvey@gateworks.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.