RE: [PATCH v9 04/10] Bluetooth: btintel: set get_data_path callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcel,

> Hi Kiran,
> 
> > Read supported offload usecases and set get_data_path callback if
> > controller suppports offload codecs.
> >
> > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> > index a9855a2dd561..1e51beec5776 100644
> > --- a/drivers/bluetooth/btusb.c
> > +++ b/drivers/bluetooth/btusb.c
> > @@ -2952,6 +2952,7 @@ static int btusb_setup_intel_newgen(struct
> hci_dev *hdev)
> > 	int err;
> > 	struct intel_debug_features features;
> > 	struct intel_version_tlv version;
> > +	struct intel_offload_usecases usecases;
> >
> > 	bt_dev_dbg(hdev, "");
> >
> > @@ -3008,6 +3009,13 @@ static int btusb_setup_intel_newgen(struct
> hci_dev *hdev)
> > 	/* Set DDC mask for available debug features */
> > 	btintel_set_debug_features(hdev, &features);
> >
> > +	err = btintel_read_offload_usecases(hdev, &usecases);
> > +	if (!err) {
> > +		/* set get_data_path callback if offload is supported */
> > +		if (usecases.preset[0] & 0x03)
> > +			hdev->get_data_path = btintel_get_data_path;
> > +	}
> > +
> 
> I really wonder if this exporting everything single detail to be just used by
> btusb is really a good idea. Would it be just enough to have a
> btintel_configure_offload(hdev); helper that does everything and be done
> with it. There is already too much Intel specifics bleeding into btusb.c and I
> think we need to correct that going forward.
> 

Ok. I will refactor this to move Intel specific code to btintel*
> Regards
> 
> Marcel

Thanks,
Kiran






[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux