From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mauro Carvalho Chehab Subject: Re: [PATCH 15/31] media: dvb-frontend invoke enable/disable_source handlers Date: Thu, 28 Jan 2016 15:31:47 -0200 Message-ID: <20160128153147.199ec4f6@recife.lan> References: <1591b6cf2025fa95a13e3b7dde52aa0e0bde0bb4.1452105878.git.shuahkh@osg.samsung.com> <20160128135304.3daa79f1@recife.lan> <20160128160711.029f3faf@lxorguk.ukuu.org.uk> <56AA48FA.7070203@osg.samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <56AA48FA.7070203-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Shuah Khan Cc: One Thousand Gnomes , tiwai-IBi9RG/b67k@public.gmane.org, clemens-P6GI/4k7KOmELgA04lAiVw@public.gmane.org, hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org, laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org, sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, javier-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org, pawel-FA/gS7QP4orQT0dZR+AlfA@public.gmane.org, m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, perex-/Fr2/VpizcU@public.gmane.org, arnd-r2nGTMty4D4@public.gmane.org, dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org, tvboxspy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, crope-X3B1VOXEql0@public.gmane.org, ruchandani.tina-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, corbet-T1hC0tSOHrs@public.gmane.org, chehabrafael-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, stefanr-MtYdepGKPcBMYopoZt5u/LNAH6kLmebB@public.gmane.org, inki.dae-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, jh1009.sung-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, prabhakar.csengg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, sw0312.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org, ricardo.ribalda-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, labbott-rxtnV0ftBwyoClj4AeEUq9i2O/JbrIOy@public.gmane.org, pierre-louis.bossart-VuQAYsv1563Yd54FQh9/CA@public.gmane.org, ricard.wanderlof-VrBV9hrLPhE@public.gmane.org, julian-SZMMDGyaqes@public.gmane.org, takamichiho-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, dominic.sacre-Mmb7MZpHnFY@public.gmane.org, misterpib-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, daniel-cYrQPVfZoowdnm+yROfE0A@public.gmane.org, gtmkramer-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org, norma List-Id: alsa-devel@alsa-project.org Em Thu, 28 Jan 2016 09:59:38 -0700 Shuah Khan escreveu: > On 01/28/2016 09:07 AM, One Thousand Gnomes wrote: > > On Thu, 28 Jan 2016 13:53:04 -0200 > > Mauro Carvalho Chehab wrote: > > > >> Em Wed, 6 Jan 2016 13:27:04 -0700 > >> Shuah Khan escreveu: > >> > >>> Checking for tuner availability from frontend thread start > >>> disrupts video stream. Change to check for tuner and start > >>> pipeline from frontend open instead and stop pipeline from > >>> frontend release. > >> > >> That's wrong, as DVB can be opened on read-only mode, where > >> it won't be changing anything. > > Correct. Please check the code. Tuner availability check is > done when the device is opened in Write mode in the following > conditional. > > if ((file->f_flags & O_ACCMODE) != O_RDONLY) { OK. Thanks! Mauro , I don't think POSIX allows to return an error like EBUSY > >> on open: > >> http://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html > > > > It doesn't document all the errors you may return. Quite a lot of > > kernel drivers return EBUSY when they are "single open" things. > > > > POSIX documents certain cases that *must* error and what the error code > > is. It documents certain possible failures and what their error code is. > > Beyond that it's up to you. > > > > Returning EBUSY clearly indicates the reason why the device > can't be opened in this case. > > thanks, > -- Shuah > > Thanks! Mauro